dynaflash [Thu, 19 May 2011 19:21:43 +0000 (19:21 +0000)]
Macgui: libhb, MacGUI: reflect the fact that DRC only applies to non-passthru AC3 sources
- As per https://reviews.handbrake.fr/r/74/
-Patch by Rodeo, Thanks.
sr55 [Sat, 14 May 2011 14:46:16 +0000 (14:46 +0000)]
WinGui:
- Removed the Question Alert box when adding an item to the queue where the destination folder does not exist. The folder is automatically created before encode anyway, so no point in asking the user pre-Encode.cs
- Better error handling in the encode service.
sr55 [Sun, 8 May 2011 11:00:16 +0000 (11:00 +0000)]
WinGui:
- Add Elapsed Encode Time the main window.
- Add Elapsed Queue Time to the queue window. (Note, Pausing the queue resets this currently)
- Fixed an issue with disabled controls on the audio panel after removing the last track which was passthru.
WinGui:
- Fix to the Audio Panel Track Display which was intermittently not showing a track.
- Fixed a number of bugs in the plist parser which was prevent imports.
- Fixed a number of Issues with the Preset Import/Export.
WinGui:
- Fix an issue where the user could overwrite a built-in preset.
- Fix some more audio issues in relation to incorrect bitrate and sample rate being selected.
MacGui: Save picture settings by default when creating a new preset.
- Use Custom (defaulted to current picture size).
- Use currently selected Filters.
- Note this is by default. All choices are still the same
- As per https://reviews.handbrake.fr/r/82/
fix screaching at the beginning of some ac3 to X transcodes
a52dec isn't completely thread safe. It has a collection of
static data that gets initialized when a52_init is called.
This static data gets initialized to the same thing every time,
but if one instance of the decoder is using the data when
it gets reinitialized, bad(tm) things happen.
libhb: don't use deprecated elements of the FFmpeg/Libav API
HandBrake uses many attributes of the FFmpeg API that are were deprecated
when we did the last bump. Many of them no longer exist in current
FFmpeg/Libav git, or are going to be removed soon.
Replaces them with non-deprecated attributes that already exist in the
build we currently use.
Thanks to Rodeo for the patch.
Fix a crash that can happen due to corrupt mpeg2 data
The mpe2dec can return nonsense values for width and height that
make sws_getContext fail. So check the context return value and
just drop the buffer if it fails.
Fix a problem with overlapping vobsubs
Since we now allow subtitles that overlap in time, it is no longer
appropriate to arbitrarily set the duration to 3 seconds when vobsubs
don't have an explicit stop time. This causes them to overlap on the display.
So now, we set the stop time for such vobsubs to -1. Then in sync adjust the
stop time to the start of the next vobsub when it is seen.
Make order of audio tracks found in PS streams more predictable
Since PS streams don't have a directory of streams, we find them by
scanning the PES headers for stream types. We were adding them in the
order found which is pretty random. This sorts audios by substream id.
Fix a problem when encoding the same source audio track twice from BD sources
The pid and substream were being added to the TS stream list twice which
caused 2 copies of each packet to be returned to reader. This caused sync
to drop every second packet with "time went backwards" log message.
MacGui: Simplify HBDVDDetector bsdName creation
- Instead of lazily populating bsdName identically in two places, why not just have its accessor do it.
- As per patch provided by blindjimmy https://reviews.handbrake.fr/r/78/
fix stall due due to propagation of incorrect audio timestamp
Was passing AV_NOPTS_VALUE that is generated by libav. Needed to
translate to -1 which is what we use to designate invalid timestamps.
Change scale factor for timestamp offset in vobsub commands
Testing shows that this should be 1024 instead of 900.
Thanks to Rodeo for validation and patch.
WinGui:
- Multiple bug fixes to the Audio Panel. (Disable DRC for non AC3 sources, DPL2 getting swaped out for stereo when you click between tracks, Exception thrown due to the source track not getting pushed into the Audio model before it's used.)
Add support for TrueHD and DTS-HD from BD sources
TrueHD and DTS-HD now show up in the audio list along side their
AC-3 and DTS counterparts.
Note that currently the DTS-HD decoder we are using (ffmpeg) discards
the HD portion of the stream and onle decodes the DTS core portion. So
there is no advantage yet to using the DTS-HD stream. In the future
I would like to add DTS-HD passthru support and hopefully ffmpeg will
improve their DTS-HD decoder.
WinGui:
- Save Filter settings in presets by default. Seems to be common mistake.
- Set the AcceptButton property on a few windows so they react properly to keyboard commands.
WinGui:
- Switching Audio Selection dropdown to be databound. Added The scanned source track to the Audio Track model.
- Added new Move to Top / Bottom options on the right click.
- Further UI tweaks and fixes.
Fix int overflow that can happen when computing PAR
If the source has large non-reduced PAR values, our computed value
was overflowing an int. Compute it in an int64_t then reduce it.
Also, keep num and den below 65535. Larger values just aren't really
significant and will cause more overflow issues.
MacGui: implement Frame Rate Mode as per the Lingui.
- Removes the current Peak Framerate checkbox and replaces it with appropriate Radio Buttons depending on if Same as Source or a specific framerate is chosen in the Frame Rate popup widget.
- Gets the macgui up to speed with https://trac.handbrake.fr/changeset/3770
WinGui:
- Added "Advanced" audio options floating popup window.
* This exposes a new Audio Gain Control (-20 to +20 dB)
- Added support for (--gain=x,y,z) to the preset Loader.
WinGui:
- Add "Send to" option. This will pass the encoded output file name of each completed job on the queue to a 3rd party application with optional arguments passed.
Change HB.version from "svnXXXX" to "XXXXsvn"
This fixes an issue with packaging for Ubuntu 11.04. The packaging tool
now requires that version numbers start with a digit. They used to just
issue a warning.
Each clip of a BD are allowed to have different audios if the clip
does not have a seamless connection to the previous clip. Most titles
are a series of seamless clips that all have the exact same audio. But
I found some that have a final non-seamless clip that has completely
different audios and broke the old algorithm.
New algorithm, look at each clip and count the number of other clips have
the same audio. Use the clip that has the most matches.
Fix a deadlock that can happen with p-to-p encoding
With p-to-p, the audio sync thread waits for the video sync thread to
reach the designated start point. There is a possibility that the video
decoder will drop so many frames that the audio sync fifo fills before
any frames reach the video sync thread. When this happens, drop some
audio to unplug the pipeline.
Also, to make this less likely to happen, start sending data to the video
decoder 2 seconds before the actual desired start point. This will allow
the decoder to find an initial i-frame before the audio stalls since the
audio sync thread drops any audio that is before the designated start point.
A side effect of this is our start time now more accurate since the decoder
is only dropping frames before the start point instead of after.
WinGui:
- Fix a culture issue with user settings (x264)
- Made the Preset loader more strict with what settings it can and can't load with regards to video settings.
These boundaries are always discontinuities. But sometimes we were
not detecting them as such and would drop frames. So set a flag
in the buffer when libbluray tells us a new clip is starting and
use that to trigger computation of a new scr offset.
WinGui: AudioPanel refactored.
- Switch the Audio panel to use DataBinding to a BindingList collection leading to much cleaner code.
- Added gain support (--gain=3,4) to the services library. (UI has not been done yet)
Use bibiliographic form of ISO-639-2 lang codes in muxmkv
The Mkvtoolnix developer claims that MKV only allows the bibliographic form
of ISO-639-2 lang codes: https://www.bunkus.org/bugzilla/show_bug.cgi?id=598
http://matroska.org/technical/specs/index.html#languages seems to confirm this.
Change internal audio representation range
...from float [-32768...32767] to float [-1.0...1.0]
Using the range [-1.0..1.0] requires fewer translations of the range for our
various encoders and decoders. This also gets rid of a hacky
translation from float to int to float in decavcodec audio decoding.
Fix dts downmix when the output encoder is lame
libdca downmix is broken if you ask for dolby and DCA_ADJUST_LEVEL.
Since we fixed the clipping problem that DCA_ADJUST_LEVEL is used for
with changeset 3294, we can just disable this.
LinGui: add audio gain adjustment and create advanced audio dialog.
Gain, DRC, and Sample Rate are now in an advanced audio dialog.
This makes the audio tab less crowded and makes room for future
improvements.
Add audio gain adjustment to libhb and CLI
New CLI option is --gain <float>. Value is measured in dB. Negative values are
quieter, positive values are louder.
Start mkv clusters with a video keyframe whenever possible
libmkv now starts a new cluster whever there is a video keyframe if
the new cluster would not be closer than 2 seconds to the previous cluster.
Fix the volume output level of our dts decoder
dcadec returns samples that have values in the range -1.0 to 1.0.
We need these to be converted to the range -32768 to 32767. For some
reason, decdca was scaling by 16768 instead of 32767. This has been
like this since dts support was initially added by maurj.
Make logging of audio and subtitle id's more consistant
1) whenever we log audio->id or subtitle->id using hex formatting, precede
the hex with 0x (which was already done in some places but not others)
2) format audio->id as hex instead of decimal in sync.c (makes it much easier
to see which track "went backwards" or had silence added to it, checking
the job configuration logged by work.c)
Shorten instead of dropping overlapping subtitles in mp4
If the non-overlaping remainder is greater than 0.5 seconds, shorten
the subtitle instead of completely dropping it.
Flush ffmpeg codec buffers after every seek.
According to several e-mails I've read on ffmpeg-devel, avcodec_flush_buffers
should be called after any seek. It appears this is even more critical to do
when using frame based multi-threading. I don't see any immediate difference
in functionality by adding this, but it may prevent surprises in the future.
Forome reason, frames that are tagged as recovery points in many BD h.264
streams do not result in complete frames when decoded. Pushing 2 extra
frames through the decoder seems to always fix this. This patch extends
something I was already doing when generating previews from a BD structure.
This just applies the same logic to ffmpeg streams that have h.264 video.
jstebbins [Thu, 31 Mar 2011 00:05:23 +0000 (00:05 +0000)]
True SSA passthru for MKV.
We were converting SSA to UTF8 subs which looses a lot of formatting.
Now we pass through the ssa unmodified and add all fonts as attachments
to the mkv.
davidfstr [Wed, 30 Mar 2011 02:50:42 +0000 (02:50 +0000)]
MP4 muxer ignores all but the first of overlapping UTF-8 subtitles.
This is necessary because MP4 does not support overlapping subtitles. Attempting to use overlapping subtitles causes the display of subsequent subtitles to be delayed incorrectly.
Subsequent patches may merge UTF-8 subtitles (upstream) so that this case does not occur.
jstebbins [Tue, 29 Mar 2011 22:43:07 +0000 (22:43 +0000)]
Fix chapter passthru problems with some files.
If the video stream is not the first track in the file, chapters were lost.
During scan, we identify which track is video and stash this in title.
While reading, when a chapter is found we want to tag the next video buffer.
But the video track id stored in the title was not being applied when
opening the file for reading, so the chapter mark always went on track id 0.
dynaflash [Tue, 29 Mar 2011 17:55:25 +0000 (17:55 +0000)]
MacGui: Never disable the chapter markers checkbox.
Patch by Rodeo ... Thanks!
- Discussed here https://reviews.handbrake.fr/r/58/
This allows users to enable/disable chapter markers regardless of whether the source has chapters, which is very useful when saving a preset.
This will not cause chapter markers to be inserted if we only have one chapter, as this is sanitized twice:
- once in macosx/Controller.m, in createQueueFileItem
- once in libhb/work.c, in do_job()
In autoSetM4vExtension, update the condition for chapter markers being on or off, since we can no longer rely on the checkbox being enabled/disabled.
jstebbins [Mon, 28 Mar 2011 17:47:21 +0000 (17:47 +0000)]
Fix problem with qt7 playback of mpeg4 video
The reference frames were not being tagged correctly during muxing
which really screwes up qt7 but appears to have little effect on qtx
or other players.