LinGui: ensure loose crop always crops even values
Subsampled chroma (i.e. yuv420) requires that you do all cropping
on even boundaries and that the result has even dimensions. There
were cases where my cropping could violate this.
Periodic intra refresh has no IDR frames, but x264 signals a keyframe at
recovery points. Use this flag to fake keyframes in the container so
that seeking in these files works properly.
Seek point may be a recovery point which will not be a complete clean
frame. So consume frames till we reach the recovery frame count.
Patches Libav so it can tell us when the recovery point has been
reached.
Also improves detection of recovery points in TS files.
WinGui: Fixes to the Audio Panel.
- Fix a display issue with Encoder and Mixdown on the data grid.
- Don't try to load tracks if there isn't any.
- Fix an issue with auto-correction of Passthru option. (DTS-HD would not auto-correct to the correct passthru for the source track type)
I ran across a stream that has bad timestamps in the Teletext track
which causes the demux to think there are discontinuities and drop
packets. makes a real mess of things.
fixes streams that have broken frame count field. since this
value can be computed from the frame size, we can ignore it.
Also fixes some decode errors in 20 and 24bit lpcm.
WinGui: Numerous fixes to Libhb based scanning and encoding. Aside from several non-critical bugs, the code is now "usable" but should be considered experimental.
libhb: fix incorrect decrementing of audio->config.out.track; it starts at 1, not 0. Also, explicitly log that we are dropping the track when we find an incompatible passthru.
Fixes:
[01:26:41] Sample rate 24000 not supported (ca_haac). Using 32kHz for track 1
track 1 suddenly becomes track 0:
[01:26:41] work: sanitizing track 0 mixdown Dolby Pro Logic II to Stereo
[01:26:41] work: sanitizing track 0 audio bitrate 160 to 80
[…]
[01:26:41] * audio track 0
libhb: work around the lack of 6.1 support for DTS sources
libhb doesn't support 6.1 sources and assumes they're 7.0 instead. This breaks downmixing.
Libav can decode the DTS-ES 6.1 core of DTS-HD 6.1 audio tracks; tell it to not process the additional channel so that such tracks can be re-encoded correctly.
See https://reviews.handbrake.fr/r/200/ for more information.
WinGui: Initial support for batch queueing.
A new option "Add All" which will add all scanned titles using the current settings. Ideally used with batch scanned sources.
MacGui: Behold that which is hidden ... Batch Queueing Support.
- Add batch queueing support to the macgui.
- Currently accessed under File > Add All Titles To Queue
- No toolbar button yet since it needs to soak for a while and needs refinement.
- Applies all current settings to all titles.
- Best used with batch scanning flat files.
- Works with a dvd scan where the dvd titles are in the title structure ... but not recommended.
- Use at your own peril!
I found myself wanting to know what the source video codec was when
I discovered that several of my VC-1 trancodes were crap. So this
adds the video codec name to the summary information I display on the
summary tab.
sr55 [Sat, 27 Aug 2011 22:04:54 +0000 (22:04 +0000)]
WinGui: Some tweaks to the way the picture settings panel handles cropping and preset stored values. Check if the preset has values, before ignoring the source values.
sr55 [Sat, 27 Aug 2011 21:39:15 +0000 (21:39 +0000)]
WinGui: Some refactoring of the preset services to make them simpler and restoring old functionality that allowed storing of crop settings to match the macgui.
dynaflash [Wed, 24 Aug 2011 20:11:53 +0000 (20:11 +0000)]
MacGui: Live Preview ...
- Use the first subs track that has been specified to display in the live preview.
-- Tested against TX3G (3GPP) subs in mp4 and vobsubs in mkv.
- Also change Live Preview durations to less granular yet longer durations to: (seconds) 15, 30, 45, 60 90, 105 and 120.
- Subs patch by Rodeo. Thanks!
Rodeo [Fri, 19 Aug 2011 22:25:06 +0000 (22:25 +0000)]
CLI: fix a bug where gain wouldn't be initialized when there were more input audio tracks than the number of gain values specified in the command line.
jstebbins [Fri, 19 Aug 2011 16:00:42 +0000 (16:00 +0000)]
LinGui: compute passthru fallbacks
if we have an encoder for a passthru codec, use that encoder when
passthru isn't possible. for 'Auto Passthru' use the fallback
specified in the preset.
dynaflash [Thu, 18 Aug 2011 22:11:49 +0000 (22:11 +0000)]
MacGui: Fix crash when launching then cancelling new source and quitting would cause a crash due to there being no preview when calling windowWillClose in HBPreview.m
dynaflash [Wed, 17 Aug 2011 15:43:14 +0000 (15:43 +0000)]
MacGui: Fix a crash in live preview where upon closing the preview window during a live preview encode it was not being properly stopped so upon reopening and clicking on "Still Previews" there was a crashy.
jstebbins [Tue, 16 Aug 2011 14:45:11 +0000 (14:45 +0000)]
libhb: Use h.264 recovery points as key frames when decoding
Many transport streams have few or zero IDR frames. So scanning them
takes a long time, generates a lot of log spam, and results in poor
preview quality. Often there will be several identical preview frames
because it will find the same IDR for several of the previews. Using
recovery points helps all these problems.
sr55 [Mon, 15 Aug 2011 16:54:19 +0000 (16:54 +0000)]
WinGui: Finished re-writing the user settings service to use xml file storage rather than built-in settings. Moved all the Services Library settings over to use the service. Main application will be done later.
randomengy [Sat, 13 Aug 2011 01:53:01 +0000 (01:53 +0000)]
Interop: Struct changes to keep up with libhb and passthrough updates. Also fixing a problem where the audio passthrough mask wasn't applied when creating the passthrough codec value.
dynaflash [Fri, 12 Aug 2011 15:21:09 +0000 (15:21 +0000)]
MacGui: Fix borked "When Done" Preference drop down which was inexplicably lost in rev 3757.
- Patch by Rodeo ... thanks!
- Addresses https://reviews.handbrake.fr/r/168/
jstebbins [Mon, 8 Aug 2011 20:24:30 +0000 (20:24 +0000)]
libhb: allow changing colorimetry in x264 options
Setting "colorprim", "transfer", or "colormarix" in the x264 advanced
options will no longer be ignored and will propagate to the mp4 muxer
where those values also get set in the container.
sr55 [Sun, 7 Aug 2011 21:31:14 +0000 (21:31 +0000)]
WinGui: Change the Queue to work in the same way as the Mac/Lin Queue. Retain Completed jobs and mark them as such.
- Added option to clear completed jobs.
- Added option to re-encode a completed/errored job.
- In-progress/Waiting jobs get saved into queue recovery.
sr55 [Sun, 7 Aug 2011 12:54:52 +0000 (12:54 +0000)]
WinGui: Refactored the Automatic Audio Selection so that it is more intuitive. Now, it will use your preferred language for the preset tracks, then add either all additional tracks, or all additional tracks for your selected additional languages. This should avoid any confusion as to why the previous setup as overriding presets.
jstebbins [Wed, 3 Aug 2011 22:17:14 +0000 (22:17 +0000)]
LinGui: fix hud rendering issue
On some display drivers, the rounded corners of the hud would retain
the previous preview image when the preview was changed. This adds
a region mask to compensate for buggy drivers.
jstebbins [Mon, 1 Aug 2011 18:18:52 +0000 (18:18 +0000)]
libhb: fix mis-detection of mov files as mpeg PS
Tightens the mpeg PS detection further to prevent mis-detection
of mov files as mpeg PS. Hopefully doesn't cause faulures to
detect real mpeg PS files.
jstebbins [Mon, 1 Aug 2011 18:06:22 +0000 (18:06 +0000)]
add more audio passthru options
adds aac and mp3 passthru for mp4 and mkv containers
adds dts and dtshd for mp4 container (mkv already had it)
Note: The only player known (to me) to support dts(hd) in mp4 is ff/avplay
In LinGui there is a new option to limit which passthru codecs
will be used by the "Auto Passthru" audio codec options. The CLI
already has this ability with "--audio_copy-mask" which is use
in conjunction with the "copy" audio codec option.
Also corrects some A/V sync issues when video frames are dropped due to
a gap detected in the audio.
jstebbins [Mon, 1 Aug 2011 17:48:28 +0000 (17:48 +0000)]
bump Libav from git-v0.7b2-406-g7b20d35 to release 0.7.1
It includes the following fixes:
- MKV seek issue: http://git.libav.org/?p=libav.git;a=commit;h=c29c609
- crash when decoding corrupt MPEG-2 streams: http://git.libav.org/?p=libav.git;a=commit;h=20153fb
- other misc. fixes: http://git.libav.org/?p=libav.git;a=shortlog;h=refs/heads/release/0.7
It includes the following new feature:
- support for DTS in MP4 and MOV files: http://git.libav.org/?p=libav.git;a=commit;h=26f4875
jstebbins [Mon, 1 Aug 2011 17:14:49 +0000 (17:14 +0000)]
libhb: fix some log spam when scanning h.264 BDs
Some residual data from the previous preview was being sent to the
decoder after a seek causing the decoder to complain.
WinGui: Temporary fix for the audio panel not accepting preset audio tracks due to the Automatic audio options overriding it. This is going to require a bit of thought for a full fix but should restore previous functionality.
WinGui: Small fix to Max Width and Height settings from presets. Presets without both Max width and height set may have a problem when changing source and may not always obey the max width or height.
libhb: fix or simplify several hacks involved with Libav support
For files that are demuxed by Libav, we must share the format context
with the decoder iso that it can obtain the codec context for each stream.
The code that did this was very convoluted and difficult to understand.
It is simplified by simply passing the context in hb_title_t.
Reader was closing stream files before the decoder was finished with the
context. This created the need to delay the actual close and cache
the context. Changed reader so it behaves more like the rest of handbrake's
work objects which lets us explicitly close after the decoders are finished.
Libav does some probing of the file when av_find_stream_info is called.
This probing leaves the format context in a bad state for some files and
causes subsequent reads or seeks to misbehave. So open 2 contexts in
ffmpeg_open. One is used only for probing, and the other only for reading.
decavcodec.c had 2 separate decoders for files demuxed by hb and files
demuxed by Libav. They have been combined and simplified.
Previously, it was not possible to decode one source audio track multiple
times in order to fan it out to multiple output tracks if the file is
demuxed by Libav. We were using the codec context from the format context.
Since there is only one of these for each stream, we could only do one
decode for each stream. Use avcodec_copy_context to make copies of
the codec context and allow multiple decodes. This allows removal of
a lot of special case code for Libav streams that was necessary to
duplicate the output of the decoder.
Patch Libav's mkv demux to fix a seek problem. This has been pushed
upstreams, so the next time we update Libav, we must remove this patch.