[Patch] [MacGUI] faac 6-channel minimum and maximum bitrates

Archive of historical development discussions
Discussions / Development has moved to GitHub
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
Deleted User 11865

[Patch] [MacGUI] faac 6-channel minimum and maximum bitrates

Post by Deleted User 11865 »

Currently, the MacGUI will let you select any bitrate between 32 and 384 Kbps when using faac with a 6-channel discrete mixdown.

I've noticed that faac seems to have a minimum bitrate of 192 Kbps for 6-channel discrete:

http://forum.handbrake.fr/viewtopic.php?f=11&t=12698

4-minute sample from LOTR 1, faac 6-channel discrete, requested bitrate: 32 Kbps

Code: Select all

HandBrake Activity Log for /Users/tim/Desktop/LOTR faac 6-channel 32 Kbps.mp4: 2009-11-06 00:28:32 +0100
Handbrake Version: svn2907 x86_64 (2009110101)

[00:28:32] macgui: Rip: Pending queue count is 2
[00:28:32] macgui: scanning specifically for title: 1
[00:28:32] macgui: performNewQueueScan currentQueueEncodeIndex is: 0
[00:28:32] hb_scan: path=/Volumes/LaCieDisk/excluded/Videos & Movies/Test Clips/DVD/LOTR.mkv, title_index=1
[00:28:32] scan: trying to open with libdvdread
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Using libdvdcss version 1.2.10 for DVD access
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[00:28:32] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska, from '/Volumes/LaCieDisk/excluded/Videos & Movies/Test Clips/DVD/LOTR.mkv':
  Duration: 00:03:59.52, start: 0.000000, bitrate: 8500 kb/s
    Stream #0.0: Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9], 8500 kb/s, 25 tbr, 1k tbn, 50 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16
    Stream #0.2(fre): Audio: ac3, 48000 Hz, 5.1, s16
[00:28:32] scan: decoding previews for title 1
[00:28:32] scan: audio 0x1: AC-3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)
[00:28:32] scan: audio 0x2: AC-3, rate=48000Hz, bitrate=448000 Francais (AC3) (5.1 ch)
[00:28:33] scan: 30 previews, 720x576, 25.000 fps, autocrop = 74/76/0/0, aspect 16:9, PAR 64:45
[00:28:33] scan: title (0) job->width:720, job->height:304
[00:28:33] libhb: scan thread found 1 valid title(s)
[00:28:33] macgui: ScanDone state received from fQueueEncodeLibhb
[00:28:33] macgui: Preset: Custom
[00:28:33] macgui: processNewQueueEncode number of passes expected is: 1
[00:28:33] macgui: prepareJob exiting
[00:28:33] 1 job(s) to process
[00:28:33] starting job
[00:28:33] job configuration:
[00:28:33]  * source
[00:28:33]    + /Volumes/LaCieDisk/excluded/Videos & Movies/Test Clips/DVD/LOTR.mkv
[00:28:33]    + title 1, chapter(s) 1 to 1
[00:28:33]    + container: matroska
[00:28:33]    + data rate: 8500 kbps
[00:28:33]  * destination
[00:28:33]    + /Users/tim/Desktop/LOTR faac 6-channel 32 Kbps.mp4
[00:28:33]    + container: MPEG-4 (.mp4 and .m4v)
[00:28:33]  * video track
[00:28:33]    + decoder: mpeg2video
[00:28:33]      + bitrate 8500 kbps
[00:28:33]    + frame rate: same as source (around 25.000 fps)
[00:28:33]    + strict anamorphic
[00:28:33]      + modulus: 0
[00:28:33]      + storage dimensions: 720 * 576 -> 720 * 426, crop 74/76/0/0
[00:28:33]      + pixel aspect ratio: 64 / 45
[00:28:33]      + display dimensions: 1024 * 426
[00:28:33]    + encoder: FFmpeg
[00:28:33]      + quality: 14.00 (QP)
[00:28:33]  * audio track 0
[00:28:33]    + decoder: English (AC3) (5.1 ch) (track 1, id 1)
[00:28:33]      + bitrate: 448 kbps, samplerate: 48000 Hz
[00:28:33]    + mixdown: 6-channel discrete
[00:28:33]    + encoder: faac
[00:28:33]      + bitrate: 32 kbps, samplerate: 48000 Hz
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Using libdvdcss version 1.2.10 for DVD access
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[00:28:33] dvd: not a dvd - trying as a stream/file instead
[00:28:33] encavcodec: encoding at constant quantizer 1652
[00:28:33] encavcodec: encoding with stored aspect 64/45
[NULL @ 0x1038e5400]insufficient thread locking around avcodec_open/close()
No accelerated IMDCT transform found
[00:28:33] sync: expecting 6013 video frames
[00:28:33] reader: first SCR 0 id 0 DTS -3600
[00:29:19] reader: done. 1 scr changes
[00:29:19] sync: got 5987 frames, 6013 expected
[00:29:19] work: average encoding speed for job is 131.032028 fps
[00:29:19] mux: track 0, 5987 frames, 12873308 bytes, 429.97 kbps, fifo 64
[00:29:19] mux: track 1, 11227 frames, 5761046 bytes, 192.42 kbps, fifo 64
[00:29:19] mpeg2video-decoder done: 5988 frames, 0 decoder errors, 0 drops
[00:29:19] render: lost time: 0 (0 frames)
[00:29:19] render: gained time: 0 (0 frames) (0 not accounted for)
[00:29:19] libhb: work result = 0
4-minute sample from LOTR 1, faac 6-channel discrete, requested bitrate: 160 Kbps

Code: Select all

HandBrake Activity Log for /Users/tim/Desktop/LOTR faac 6-channel 160 Kbps.mp4: 2009-11-06 00:29:20 +0100
Handbrake Version: svn2907 x86_64 (2009110101)

[00:29:20] macgui: incrementQueueItemDone currentQueueEncodeIndex is incremented to: 1
[00:29:20] macgui: incrementQueueItemDone currentQueueEncodeIndex is incremented to: 1
[00:29:20] macgui: scanning specifically for title: 1
[00:29:20] macgui: performNewQueueScan currentQueueEncodeIndex is: 1
[00:29:20] hb_scan: path=/Volumes/LaCieDisk/excluded/Videos & Movies/Test Clips/DVD/LOTR.mkv, title_index=1
[00:29:20] scan: trying to open with libdvdread
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Using libdvdcss version 1.2.10 for DVD access
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[00:29:20] dvd: not a dvd - trying as a stream/file instead
    Last message repeated 48 times
Input #0, matroska, from '/Volumes/LaCieDisk/excluded/Videos & Movies/Test Clips/DVD/LOTR.mkv':
  Duration: 00:03:59.52, start: 0.000000, bitrate: 8500 kb/s
    Stream #0.0: Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9], 8500 kb/s, 25 tbr, 1k tbn, 50 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16
    Stream #0.2(fre): Audio: ac3, 48000 Hz, 5.1, s16
[00:29:20] scan: decoding previews for title 1
[00:29:20] scan: audio 0x1: AC-3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)
[00:29:20] scan: audio 0x2: AC-3, rate=48000Hz, bitrate=448000 Francais (AC3) (5.1 ch)
[00:29:20] scan: 30 previews, 720x576, 25.000 fps, autocrop = 74/76/0/0, aspect 16:9, PAR 64:45
[00:29:20] scan: title (0) job->width:720, job->height:304
[00:29:20] libhb: scan thread found 1 valid title(s)
[00:29:21] macgui: ScanDone state received from fQueueEncodeLibhb
[00:29:21] macgui: Preset: Custom
[00:29:21] macgui: processNewQueueEncode number of passes expected is: 1
[00:29:21] macgui: prepareJob exiting
[00:29:21] 1 job(s) to process
[00:29:21] starting job
[00:29:21] job configuration:
[00:29:21]  * source
[00:29:21]    + /Volumes/LaCieDisk/excluded/Videos & Movies/Test Clips/DVD/LOTR.mkv
[00:29:21]    + title 1, chapter(s) 1 to 1
[00:29:21]    + container: matroska
[00:29:21]    + data rate: 8500 kbps
[00:29:21]  * destination
[00:29:21]    + /Users/tim/Desktop/LOTR faac 6-channel 160 Kbps.mp4
[00:29:21]    + container: MPEG-4 (.mp4 and .m4v)
[00:29:21]  * video track
[00:29:21]    + decoder: mpeg2video
[00:29:21]      + bitrate 8500 kbps
[00:29:21]    + frame rate: same as source (around 25.000 fps)
[00:29:21]    + strict anamorphic
[00:29:21]      + modulus: 0
[00:29:21]      + storage dimensions: 720 * 576 -> 720 * 426, crop 74/76/0/0
[00:29:21]      + pixel aspect ratio: 64 / 45
[00:29:21]      + display dimensions: 1024 * 426
[00:29:21]    + encoder: FFmpeg
[00:29:21]      + quality: 14.00 (QP)
[00:29:21]  * audio track 0
[00:29:21]    + decoder: English (AC3) (5.1 ch) (track 1, id 1)
[00:29:21]      + bitrate: 448 kbps, samplerate: 48000 Hz
[00:29:21]    + mixdown: 6-channel discrete
[00:29:21]    + encoder: faac
[00:29:21]      + bitrate: 160 kbps, samplerate: 48000 Hz
[00:29:21] encavcodec: encoding at constant quantizer 1652
[00:29:21] encavcodec: encoding with stored aspect 64/45
No accelerated IMDCT transform found
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Using libdvdcss version 1.2.10 for DVD access
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[00:29:21] dvd: not a dvd - trying as a stream/file instead
[00:29:21] reader: first SCR 0 id 0 DTS -3600
[00:29:21] sync: expecting 6013 video frames
[00:30:06] reader: done. 1 scr changes
[00:30:07] sync: got 5987 frames, 6013 expected
[00:30:07] work: average encoding speed for job is 130.760696 fps
[00:30:07] mux: track 0, 5987 frames, 12873308 bytes, 429.97 kbps, fifo 64
[00:30:07] mux: track 1, 11227 frames, 5761046 bytes, 192.42 kbps, fifo 64
[00:30:07] mpeg2video-decoder done: 5988 frames, 0 decoder errors, 0 drops
[00:30:07] render: lost time: 0 (0 frames)
[00:30:07] render: gained time: 0 (0 frames) (0 not accounted for)
[00:30:07] libhb: work result = 0
Note that both encodes end up with 192 Kbps audio instead:

Code: Select all

[00:29:19] mux: track 1, 11227 frames, 5761046 bytes, 192.42 kbps, fifo 64

Code: Select all

[00:30:07] mux: track 1, 11227 frames, 5761046 bytes, 192.42 kbps, fifo 64
This patch: http://handbrake.fr/pastebin/pastebin.php?show=975 sets the minimum bitrate for 6-channel faac to 192 Kbps, and the maximum to 448 Kbps like in the LinGUI
User avatar
JohnAStebbins
HandBrake Team
Posts: 5722
Joined: Sat Feb 09, 2008 7:21 pm

Re: [Patch] [MacGUI] faac 6-channel minimum and maximum bitrates

Post by JohnAStebbins »

I almost forgot about this. Thanks for the reminder Rodeo.
dynaflash
Veteran User
Posts: 3820
Joined: Thu Nov 02, 2006 8:19 pm

Re: [Patch] [MacGUI] faac 6-channel minimum and maximum bitrates

Post by dynaflash »

Patch committed as http://trac.handbrake.fr/changeset/2942
Thanks Rodeo!
Post Reply