How to select 5.1 audio over stereo?

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
mrjayviper
Posts: 13
Joined: Sun Jul 29, 2012 9:26 am

How to select 5.1 audio over stereo?

Post by mrjayviper » Mon May 14, 2018 11:58 pm

Description of problem or question:
TLDR: Video has 2 audio streams of the same language. Stereo is the first stream. Second is the 5.1. I want to automatically select the 5.1 stream.
---------------
I have setup "selection behavior" to what is shown in the screenshot but the stereo stream is the one getting selected. Any ideas what I could be doing wrong?

Please see this link for audio selection screenshot: https://i.imgur.com/Fm7T6PD.png

ps. I tried using the img tag but it's not showing the image.

HandBrake version (e.g., 1.0.0):

I'm using Handbrake 1.1.10

Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):

Windows 10 with all updates before April 2018


HandBrake Activity Log ***required*** (see How-to get an activity log)

Code: Select all

HandBrake 1.1.0 (2018040700) - 64bit
OS: Microsoft Windows NT 10.0.16299.0 - 64bit
CPU: Intel(R) Xeon(R) CPU E5-2650L 0 @ 1.80GHz
Ram: 65457 MB, 
GPU Information:
  NVIDIA GeForce GTX 770 - 23.21.13.8813
Screen: 1920x1200
Temp Dir: C:\Users\chiyo\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\chiyo\AppData\Roaming\HandBrake Team\HandBrake\1.1.0.0

-------------------------------------------

[08:12:37] hb_init: starting libhb thread

 # Starting Scan ...

[08:12:37] CPU: Intel(R) Xeon(R) CPU E5-2650L 0 @ 1.80GHz
[08:12:37]  - Intel microarchitecture Sandy Bridge
[08:12:37]  - logical processor count: 32
[08:12:37] Intel Quick Sync Video support: no
[08:12:37] hb_scan: path=D:\temp\videos\for-reencoding\Home Videos\Home Videos - Episode 053.m4v, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image D:\temp\videos\for-reencoding\Home Videos\Home Videos - Episode 053.m4v
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
[08:12:37] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.3
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[08:12:37] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Home Videos - Episode 001.m4v':
  Metadata:
    major_brand     : M4V
    minor_version   : 1
    compatible_brands: isomavc1M4A M4V mp42
    creation_time   : 2016-09-09 01:30:15
    title           : Episode 1
    artist          : Home Videos
    album_artist    : Home Videos
    album           : Home Videos
    genre           : Comedy
    track           : 13/23
    disc            : 1/1
    date            : 2010-01-18T08:00:00Z
    copyright       : N/A
    description     : N/A
    hd_video        : 2
    show            : Home Videos
    episode_id      : 313
    season_number   : 3
    episode_sort    : 13
    media_type      : 10
    sort_name       : Episode 1
    sort_album      : Home Videos
    sort_artist     : Home Videos
    synopsis        : N/A
    network         : N/A
    rating          : 0
  Duration: 00:20:23.14, start: 0.000000, bitrate: 5846 kb/s
    Stream #0:1(eng): Video: h264 (High) [avc1 / 0x31637661]
      yuv420p, tv, bt709/bt709/bt709
      1920x1080 [PAR 1:1 DAR 16:9], 5086 kb/s
      23.98 fps, 24k tbn (default)
    Metadata:
      creation_time   : 2016-09-09 01:30:15
      handler_name    : Core Media Audio
    Stream #0:1(eng): Audio: aac (LC) [mp4a / 0x6134706D]
      48000 Hz, stereo, fltp, 153 kb/s
    Metadata:
      creation_time   : 2016-09-09 01:30:15
      handler_name    : Core Media Closed Caption
    Stream #0:2(eng): Audio: ac3 [ac[45]3 / 0x332D6361]
      48000 Hz, 5.1, fltp, 384 kb/s
[08:12:37] add_ffmpeg_subtitle: unknown subtitle stream type: 0x0
[08:12:37] scan: decoding previews for title 1
[08:12:38] scan: audio 0x3: aac, rate=48000Hz, bitrate=153907 English (AAC) (2.0 ch)
[08:12:38] scan: audio 0x5: ac3, rate=48000Hz, bitrate=384000 English (AC3) (5.1 ch)
[08:12:40] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/0/2, aspect 16:9, PAR 1:1
[08:12:40] scan: supported video decoders: avcodec qsv
[08:12:40] libhb: scan thread found 1 valid title(s)

 # Processing Scan Information ...


 # Scan Finished ...


musicvid
Veteran User
Posts: 3081
Joined: Sat Jun 27, 2009 1:19 am

Re: How to select 5.1 audio over stereo?

Post by musicvid » Tue May 15, 2018 12:11 am

Don't encode the stereo stream.
If needed by a non-surround player, the stereo stream should downmix automatically from the 5.1.

User avatar
BradleyS
Moderator
Posts: 1325
Joined: Thu Aug 09, 2007 12:16 pm

Re: How to select 5.1 audio over stereo?

Post by BradleyS » Tue May 15, 2018 12:19 pm

Selection behavior is defined by language and not channels, so this is currently not possible to automate. You can manually remove the stereo track(s) for a single encode on the audio tab.

User avatar
Rodeo
HandBrake Team
Posts: 11908
Joined: Tue Mar 03, 2009 8:55 pm

Re: How to select 5.1 audio over stereo?

Post by Rodeo » Tue May 15, 2018 6:47 pm

One workaround would be to remove the Stereo track from the source before feeding it to HandBrake. Under macOS I'd use Subler, under Windows, not sure. Maybe Mkvtoolnix? It'll make a Matroska file, but since you're re-encoding it with HandBrake anyway, it's really a non-issue…

https://mkvtoolnix.download/downloads.html#windows

Then again, it's probably a lot quicker to simply manually remove the Stereo track from the audio list in HandBrake before adding it to the queue :)

Post Reply