Added libhb and CLI support for Dolby Pro Logic II 5.0 matrix encoding. *NOT YET ADDED TO THE GUI*. Handbrake now uses a more general "audio mixdown" concept. For each audio track to be converted you specify a mixdown. These are defined in common.h.
This checkin only allows you to specify one mixdown for all tracks in the CLI, although everything is in place internally to specify a different mixdown per track. In the CLI, the "-6 --surround" option has been repurposed as a "-6 --mixdown" option, with a string parameter of mono/stereo/dpl1/dpl2/6ch.
MacGui: Framerate
- Deprecate "Same as source"
- Use "23.976" as default
- All presets previously using "Same as source" will automatically use "23.976" instead without modification
MacGui: Built In Presets
- Modify both AppleTV and PS3 to use 2500 abr
- Modify PS3 x264 opts to "level=30" only
- as always remember to update your built in presets in the presets menu when updating working copy.
Added a new patch file, to patch liba52 to support a Dolby Pro Logic II matrix encoding. Note: this patch file isn't yet integrated into the Jam process, and the DPLII support in Handbrake isn't yet committed. I've really only committed the patch so that someone kind (Prigaux?) can add it to the Jam process, and therefore patch the precompiled contrib library download.
The changes in this patch are backwards-compatible, i.e. the contrib library download can be updated and used without breaking the current projects.
MacGui: Last source directory used is now remembered and used the next time instead of being reset by browsing for a new destination directory each time.
MacGui: Presets Menu now in Main Menu bar
- New "Update Built-in Presets" function automatically deletes existing built in presets and creates new up to date ones
- New "Delete Built-in Presets" deletes all built in presets
- "New Preset ..." accesses the new preset window
Ooops. Restores xvid-in-mp4 functionality, which I broke with b-frame muxing. (Thanks for the bug report, superdump, and thanks for pointing out where the problem was, saintdev.)
MacGui: x264 options in presets - initial implementation
- x264 options string can be entered in NSTextview in the create new preset window
NOTE:
- When using x264, the gui first looks for a preset with a x264 option string available and then looks for the string in the preferences if it cant find it in the preset. So, if there is a string available in the preset, it ignores the string (if there is one available) in the prefs.
maurj reported a double-free crash that I am unable to reproduce. This removes an extra free that appears to be the problem. Better to leak a little memory than have some users crash.
Amended work.c to remember the number of source A52 channels and lfe channels, so that deca52.c can correctly detect a 5.1 source which needs mixing down to Dolby Digital. Previously it was just mixing 5.1 down to stereo. This has been broken since rev 438, when the multi-soundtrack bug was fixed.
dynaflash [Fri, 30 Mar 2007 15:55:41 +0000 (15:55 +0000)]
MacGui: Chapter Markers Fixes
- Create Chapter Markers checkbox no longer resets to on if you turned it off and it is on in the prefs.
- Chapter markers now are created/not created properly no matter what is checked during consecutive rips.
jbrjake [Fri, 30 Mar 2007 00:50:20 +0000 (00:50 +0000)]
H.264 B-frame muxing for MP4, including B-pyramids. The latter are QuickTime incompatible.
"Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves." -- Alan Kay
dynaflash [Thu, 29 Mar 2007 19:18:25 +0000 (19:18 +0000)]
MacGui: Picture Preview no longer distorts in Anamorphic Mode
- AppleTV Preset will now reset the picture settings to the sources max original output values after initial scan regardless of any changes the user has made.
dynaflash [Wed, 28 Mar 2007 14:20:13 +0000 (14:20 +0000)]
MacGui: Preset refinements
- Added current settings field in main window, uses the preset name if one is chosen and "Custom" if any settings are outside of the selected preset
- Deselects the preset if settings are changed from currently selected preset
- Uses a new method - (IBAction) CustomSettingUsed: (id) sender to make determination via the sender value.
presets use a NULL value to make determination
- Currently, changing Picture Settings DOES NOT trigger the display change. Still sorting through those conditionals.
maurj [Tue, 27 Mar 2007 22:09:28 +0000 (22:09 +0000)]
Removed saintdev's CLI patch to test.c to default the abitrate to 384 when no abitrate is provided on the commandline and the -6 (surround) option is passed in. The problem with this approach is that a bitrate of 384 is then used regardless of whether 5.1 extraction is actually used for the extraction (this isn't decided till work.c, which checks the channel config of the source audio tracks). Moreover, this causes a segmentation fault when using the OGM file format and extracting a 1.0 audio track from a DVD with the -6 option passed in, as vorbis_encode_setup_managed in encvorbis.c won't accept a bitrate of 384 for a 1-channel track.
maurj [Tue, 27 Mar 2007 21:28:40 +0000 (21:28 +0000)]
Amended the code comments about 6-channel and 1-channel audio extraction to reflect that it's no longer just for AAC, following saintdev's addition of 6-ch and 1-ch for OGM.
dynaflash [Tue, 27 Mar 2007 14:47:14 +0000 (14:47 +0000)]
MacGui: re-fix bug where changing the destination field would reset the settings to default
- this bug was unintentionally re-introduced in an earlier svn rev
dynaflash [Sun, 25 Mar 2007 05:23:05 +0000 (05:23 +0000)]
MacGui: Re-enable custom user presets.
- were previously disabled in svn rev 441
- Fixed the hang in the add preset window caused by a bad sortselector
dynaflash [Fri, 23 Mar 2007 19:33:38 +0000 (19:33 +0000)]
MacGui: Create Chapter Markers implemented in gui.
- Checkbox is only available when format is MP4
- Does not force an .m4v file extension at this time
- Add built in presets initial implementation
- built in presets still needs to be finalized and refined
- Caused a bug in creating custom presets (see NOTE below)
NOTE: this rev has the add preset button non-functional as some user preset changes have been made but not finished and the add preset window currently hangs.
As rev 440 states, you still need to use ./configure then ./jam to build contribs. jam will report a failed build, but then just use "make internal" and it will build successfully.
We still need priaux or someone to compile maurj's changes to contribs.
maurj [Fri, 23 Mar 2007 16:08:12 +0000 (16:08 +0000)]
Added chapter markers in a chapter text track in mp4 files.
This option is turned off by default. It can be turned on in the CLI by specifying a "-m" or "--markers" option. it is not yet enabled as an option in the Mac GUI.
These chapter tracks are only detected by QuickTime if the file extension is .m4v. If the extension is .mp4, the chapter text track is ignored.
To this end, I have made test.c detect .m4v as a file extension for mp4 too.
This change has required a substantial change to the mp4v2 library patch. Until the precompiled contrib binaries are updated by Prigaux, try doing "./configure" and then "./jam" (which will build the native contribs, but fail to build UB versions of the apps), and then try "make internal" to compile a native version of the apps.
maurj [Wed, 21 Mar 2007 10:09:23 +0000 (10:09 +0000)]
Applied and committed saintdev's patch to fix multi-track audio. Only in the CLI for now - the GUI will need updating to reinstate the second audio dropdown.
If the -6 option is specified in the CLI (and faac is specified), then *any* 5.1 tracks specified will be exported as 6-channel AAC.
jbrjake [Sun, 18 Mar 2007 15:26:01 +0000 (15:26 +0000)]
Reverts an hb_snooze call's length from 200 to 50, like titer intended it. Should be slightly faster (maybe 1 fps), hopefully might fix some other random problems. It's located in the part of muxcommon.c that waits til the audio and video buffers are full before muxing packets. If the buffers aren't full, it snoozes. So I think it gets run 1 or more times for every frame. The snooze value got altered back in revision 98.
dynaflash [Wed, 14 Mar 2007 18:02:56 +0000 (18:02 +0000)]
MacGui: Introduce Auto Naming
- Auto Naming checkbox in Preferences (default to Off)
- If "ON" uses the DVD Name and "- Title Number" as the file output name.
- Called in -TitlePopupChanged function.
dynaflash [Wed, 14 Mar 2007 15:03:55 +0000 (15:03 +0000)]
MacGui: Fix Preset Selection Crash
- Presets no longer crash HB if selected during rip or if dvd source scan is cancelled.
- Since cannot disable NSTableCell Selection used an if statement for presetAdd button isEnabled.
dynaflash [Tue, 13 Mar 2007 17:31:14 +0000 (17:31 +0000)]
MacGui: Destination File Browse Window
- Use current path from the destination field in main window instead of last browsed path which could have been from a dvd source browse
- Use current output file name in the file save field instead of leaving it blank.
jbrjake [Sun, 11 Mar 2007 01:51:51 +0000 (01:51 +0000)]
MacGui: Patch from Thinine: For x264 options, use UTF8String instead of CString, and avoid a string duplication. (Thanks for cleaning up my mess, Thinine!)
johnallen [Sun, 14 Jan 2007 02:03:37 +0000 (02:03 +0000)]
added call to av_log_set_level in hb_init_real based on value of verbose param.
makes ffmpeg debbuging level the same as ours.
will be useful while finding the memory leak issue.
johnallen [Sun, 14 Jan 2007 01:26:22 +0000 (01:26 +0000)]
barber pole progress bar is shown during the "muxing" phase and no longer show 0.0%. applies to both HB and IHB
When we can figure out how to get a percent complete, we can use that.
IHB now uses same app icon as HB. Probably want to change the actual icon, but I wanted IHB to make use of the dock progress bar like in HB.
benlake [Wed, 10 Jan 2007 11:25:18 +0000 (11:25 +0000)]
- OSX GUI: the [Enable Queue] checkbox was not disabled by default. A user could click Cancel on the Open DVD menu, enable the queue, click Add to Queue and crash HandBrake. Also, it annoyed me being the only thing enabled :)
dynaflash [Mon, 8 Jan 2007 17:06:39 +0000 (17:06 +0000)]
Revert HB mac gui to m0k layout for impending 0.7.2 release.
Note: pri's language default combobox is also gone in this reversion for the preferences window. However, the underlying code for it is still retained in controller.mm.
johnallen [Mon, 8 Jan 2007 03:18:40 +0000 (03:18 +0000)]
added worker thread sleep throttling.
each of the work object threads now self adjust their sleep interval based on the "fullness" of their fifo.
80% is the choose threshold.
Work objects with a fifo fullness of greater than 80% increase their sleep interval.
This allows other work object with less than 80% fullness more CPU usage.
Also adjusted thread_func, reader, and muxer sleep intervals to more reasonable values.
johnallen [Sun, 7 Jan 2007 15:34:07 +0000 (15:34 +0000)]
added HB_STATE_MUXING to hb_state_s and corresponding structure.
this state indicates the transition from the end of HB_STATE_WORKING to the beginning of HB_STATE_WORKDONE.
This state can take as long a 10 minutes on a long conversion.
The associated working structure contains a progress float.
Once we determine how to get a proper progress from the call to av_write_trailer in libavformat, we can update this progress.
HB, IHB, and HBTest are now using using HB_STATE_MUXING to provided feedback to the user.