Multiple Subtitle tracks that automatically play with a selected audio track

HandBrake for Mac 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
paulsanders2991
Posts: 1
Joined: Thu Mar 15, 2018 7:21 pm

Multiple Subtitle tracks that automatically play with a selected audio track

Post by paulsanders2991 »

I have tried looking at other related posts and Handbrake documentation, but nothing seems to be very clear or relates to what I am trying to do. I think Forced Subtitles and the Foreign Audio Search Bitmap options may have something to do with this, but I'm just not sure. I need help put in very simple terms, maybe even step by step instructions would be nice. I am working on a movie that has 2 audio tracks, English and Spanish. There are parts in the movie that are in a foreign language (aside from the English and Spanish), so I also have English and Spanish subtitle tracks for those parts of the movie. What I am having difficulty achieving is the appropriate setting in Handbrake so that the English subtitles play automatically when the english audio track is selected and that the Spanish subtitle track plays automatically when the Spanish audio track is selected. Is this even possible to achieve? If so, please provide clear, dumb-downed instructions. I would prefer not to burn in the English subtitles if possible. Again, I just want the selected audio track to automatically play the corresponding subtitle track with it without needing to manually select that subtitle track.

Also, as a side question, when you have burned in subtitles, say in English, already in a movie during a foreign language part, is there a way in Handbrake to add a soft subtitle track, again that automatically plays with a particular audio track, and move the position of that subtitle track on the screen so it doesn't cover the already burned in subtitles? Does this question make sense? I see iTunes do this all the time with movies.

HandBrake version 1.0.7

Mac OS High Sierra, version 10.13.3

HandBrake Activity Log

Code: Select all

[13:27:38] macgui: Handbrake Version: 1.0.7  (2017040900)
[13:27:38] hb_init: starting libhb thread
[13:27:38] hb_init: starting libhb thread
[13:27:55] macgui: trying to open a folder or file
[13:27:55] macgui: ScanCore scanning titles with a duration of 10 seconds or more
[13:27:55] CPU: Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
[13:27:55]  - Intel microarchitecture Kaby Lake
[13:27:55]  - logical processor count: 8
[13:27:55] hb_scan: path=/Users/paulsanders/Desktop/captainphillipsS.mkv, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:274: failed opening UDF image /Users/paulsanders/Desktop/captainphillipsS.mkv
disc.c:352: error opening file BDMV/index.bdmv
disc.c:352: error opening file BDMV/BACKUP/index.bdmv
[13:27:55] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
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
[13:27:55] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/Users/paulsanders/Desktop/captainphillipsS.mkv':
  Metadata:
    title           : Captain Phillips
  Duration: 02:14:04.06, start: 0.000000, bitrate: N/A
    Chapter #0:0: start 0.000000, end 552.927375
    Metadata:
      title           : Chapter 01
    Chapter #0:1: start 552.927375, end 930.137542
    Metadata:
      title           : Chapter 02
    Chapter #0:2: start 930.137542, end 1368.533833
    Metadata:
      title           : Chapter 03
    Chapter #0:3: start 1368.533833, end 1811.226083
    Metadata:
      title           : Chapter 04
    Chapter #0:4: start 1811.226083, end 2378.501125
    Metadata:
      title           : Chapter 05
    Chapter #0:5: start 2378.501125, end 2880.836292
    Metadata:
      title           : Chapter 06
    Chapter #0:6: start 2880.836292, end 3504.542708
    Metadata:
      title           : Chapter 07
    Chapter #0:7: start 3504.542708, end 3876.539333
    Metadata:
      title           : Chapter 08
    Chapter #0:8: start 3876.539333, end 4382.628250
    Metadata:
      title           : Chapter 09
    Chapter #0:9: start 4382.628250, end 4754.249500
    Metadata:
      title           : Chapter 10
    Chapter #0:10: start 4754.249500, end 5141.261125
    Metadata:
      title           : Chapter 11
    Chapter #0:11: start 5141.261125, end 5654.023375
    Metadata:
      title           : Chapter 12
    Chapter #0:12: start 5654.023375, end 6104.598500
    Metadata:
      title           : Chapter 13
    Chapter #0:13: start 6104.598500, end 6691.768417
    Metadata:
      title           : Chapter 14
    Chapter #0:14: start 6691.768417, end 7358.642958
    Metadata:
      title           : Chapter 15
    Chapter #0:15: start 7358.642958, end 8044.036000
    Metadata:
      title           : Chapter 16
    Stream #0:0(eng): Video: h264 (High)
      yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], PAR 1:1 DAR 16:9
      23.98 fps, 1k tbn
    Metadata:
      BPS-eng         : 24916480
      DURATION-eng    : 02:14:04.036000000
      NUMBER_OF_FRAMES-eng: 192864
      NUMBER_OF_BYTES-eng: 25053633152
      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-03-15 14:36:51
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: dts (DTS)
      48000 Hz, 5.1, fltp, 1536 kb/s (default)
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 1508999
      DURATION-eng    : 02:14:04.043000000
      NUMBER_OF_FRAMES-eng: 754129
      NUMBER_OF_BYTES-eng: 1517307548
      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-03-15 14:36:51
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(spa): Audio: ac3
      48000 Hz, 5.1, fltp, 640 kb/s
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 640000
      DURATION-eng    : 02:14:04.064000000
      NUMBER_OF_FRAMES-eng: 251377
      NUMBER_OF_BYTES-eng: 643525120
      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-03-15 14:36:51
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:3(eng): Subtitle: srt (default)
    Metadata:
      BPS-eng         : 9
      DURATION-eng    : 01:56:07.210000000
      NUMBER_OF_FRAMES-eng: 329
      NUMBER_OF_BYTES-eng: 8356
      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-03-15 14:36:51
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:4(spa): Subtitle: srt
    Metadata:
      BPS-eng         : 9
      DURATION-eng    : 02:06:47.016000000
      NUMBER_OF_FRAMES-eng: 352
      NUMBER_OF_BYTES-eng: 9283
      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-03-15 14:36:51
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[13:27:55] scan: decoding previews for title 1
[13:27:55] scan: audio 0x1: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch)
[13:27:55] scan: audio 0x2: ac3, rate=48000Hz, bitrate=640000 español (AC3) (5.1 ch)
[13:27:56] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 138/138/0/0, aspect 16:9, PAR 1:1
[13:27:56] libhb: scan thread found 1 valid title(s)
[13:27:56] macgui: ScanCore scan done
[13:29:04] macgui: QueueCore scanning specifically for title: 1
[13:29:04] CPU: Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
[13:29:04]  - Intel microarchitecture Kaby Lake
[13:29:04]  - logical processor count: 8
[13:29:04] hb_scan: path=/Users/paulsanders/Desktop/captainphillipsS.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:274: failed opening UDF image /Users/paulsanders/Desktop/captainphillipsS.mkv
disc.c:352: error opening file BDMV/index.bdmv
disc.c:352: error opening file BDMV/BACKUP/index.bdmv
[13:29:04] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
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
[13:29:04] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/Users/paulsanders/Desktop/captainphillipsS.mkv':
  Metadata:
    title           : Captain Phillips
  Duration: 02:14:04.06, start: 0.000000, bitrate: N/A
    Chapter #0:0: start 0.000000, end 552.927375
    Metadata:
      title           : Chapter 01
    Chapter #0:1: start 552.927375, end 930.137542
    Metadata:
      title           : Chapter 02
    Chapter #0:2: start 930.137542, end 1368.533833
    Metadata:
      title           : Chapter 03
    Chapter #0:3: start 1368.533833, end 1811.226083
    Metadata:
      title           : Chapter 04
    Chapter #0:4: start 1811.226083, end 2378.501125
    Metadata:
      title           : Chapter 05
    Chapter #0:5: start 2378.501125, end 2880.836292
    Metadata:
      title           : Chapter 06
    Chapter #0:6: start 2880.836292, end 3504.542708
    Metadata:
      title           : Chapter 07
    Chapter #0:7: start 3504.542708, end 3876.539333
    Metadata:
      title           : Chapter 08
    Chapter #0:8: start 3876.539333, end 4382.628250
    Metadata:
      title           : Chapter 09
    Chapter #0:9: start 4382.628250, end 4754.249500
    Metadata:
      title           : Chapter 10
    Chapter #0:10: start 4754.249500, end 5141.261125
    Metadata:
      title           : Chapter 11
    Chapter #0:11: start 5141.261125, end 5654.023375
    Metadata:
      title           : Chapter 12
    Chapter #0:12: start 5654.023375, end 6104.598500
    Metadata:
      title           : Chapter 13
    Chapter #0:13: start 6104.598500, end 6691.768417
    Metadata:
      title           : Chapter 14
    Chapter #0:14: start 6691.768417, end 7358.642958
    Metadata:
      title           : Chapter 15
    Chapter #0:15: start 7358.642958, end 8044.036000
    Metadata:
      title           : Chapter 16
    Stream #0:0(eng): Video: h264 (High)
      yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], PAR 1:1 DAR 16:9
      23.98 fps, 1k tbn
    Metadata:
      BPS-eng         : 24916480
      DURATION-eng    : 02:14:04.036000000
      NUMBER_OF_FRAMES-eng: 192864
      NUMBER_OF_BYTES-eng: 25053633152
      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-03-15 14:36:51
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: dts (DTS)
      48000 Hz, 5.1, fltp, 1536 kb/s (default)
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 1508999
      DURATION-eng    : 02:14:04.043000000
      NUMBER_OF_FRAMES-eng: 754129
      NUMBER_OF_BYTES-eng: 1517307548
      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-03-15 14:36:51
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(spa): Audio: ac3
      48000 Hz, 5.1, fltp, 640 kb/s
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 640000
      DURATION-eng    : 02:14:04.064000000
      NUMBER_OF_FRAMES-eng: 251377
      NUMBER_OF_BYTES-eng: 643525120
      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-03-15 14:36:51
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:3(eng): Subtitle: srt (default)
    Metadata:
      BPS-eng         : 9
      DURATION-eng    : 01:56:07.210000000
      NUMBER_OF_FRAMES-eng: 329
      NUMBER_OF_BYTES-eng: 8356
      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-03-15 14:36:51
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:4(spa): Subtitle: srt
    Metadata:
      BPS-eng         : 9
      DURATION-eng    : 02:06:47.016000000
      NUMBER_OF_FRAMES-eng: 352
      NUMBER_OF_BYTES-eng: 9283
      _STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-03-15 14:36:51
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[13:29:04] scan: decoding previews for title 1
[13:29:04] scan: audio 0x1: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch)
[13:29:04] scan: audio 0x2: ac3, rate=48000Hz, bitrate=640000 español (AC3) (5.1 ch)
[13:29:05] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 138/138/0/0, aspect 16:9, PAR 1:1
[13:29:05] libhb: scan thread found 1 valid title(s)
[13:29:06] macgui: QueueCore scan done
[13:29:06] macgui: QueueCore started encoding captainphillipsS.m4v
[13:29:06] macgui: QueueCore with preset Fast 1080p30
[13:29:06] 1 job(s) to process
[13:29:06] Skipping subtitle scan.  No suitable subtitle tracks.
[13:29:06] starting job
[13:29:06] decomb filter thread started for segment 1
[13:29:06] decomb filter thread started for segment 0
[13:29:06] decomb filter thread started for segment 2
[13:29:06] decomb filter thread started for segment 3
[13:29:06] decomb filter thread started for segment 4
[13:29:06] decomb filter thread started for segment 5
[13:29:06] decomb filter thread started for segment 6
[13:29:06] decomb filter thread started for segment 7
[13:29:06] decomb check thread started for segment 0
[13:29:06] decomb check thread started for segment 1
[13:29:06] decomb check thread started for segment 2
[13:29:06] decomb check thread started for segment 3
[13:29:06] decomb check thread started for segment 4
[13:29:06] decomb check thread started for segment 5
[13:29:06] decomb check thread started for segment 6
[13:29:06] decomb check thread started for segment 7
[13:29:06] mask filter thread started for segment 0
[13:29:06] mask filter thread started for segment 1
[13:29:06] mask filter thread started for segment 2
[13:29:06] mask filter thread started for segment 3
[13:29:06] mask filter thread started for segment 4
[13:29:06] mask filter thread started for segment 5
[13:29:06] mask filter thread started for segment 6
[13:29:06] mask filter thread started for segment 7
[13:29:06] mask erode thread started for segment 0
[13:29:06] mask erode thread started for segment 1
[13:29:06] mask erode thread started for segment 2
[13:29:06] mask erode thread started for segment 3
[13:29:06] mask erode thread started for segment 4
[13:29:06] mask erode thread started for segment 5
[13:29:06] mask erode thread started for segment 6
[13:29:06] mask erode thread started for segment 7
[13:29:06] mask dilate thread started for segment 0
[13:29:06] mask dilate thread started for segment 1
[13:29:06] mask dilate thread started for segment 2
[13:29:06] mask dilate thread started for segment 3
[13:29:06] mask dilate thread started for segment 4
[13:29:06] mask dilate thread started for segment 5
[13:29:06] mask dilate thread started for segment 6
[13:29:06] mask dilate thread started for segment 7
[13:29:06] yadif thread started for segment 0
[13:29:06] yadif thread started for segment 1
[13:29:06] yadif thread started for segment 2
[13:29:06] yadif thread started for segment 3
[13:29:06] yadif thread started for segment 4
[13:29:06] yadif thread started for segment 5
[13:29:06] yadif thread started for segment 6
[13:29:06] yadif thread started for segment 7
[13:29:06] job configuration:
[13:29:06]  * source
[13:29:06]    + /Users/paulsanders/Desktop/captainphillipsS.mkv
[13:29:06]    + title 1, chapter(s) 1 to 16
[13:29:06]    + container: matroska,webm
[13:29:06]  * destination
[13:29:06]    + /Users/paulsanders/Desktop/captainphillipsS.m4v
[13:29:06]    + container: MPEG-4 (libavformat)
[13:29:06]      + chapter markers
[13:29:06]  * video track
[13:29:06]    + decoder: h264
[13:29:06]    + filters
[13:29:06]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[13:29:06]      + Decomb (mode=39)
[13:29:06]      + Framerate Shaper (mode=2:rate=27000000/900000)
[13:29:06]        + frame rate: 23.976 fps -> peak rate limited to 30.000 fps
[13:29:06]      + Crop and Scale (width=1920:height=804:crop-top=138:crop-bottom=138:crop-left=0:crop-right=0)
[13:29:06]        + source: 1920 * 1080, crop (138/138/0/0): 1920 * 804, scale: 1920 * 804
[13:29:06]    + Output geometry
[13:29:06]      + storage dimensions: 1920 x 804
[13:29:06]      + pixel aspect ratio: 1 : 1
[13:29:06]      + display dimensions: 1920 x 804
[13:29:06]    + encoder: H.264 (libx264)
[13:29:06]      + preset:  fast
[13:29:06]      + profile: main
[13:29:06]      + level:   4.0
[13:29:06]      + quality: 22.00 (RF)
[13:29:06]  * subtitle track 1, English (track 0, id 0x3) Text [UTF-8] -> Passthrough
[13:29:06]  * subtitle track 2, Spanish (track 1, id 0x4) Text [UTF-8] -> Passthrough
[13:29:06]  * audio track 1
[13:29:06]    + decoder: English (DTS) (5.1 ch) (track 1, id 0x1)
[13:29:06]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[13:29:06]    + mixdown: Dolby Pro Logic II
[13:29:06]    + encoder: AAC (Apple AudioToolbox)
[13:29:06]      + bitrate: 160 kbps, samplerate: 48000 Hz
[13:29:06]  * audio track 2
[13:29:06]    + decoder: español (AC3) (5.1 ch) (track 2, id 0x2)
[13:29:06]      + bitrate: 640 kbps, samplerate: 48000 Hz
[13:29:06]    + mixdown: Dolby Pro Logic II
[13:29:06]    + encoder: AAC (Apple AudioToolbox)
[13:29:06]      + bitrate: 160 kbps, samplerate: 48000 Hz
[13:29:06] sync: expecting 192864 video frames
[13:29:06] encx264: min-keyint: 24, keyint: 240
[13:29:06] encx264: encoding at constant RF 22.000000
[13:29:06] encx264: unparsed options: level=4.0:vbv-bufsize=25000:ref=2:8x8dct=0:weightp=1:rc-lookahead=30:subme=6:vbv-maxrate=20000
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
x264 [info]: profile Main, level 4.0
[13:29:06] sync: first pts video is 0
[13:29:06] sync: "Chapter 1" (1) at frame 1 time 0
[13:29:06] sync: first pts audio 0x1 is 0
[13:29:06] sync: first pts audio 0x2 is 0
[13:29:23] sync: first pts subtitle 0x4 is 4039020
Last edited by Anonymous on Thu Mar 15, 2018 11:24 pm, edited 1 time in total.
Reason: Logs in [code][/code] blocks please
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: Multiple Subtitle tracks that automatically play with a selected audio track

Post by JohnAStebbins »

English subtitles play automatically when the english audio track is selected and that the Spanish subtitle track plays automatically when the Spanish audio track is selected
This isn't possible. There is no mechanism in any of the container formats for associating audio and subtitle tracks in this way. And even if there were, it is such an obscure feature, it would be very unlikely that any players would support it.
Woodstock
Veteran User
Posts: 4623
Joined: Tue Aug 27, 2013 6:39 am

Re: Multiple Subtitle tracks that automatically play with a selected audio track

Post by Woodstock »

Plus it would often be WRONG.

If you have English audio, you would want to play the "forced only" English subtitles most of the time, but there might be multiple "English" subtitle tracks.

I processed a movie this week that had 8 different English subtitle tracks for 4 different English audio tracks.

As for "moving the subtitles around", that would have to be done by the subtitle author.
Post Reply