How can I passthrough the subtitle flags from the source to the output(encode)? The sources I use have at least one subtitle track marked as default so its on during playback. After encoding I need to switch on the subtitle manually when playing the video
Hybrid should passthrough the 'default' and 'forced' track flags automatically assuming:
a. your source is mkv
b. your target is mkv
(the file names should reflect this with a '_default' or '_forced' flag)
Note that mkv is the only container which is supported by Hybrid that allows to set a default/forced track and that even with mkv whether the player follows the advice to set a track as default track depends on the player.
To my knowledge none of the containers Hybrid supports as output have a forced/default track as DVD/Blu-ray do.
Cu Selur
The subtitle in the source is set to default(yes). Plus the track has a name. After encoding none of these get passed through. The source is MKV, target is also MKV. I've attached my settings in automation.
Source
Will try to look at it tomorrow.
Do the file names of the extracted subtitles contains the naming conventions I mentioned?
the extracted subs only have id and language in the file name
Looking at the analysis of the file,..
using mkvmerge:
Code:
"I:\Hybrid\64bit\mkvmerge.exe" --identify "C:\Users\Selur\Desktop\[HorribleSubs] Bonobono - 132 [480p] (1).mkv"
I get:
Code:
File 'C:\Users\Selur\Desktop\[HorribleSubs] Bonobono - 132 [480p] (1).mkv': container: Matroska
Track ID 0: video (MPEG-4p10/AVC/h.264)
Track ID 1: audio (AAC)
Track ID 2: subtitles (SubStationAlpha)
Attachment ID 1: type 'application/x-truetype-font', size 221328 bytes, file name 'OpenSans-Semibold.ttf'
using mplayer:
Code:
"I:\Hybrid\64bit\mplayer.exe" -v -msglevel identify=6 -nolirc -demuxer mkv -frames 0 -novideo -vo null -ao null "C:\Users\Selur\Desktop\_HORRI~1.MKV"
I get:
Code:
MPlayer SVN-r38116-8.2.0 (C) 2000-2018 MPlayer Team
CPU vendor name: AuthenticAMD max cpuid level: 13
CPU: AMD Ryzen 7 1800X Eight-Core Processor (Family: 23, Model: 1, Stepping: 1)
extended cpuid-level: 31
extended cache-info: 33579328
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSE3: 1 SSSE3: 1 SSE4: 1 SSE4.2: 1 AVX: 1
Compiled with runtime CPU detection.
get_path('codecs.conf') -> 'I:/Hybrid/64bit/mplayer/codecs.conf'
Reading optional codecs config file I:/Hybrid/64bit/mplayer/codecs.conf:
2018.10.27 - 20:48:10_Windows 10-64bit_2018.10.23.1 - level 9: Collected standard output:
No such file or directory
Reading optional codecs config file /local64/etc/mplayer/codecs.conf: No such file or directory
Using built-in default codecs.conf.
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> 'I:/Hybrid/64bit/mplayer/fonts'
Configuration: --prefix=/local64 --bindir=/local64/bin-video --cc=gcc --extra-cflags=-DPTW32_STATIC_LIB -O3 -std=gnu99 -DMODPLUG_STATIC --extra-libs=-llzma -liconv -lws2_32 -lpthread -lwinpthread -lpng -lwinmm --extra-ldflags=-Wl,--allow-multiple-definition --enable-static --enable-runtime-cpudetection --disable-gif --disable-cddb --disable-faac --with-dvdread-config=/mingw64/bin/pkg-config --static dvdread --with-freetype-config=/mingw64/bin/pkg-config --static freetype2 --with-dvdnav-config=/mingw64/bin/pkg-config --static dvdnav
CommandLine: '-v' '-msglevel' 'identify=6' '-nolirc' '-demuxer' 'mkv' '-frames' '0' '-novideo' '-vo' 'null' '-ao' 'null' 'C:\Users\Selur\Desktop\_HORRI~1.MKV'
Using Windows native timing
get_path('input.conf') -> 'I:/Hybrid/64bit/mplayer/input.conf'
Parsing input config file I:/Hybrid/64bit/mplayer/input.conf
Input config file I:/Hybrid/64bit/mplayer/input.conf parsed: 92 binds
get_path('_HORRI~1.MKV.conf') -> 'I:/Hybrid/64bit/mplayer/_HORRI~1.MKV.conf'
getch2: 6 can't get number of input events [disabling console input]
Playing C:\Users\Selur\Desktop\_HORRI~1.MKV.
get_path('sub/') -> 'I:/Hybrid/64bit/mplayer/sub/'
WINSOCK2 init: 0
WINSOCK2 init: 0
[file] File size is 32372752 bytes
STREAM: [file] C:\Users\Selur\Desktop\_HORRI~1.MKV
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
[mkv] Found the head...
[mkv] + a segment...
[mkv] /---- [ parsing seek head ] ---------
[mkv] /---- [ parsing cues ] -----------
[mkv] \---- [ parsing cues ] -----------
[mkv] \---- [ parsing seek head ] ---------
[mkv] |+ segment information...
[mkv] | + timecode scale: 1000000
[mkv] | + duration: 330.072s
[mkv] |+ segment tracks...
[mkv] | + a track...
[mkv] | + Track number: 1
[mkv] | + Track type: Video
[mkv] | + Codec ID: V_MPEG4/ISO/AVC
[mkv] | + CodecPrivate, length 43
[mkv] | + Default duration: 33.367ms ( = 29.970 fps)
[mkv] | + Language: und
[mkv] | + Video track
[mkv] | + Pixel width: 848
[mkv] | + Pixel height: 480
[mkv] | + Display width: 853
[mkv] | + Display height: 480
[mkv] | + a track...
[mkv] | + Track number: 2
[mkv] | + Track type: Audio
[mkv] | + Codec ID: A_AAC
[mkv] | + CodecPrivate, length 2
[mkv] | + Default duration: 23.220ms ( = 43.066 fps)
[mkv] | + Language: jpn
[mkv] | + Audio track
[mkv] | + Sampling frequency: 44100.000000
[mkv] | + Channels: 2
[mkv] | + a track...
[mkv] | + Track number: 3
[mkv] | + Track type: Subtitle
[mkv] | + Codec ID: S_TEXT/ASS
[mkv] | + CodecPrivate, length 1756
[mkv] | + Name: Full Subs
[mkv] /---- [ parsing attachments ] ---------
[mkv] | + an attachment...
[mkv] | + FileName: OpenSans-Semibold.ttf
[mkv] | + FileMimeType: application/x-truetype-font
[mkv] | + FileData, length 221328
[mkv] Attachment: OpenSans-Semibold.ttf, application/x-truetype-font, 221328 bytes
[mkv] \---- [ parsing attachments ] ---------
[mkv] |+ found cluster, headers are parsed completely :)
==> Found video stream: 1
ID_VIDEO_ID=0
[mkv] Aspect: 0.000000
[mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0
==> Found audio stream: 2
ID_AUDIO_ID=0
ID_AID_0_LANG=jpn
[mkv] Track ID 2: audio (A_AAC), -aid 0, -alang jpn
ID_SUBTITLE_ID=0
ID_SID_0_LANG=eng
ID_SID_0_NAME=Full Subs
ID_SID_0_LANG=eng
[mkv] Track ID 3: subtitles (S_TEXT/ASS) "Full Subs", -sid 0, -slang eng
[mkv] No video track found/wanted.
Matroska file format detected.
Load subtitles in C:\Users\Selur\Desktop\
get_path('sub/') -> 'I:/Hybrid/64bit/mplayer/sub/'
ID_FILENAME=C:\Users\Selur\Desktop\_HORRI~1.MKV
ID_DEMUXER=mkv
ID_AUDIO_FORMAT=MP4A
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=2
ID_START_TIME=0.00
ID_LENGTH=330.07
ID_SEEKABLE=1
ID_CHAPTERS=0
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 1536000 + 131072 = 1667072 bytes for output buffer.
FFmpeg's libavcodec audio codec
libavcodec version 58.30.100 (internal)
Configuration: --enable-gpl --enable-postproc
2018.10.27 - 20:48:10_Windows 10-64bit_2018.10.23.1 - level 9: Collected standard output:
INFO: libavcodec "aac" init OK!
AUDIO: 44100 Hz, 2 ch, floatle, 128.0 kbit/4.54% (ratio: 16000->352800)
ID_AUDIO_BITRATE=128000
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=2
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
Building audio filter chain for 44100Hz/2ch/floatle -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 44100Hz/2ch/floatle
[dummy] Was reinitialized: 44100Hz/2ch/floatle
Trying preferred audio driver 'null', options '[none]'
AO: [null] 44100Hz 2ch floatle (4 bytes per sample)
AO: Description: Null audio output
AO: Author: Tobias Diedrich <ranma+mplayer@tdiedrich.de>
Building audio filter chain for 44100Hz/2ch/floatle -> 44100Hz/2ch/floatle...
[dummy] Was reinitialized: 44100Hz/2ch/floatle
[dummy] Was reinitialized: 44100Hz/2ch/floatle
ID_AUDIO_CODEC=ffaac
Video: no video
Freeing 0 unused video chunks.
Starting playback...
Uninit audio filters...
[libaf] Removing filter dummy
Uninit audio: ffmpeg
WINSOCK2 uninit
Exiting... (End of file)
ID_EXIT=EOF
using mediainfo:
Code:
"I:\Hybrid\64bit\mediainfo.exe" --Language=en --LogFile="E:\Temp\mediaInfoLog.txt" "--Full" "C:\Users\Selur\Desktop\[HorribleSubs] Bonobono - 132 [480p] (1).mkv"
I get:
Code:
General
Count : 332
Count of stream of this kind : 1
Kind of stream : General
Kind of stream : General
Stream identifier : 0
Unique ID : 158336583181581758364208125211611109332
Unique ID : 158336583181581758364208125211611109332 (0x771E8445695E37ECB70EF3F057D217D4)
Count of video streams : 1
Count of audio streams : 1
Count of text streams : 1
Video_Format_List : AVC
Video_Format_WithHint_List : AVC
Codecs Video : AVC
Audio_Format_List : AAC LC
Audio_Format_WithHint_List : AAC LC
Audio codecs : AAC LC
Audio_Language_List : Japanese
Text_Format_List : ASS
Text_Format_WithHint_List : ASS
Text codecs : ASS
Text_Language_List : English
Complete name : C:\Users\Selur\Desktop\[HorribleSubs] Bonobono - 132 [480p] (1).mkv
Folder name : C:\Users\Selur\Desktop
File name : [HorribleSubs] Bonobono - 132 [480p] (1).mkv
File name : [HorribleSubs] Bonobono - 132 [480p] (1)
File extension : mkv
Format : Matroska
Format : Matroska
Format/Url : https://matroska.org/downloads/windows.html
Format/Extensions usually used : mkv mk3d mka mks
Commercial name : Matroska
Format version : Version 4
File size : 32372752
File size : 30.9 MiB
File size : 31 MiB
File size : 31 MiB
File size : 30.9 MiB
File size : 30.87 MiB
Duration : 330072
Duration : 5 min 30 s
Duration : 5 min 30 s 72 ms
Duration : 5 min 30 s
Duration : 00:05:30.072
Duration : 00:05:30;00
Duration : 00:05:30.072 (00:05:30;00)
Overall bit rate : 784623
Overall bit rate : 785 kb/s
Frame rate : 29.970
Frame rate : 29.970 FPS
Frame count : 9890
Stream size : 334774
Stream size : 327 KiB (1%)
Stream size : 327 KiB
Stream size : 327 KiB
Stream size : 327 KiB
Stream size : 326.9 KiB
Stream size : 327 KiB (1%)
Proportion of this stream : 0.01034
IsStreamable : Yes
Encoded date : UTC 2018-10-27 16:05:33
File creation date : UTC 2018-10-27 18:15:14.981
File creation date (local) : 2018-10-27 20:15:14.981
File last modification date : UTC 2018-10-27 18:15:20.650
File last modification date (local) : 2018-10-27 20:15:20.650
Writing application : mkvmerge v25.0.0 ('Prog Noir') 64-bit
Writing application : mkvmerge v25.0.0 ('Prog Noir') 64-bit
Writing library : libebml v1.3.6 + libmatroska v1.4.9
Writing library : libebml v1.3.6 + libmatroska v1.4.9
Attachments : OpenSans-Semibold.ttf
Video
Count : 347
Count of stream of this kind : 1
Kind of stream : Video
Kind of stream : Video
Stream identifier : 0
StreamOrder : 0
ID : 1
ID : 1
Unique ID : 1
Format : AVC
Format : AVC
Format/Info : Advanced Video Codec
Format/Url : http://developers.videolan.org/x264.html
Commercial name : AVC
Format profile : Main@L3.1
Format settings : CABAC / 6 Ref Frames
Format settings, CABAC : Yes
Format settings, CABAC : Yes
Format settings, ReFrames : 6
Format settings, ReFrames : 6 frames
Internet media type : video/H264
Codec ID : V_MPEG4/ISO/AVC
Codec ID/Url : http://ffdshow-tryout.sourceforge.net/
Duration : 329996.000000
Duration : 5 min 29 s
Duration : 5 min 29 s 996 ms
Duration : 5 min 29 s
Duration : 00:05:29.996
Duration : 00:05:30;00
Duration : 00:05:29.996 (00:05:30;00)
Bit rate : 680569
Bit rate : 681 kb/s
Width : 848
Width : 848 pixels
Height : 480
Height : 480 pixels
Sampled_Width : 848
Sampled_Height : 480
Pixel aspect ratio : 1.006
Display aspect ratio : 1.778
Display aspect ratio : 16:9
Frame rate mode : CFR
Frame rate mode : Constant
FrameRate_Mode_Original : VFR
Frame rate : 29.970
Frame rate : 29.970 (30000/1001) FPS
FrameRate_Num : 30000
FrameRate_Den : 1001
Frame count : 9890
Color space : YUV
Chroma subsampling : 4:2:0
Chroma subsampling : 4:2:0
Bit depth : 8
Bit depth : 8 bits
Scan type : Progressive
Scan type : Progressive
Bits/(Pixel*Frame) : 0.056
Delay : 66
Delay : 66 ms
Delay : 66 ms
Delay : 66 ms
Delay : 00:00:00.066
Delay, origin : Container
Delay, origin : Container
Stream size : 28073154
Stream size : 26.8 MiB (87%)
Stream size : 27 MiB
Stream size : 27 MiB
Stream size : 26.8 MiB
Stream size : 26.77 MiB
Stream size : 26.8 MiB (87%)
Proportion of this stream : 0.86718
Writing library : x264 - core 142
Writing library : x264 core 142
Encoded_Library_Name : x264
Encoded_Library_Version : core 142
Encoding settings : cabac=1 / ref=6 / deblock=1:1:1 / analyse=0x1:0x111 / me=umh / subme=8 / psy=1 / psy_rd=0.40:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=5 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=60 / keyint_min=31 / scenecut=0 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=17.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=2000 / vbv_bufsize=3000 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:0.60
Default : Yes
Default : Yes
Forced : No
Forced : No
Audio
Count : 277
Count of stream of this kind : 1
Kind of stream : Audio
Kind of stream : Audio
Stream identifier : 0
StreamOrder : 1
ID : 2
ID : 2
Unique ID : 2
Format : AAC
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Commercial name : AAC
Format_AdditionalFeatures : LC
Codec ID : A_AAC-2
Duration : 330072.000000
Duration : 5 min 30 s
Duration : 5 min 30 s 72 ms
Duration : 5 min 30 s
Duration : 00:05:30.072
Duration : 00:05:30:25
Duration : 00:05:30.072 (00:05:30:25)
Bit rate : 96000
Bit rate : 96.0 kb/s
Channel(s) : 2
Channel(s) : 2 channels
Channel positions : Front: L R
Channel positions : 2/0/0
Channel layout : L R
Samples per frame : 1024
Sampling rate : 44100
Sampling rate : 44.1 kHz
Samples count : 14556175
Frame rate : 43.066
Frame rate : 43.066 FPS (1024 SPF)
Frame count : 14215
Compression mode : Lossy
Compression mode : Lossy
Delay : 0
Delay : 00:00:00.000
Delay, origin : Container
Delay, origin : Container
Delay relative to video : -66
Delay relative to video : -66 ms
Delay relative to video : -66 ms
Delay relative to video : -66 ms
Delay relative to video : -00:00:00.066
Stream size : 3960860
Stream size : 3.78 MiB (12%)
Stream size : 4 MiB
Stream size : 3.8 MiB
Stream size : 3.78 MiB
Stream size : 3.777 MiB
Stream size : 3.78 MiB (12%)
Proportion of this stream : 0.12235
Language : ja
Language : Japanese
Language : Japanese
Language : ja
Language : jpn
Language : ja
Default : Yes
Default : Yes
Forced : No
Forced : No
Text
Count : 238
Count of stream of this kind : 1
Kind of stream : Text
Kind of stream : Text
Stream identifier : 0
StreamOrder : 2
ID : 3
ID : 3
Unique ID : 3
Format : ASS
Format : ASS
Format/Url : http://ffdshow.sourceforge.net/tikiwiki/tiki-index.php?page=Getting+ffdshow
Commercial name : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info : Advanced Sub Station Alpha
Duration : 329690.000000
Duration : 5 min 29 s
Duration : 5 min 29 s 690 ms
Duration : 5 min 29 s
Duration : 00:05:29.690
Duration : 00:05:29.690
Bit rate : 96
Bit rate : 96 b/s
Frame rate : 0.173
Frame rate : 0.173 FPS
Frame count : 57
Count of elements : 57
Compression mode : Lossless
Compression mode : Lossless
Stream size : 3964
Stream size : 3.87 KiB (0%)
Stream size : 4 KiB
Stream size : 3.9 KiB
Stream size : 3.87 KiB
Stream size : 3.871 KiB
Stream size : 3.87 KiB (0%)
Proportion of this stream : 0.00012
Title : Full Subs
Language : en
Language : English
Language : English
Language : en
Language : eng
Language : en
Default : Yes
Default : Yes
Forced : No
Forced : No
-> No indication that the stream is "forced" in the source as you stated.
Cu Selur
What I meant was in the bonobono image(the source) the subtitle track is set to default meaning the subtitle will be played automatically with the video and audio when the player is started. The track also has a name "Full Subs". In the bonobono2 image after encoding its set to "Determine automatically) meaning its up to the player to determine whether or not it will be on during playback. Its always off in this case, you have to switch on the subs manually during playback. Also the track name "Full Subs" wasn't passed through to the output. Usually some sources come with more than one subtitle and each track has a name/description attached there
Quote:What I meant was in the bonobono image(the source) the subtitle track is set to default meaning the subtitle will be played automatically with the video and audio when the player is started.
Quote:For the "default track" flag: The special consideration is that mkvmerge will automatically set this flag to "yes" for exactly one track of each track type (audio, video, subtitles). You can only prevent this by explicitly setting the "default track" flag to "no" manually for all tracks of a kind (e.g. for all subtitle tracks).
The "default track" flag tells the player that this track should be played unless the user overrides that decision somehow. You usually mark the original audio track with "default track" and leave it off for the rest of them, e.g. for the director's commentary or some translations you don't want [(e.g. The Lord of the Rings, mark "English" as "default track" but not "German" and "Director's comments (English)].
As a lot of users don't want subtitles shown by default, they tell mkvmerge not to set the "default track" flag for any subtitle track.
Now on to the "forced display" flag, in short "forced". If this is set to "on", this track must be played/shown no matter what the user selected for his preferences or what the player would normally chose to show/play. This is used seldom, e.g. only for a subtitle track that only contains the English translation whenever Legolas is talking Elbish.
"Forced" has nothing to do with "default track". If "forced" is set, the player must play that track no matter what "default track" is set to. In fact, normally a track that has "forced" set does not have "default track" set, though it is neither invalid nor undefined behavior.
source:
https://gitlab.com/mbunkus/mkvtoolnix/wi...in-the-GUI
Any way to passthrough the setting plus tag name? or have it enabled by automatically(it will help with batch encodes)?
Problem is that mkvmerge only reports:
Code:
Track ID 0: video (MPEG-4p10/AVC/h.264)
Track ID 1: audio (AAC)
Track ID 2: subtitles (SubStationAlpha)
Attachment ID 1: type 'application/x-truetype-font', size 221328 bytes, file name 'OpenSans-Semibold.ttf'
before it would also report 'default_track:1 forced_track:0' for a track that is set to 'default' but isn't 'forced'.
Code:
"I:\Hybrid\64bit\mkvmerge.exe" --engage keep_track_statistics_tags --identify "C:\Users\Selur\Desktop\[HorribleSubs] Bonobono - 132 [480p] (1).mkv"
reports:
Code:
File 'C:\Users\Selur\Desktop\[HorribleSubs] Bonobono - 132 [480p] (1).mkv': container: Matroska
Track ID 0: video (MPEG-4p10/AVC/h.264)
Track ID 1: audio (AAC)
Track ID 2: subtitles (SubStationAlpha)
Attachment ID 1: type 'application/x-truetype-font', size 221328 bytes, file name 'OpenSans-Semibold.ttf'
Tags for track ID 0: 7 entries
Tags for track ID 1: 7 entries
Tags for track ID 2: 7 entries
-> I'm looking into what changed in mkvmerge in it's reporting and how to get the info from mkvmerge.
Cu Selur