Profile audio settings, incorrect sound options selected

(Zhulick) #1

I’m having a weird sound problem, where the sound values being passed to the handbrake CLI don’t match the profile settings.

Here is the profile.
[HEVC MKV - HB x265 10bit Q21med AC3 640]
Description=HEVC in MKV (H.265/AC3) conversion. Creates a smaller file (50% smaller than H.264) with comparable quality but very slow.
order=handbrake
handbrake-VideoOptimized=true
handbrake-general=–loose-anamorphic --verbose=2
handbrake-video=–start-at duration:0 -e x265_10bit --encoder-preset medium -q 21 --encoder-profile main10 --cfr
handbrake-audio=-E ffac3 -R auto -B 192 -D 0 -a 1,2,3,4,5
handbrake-audioac3=-E ffac3 -R auto -B 640 -D 0 -a 1,2,3,4,5
handbrake-ext=.mkv
handbrake-audiodelay=skip
PreConversionCommercialRemover=false

This is what i see mcebuddy passing to cli in the log.

–loose-anamorphic --verbose=2 --start-at duration:0 -e x265_10bit --encoder-preset medium -q 21 --encoder-profile main10 --cfr -E ffac3 -R auto -B 192 -D 0 -a 1 -6 6ch

I have multi channel audio checked, so ac3 is enabled, and it looks like the 6ch flag is there and set properly, but the bitrate value is passed from 2channel. I have tried it with a variety of values, and basically - the 2channel bitrate is passed to the cli while the ac3 bitrate is ignored completely.

So, this with multichannel audio enabled
handbrake-audio=-E ffac3 -R auto -B 640 -D 0 -a 1,2,3,4,5
handbrake-audioac3=-E ffac3 -R auto -B 129 -D 0 -a 1,2,3,4,5

will produce ac3 6channel track at 640. The -B passed to the cli shows to be 640. Changing the ac3 value makes no difference, it seems to be ignored.

The strange thing is that i’ve been running this profile successfully for the last couple of weeks without this type of wackiness. I played with various settings for quality and size to find that sweet spot, and never had issues with all conversions coming out as expected. I’m using it to shrink bluray remuxes, and must’ve ran a good 50 or so successful conversions while playing with bitrate, quality etc.

I did a lot of experimenting in the last few days, so either i somehow jammed a wrong preset as a default in handbrake or ffmpeg, or… i don’t know. I did upgrade to the latest 4.11 stable and did a clean uninstall/reinstall (including hb cli) to make sure i flush everything, but the problem persists.

I also tried ffmpeg, but it immediately crapped itself on 7.1 audio. 2channel worked as expected for both 8 and 10bit x265.

(Zhulick) #2

played around with ffmpeg some more - same problem.

ffmpeg-audio=-acodec ac3 -ab 256k -map 0:a
ffmpeg-audioac3=-acodec ac3 -ab 640k -map 0:a

chokes, and errors out. Log shows wrong bitrate -ab256 and -ac 8 being passed to ffmpeg, which ac3 cannot handle.

ffmpeg-audio=-acodec ac3 -ab 256k -map 0:a
ffmpeg-audioac3=-acodec ac3 -ab 640k -map 0:a -ac 6

same thing. still 256 and -ac 8 in the command line.

ffmpeg-audio=-acodec ac3 -ab 640k -map 0:a -ac 6
ffmpeg-audioac3=-acodec ac3 -ab 640k -map 0:a

works.

(RBoy) #3

Conversion log please

(Zhulick) #4

sent.

[HEVC MKV - HB x265 10bit Q21med AC3 640 movie test]
Description=HEVC in MKV (H.265/AC3) conversion. Creates a smaller file (50% smaller than H.264) with comparable quality but very slow.
order=handbrake
handbrake-general=–loose-anamorphic --verbose=2
handbrake-video=–start-at duration:0 --encoder x265_10bit --encoder-preset fast -q 30 --encoder-profile main10 --cfr
handbrake-audio=-E eac3 -R auto -B 192 -D 0 -a 1,2,3,4,5
handbrake-audioac3=-E eac3 -R auto -B 640 -D 0 -a 1,2,3,4,5
handbrake-ext=.mkv
handbrake-audiodelay=skip
PreConversionCommercialRemover=false

used this just to get it through fast, but ended up killing the job almost instantly.

–loose-anamorphic --verbose=2 --start-at duration:0 --encoder x265_10bit --encoder-preset fast -q 30 --encoder-profile main10 --cfr --crop 0:0:0:0 -E eac3 -R auto -B 192 -D 0 -a 1,2,3,4,5 -6 6ch

is what the log shows as being passed to the cli.

INFORMATION> 2019-06-09T00:59:13 MCEBuddy.Transcode.ConvertWithHandbrake --> Setting up audio conversion parameters : -E eac3 -R auto -B 192 -D 0 -a 1,2,3,4,5

it seems to recognize the check mark for multi channel audio, but reads the bitrate from the wrong line.

[HEVC MKV - HB x265 10bit Q21med AC3 640 movie test]
Description=HEVC in MKV (H.265/AC3) conversion. Creates a smaller file (50% smaller than H.264) with comparable quality but very slow.
order=handbrake
handbrake-general=–loose-anamorphic --verbose=2
handbrake-video=–start-at duration:0 --encoder x265_10bit --encoder-preset fast -q 30 --encoder-profile main10 --cfr
handbrake-audio=-E eac3 -R auto -B 488 -D 0 -a 1,2,3,4,5
handbrake-audioac3=-E eac3 -R auto -B 640 -D 0 -a 1,2,3,4,5
handbrake-ext=.mkv
handbrake-audiodelay=skip
PreConversionCommercialRemover=false

produces this.

–loose-anamorphic --verbose=2 --start-at duration:0 --encoder x265_10bit --encoder-preset fast -q 30 --encoder-profile main10 --cfr --crop 0:0:0:0 -E eac3 -R auto -B 488 -D 0 -a 1,2,3,4,5 -6 6ch

and

INFORMATION> 2019-06-09T01:14:47 MCEBuddy.Transcode.ConvertWithHandbrake --> Setting up audio conversion parameters : -E eac3 -R auto -B 488 -D 0 -a 1,2,3,4,5

1 Like
(RBoy) #5

Your file has dts audio and not ac3 audio

Audio codec -> dts

According to the documentation the <encoder>-audioac3 settings are used when the original file contains an ac3 audio track. Since it isn’t an ac3 audio track, it’s using the <encoder>-audio line from the profile.

(Zhulick) #6

ok, that makes sense.

Was under impression that it was a “catch all” setting for surround. So, multichannel not set gives you settings for stereo from handbrake-audio, and set gives you settings you want to pass to handbrake for surround from the handbrake-audioac3. I didn’t realize that it matters that the track is actually ac3.

ok, so… Since my audio was not ac3, what’s setting the -6 6ch flag, is it handbrake defaulting or is it passed from the gui ? If the audio is not ac3, does the multichannel check box do anything ?

(RBoy) #7

The multi channel audio option is used to preserve a multi channel audio track (irrespective of the audio codec used), if it’s disabled then the audio is downmixed to stereo.