ReEncode MKV results new MKV video Lang Undetermined

Discussion of the HandBrake command line interface (CLI)
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
AutomanRJJ
Posts: 9
Joined: Mon Feb 16, 2015 4:05 am

ReEncode MKV results new MKV video Lang Undetermined

Post by AutomanRJJ » Mon Feb 16, 2015 4:39 am

I am in the process of extracting video from my HD-DVD collection and re-encoding them to MKV format to preserve the content on Bluray burnables.
MakeMKV extracts the content the way I want it but I am trying to re-encode them with HandBrake to make them smaller in size using h264.
on the MakeMKV output file, I examine the header using mkvmerge's Header editor, within the MKV file the video's Language is set to Eng (English).

I then use that MakeMKV output file as input to HandBrake as source. Re-encode with normal video settings using all defaults. Set the English Audio to pass through the audio files and load the chapter file and set it to English, load subtitle .srt file and set to English.
The resulting output MKV from HandBrake does a nice job of reducing size but it seems to strip/not add to the video its language setting, which then makes the subtitles that are set with the language of Eng not show up when viewing the MKV file with PowerDVD.
When I examine the HandBrake'd MKV file header using mkvmerge's Header editor, the Language of the video is set to und (Undetermined) which then seems to cause the subtitles to not show since the language for the subtitles does not match the video while viewing with PowerDVD.
If I take that Handbrake'd MKV file and remux it with mkvmerge and set its language to Eng (English), the subtitles (that are set for Eng) then start working correctly when viewing with PowerDVD.

Is there an extra Option setting that fixes or forces the encoder to set the video stream language? I found ones for the Audio language setting but in looked all through the values and could not find anything standing out as a video stream language setting.

I would rather not have to remux the file after HandBrake processes the file, I would prefer it to set the language correctly on that process or maybe this is a bug in HandBrake?

GregiBoy
Veteran User
Posts: 908
Joined: Sat Feb 12, 2011 9:23 pm

Re: ReEncode MKV results new MKV video Lang Undetermined

Post by GregiBoy » Mon Feb 16, 2015 5:34 am

The MKVMerge Header Editor doe not remux the file after header changes are made.

AutomanRJJ
Posts: 9
Joined: Mon Feb 16, 2015 4:05 am

Re: ReEncode MKV results new MKV video Lang Undetermined

Post by AutomanRJJ » Mon Feb 16, 2015 5:42 am

Correct the Header Editor does not remux. I am lost though as to how that helps to control what language that HandBreak puts as the language of the video within the MKV file?

mduell
Veteran User
Posts: 6679
Joined: Sat Apr 21, 2007 8:54 pm

Re: ReEncode MKV results new MKV video Lang Undetermined

Post by mduell » Mon Feb 16, 2015 5:53 am

lol, no logs, seriously? How could the header be more clear?

Let me guess, you're "not asking for support"... ok, no support. :roll:

AutomanRJJ
Posts: 9
Joined: Mon Feb 16, 2015 4:05 am

Re: ReEncode MKV results new MKV video Lang Undetermined

Post by AutomanRJJ » Mon Feb 16, 2015 6:28 pm

I was asking for command line settings, I didn't think you would need logs for that.
Since I can't be sure which of the logs are for this problem, I am re-extracting video from the HD-DVD and will HandBrake that extracted MKV and post the log here shortly.
Maybe then you will be able to then know what the command lines are for the encoder to force a given language for the video?

AutomanRJJ
Posts: 9
Joined: Mon Feb 16, 2015 4:05 am

Re: ReEncode MKV results new MKV video Lang Undetermined

Post by AutomanRJJ » Mon Feb 16, 2015 7:12 pm

Here is the requested log data converting a MakeMKV extraction of an HD-DVD Video;
Process is;
MakeMKV extracts Video/Audio/Chapters from HD-DVD into MKV file
EVODemux extracts subtitles from HD-DVD
bdsub2sub converts Extracted EVODemux data to index file
Subtitle Edit converts index file to .srt subtitle file

Handbrake input;
MKV from MakeMKV output
Audio passthrough from MKV file
Chapters retained from MKV file
Subtitles provided from .srt file

Handbrake Activity Scan Log;

Code: Select all

HandBrake 0.10.0.6534 - 64bit Version
OS: Microsoft Windows NT 6.2.9200.0 - 64bit
CPU: Intel(R) Core(TM) i7-4790S CPU @ 3.20GHz
Ram: 12227 MB, 
GPU Information:
  NVIDIA GeForce GTX 750 - 9.18.13.4752
Screen: 1440x900
Temp Dir: C:\Users\Rick\AppData\Local\Temp\
Install Dir: C:\Program Files\Handbrake
Data Dir: C:\Users\Rick\AppData\Roaming\HandBrake\HandBrake\0.10.0.6534

-------------------------------------------
[10:40:33] CPU: Intel(R) Core(TM) i7-4790S CPU @ 3.20GHz
[10:40:33]  - Intel microarchitecture Haswell
[10:40:33]  - logical processor count: 8
[10:40:33] OpenCL device #1: NVIDIA Corporation GeForce GTX 750
[10:40:33]  - OpenCL version: 1.1 CUDA
[10:40:33]  - driver version: 347.52
[10:40:33]  - device type:    GPU
[10:40:33]  - supported:      no
[10:40:33] Intel Quick Sync Video support: no
[10:40:33] hb_scan: path=C:\Video\BATTLESTAR_S1_D4\Litmus_t03.mkv, title_index=0
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\Video\BATTLESTAR_S1_D4\Litmus_t03.mkv/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\Video\BATTLESTAR_S1_D4\Litmus_t03.mkv/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(C:\Video\BATTLESTAR_S1_D4\Litmus_t03.mkv) failed
[10:40:33] 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
[10:40:33] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'C:\Video\BATTLESTAR_S1_D4\Litmus_t03.mkv':
  Metadata:
    title           : Litmus
  Duration: 00:43:43.48, start: 0.000000, bitrate: N/A
    Chapter #0.0: start 0.000000, end 314.263950
    Metadata:
      title           : Chapter  1
    Chapter #0.1: start 314.263950, end 733.649583
    Metadata:
      title           : Chapter  2
    Chapter #0.2: start 733.649583, end 1704.202500
    Metadata:
      title           : Chapter  3
    Chapter #0.3: start 1704.202500, end 2623.487533
    Metadata:
      title           : Chapter  4
    Stream #0.0(eng): Video: vc1 (Advanced), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 29.97 fps, 1k tbn, 59.94 tbc
    Stream #0.1(eng): Audio: eac3, 48000 Hz, 5.1, fltp, 384 kb/s (default)
    Metadata:
      title           : Surround 5.1
[10:40:34] scan: decoding previews for title 1
[10:40:34] scan: audio 0x1: eac3, rate=48000Hz, bitrate=384000 English (E-AC3) (5.1 ch)
[10:40:35] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/2/0, aspect 16:9, PAR 1:1
[10:40:35] libhb: scan thread found 1 valid title(s)
Handbrake Activity Encode Log;

Code: Select all

HandBrake 0.10.0.6534 - 64bit Version
OS: Microsoft Windows NT 6.2.9200.0 - 64bit
CPU: Intel(R) Core(TM) i7-4790S CPU @ 3.20GHz
Ram: 12227 MB, 
GPU Information:
  NVIDIA GeForce GTX 750 - 9.18.13.4752
Screen: 1440x900
Temp Dir: C:\Users\Rick\AppData\Local\Temp\
Install Dir: C:\Program Files\Handbrake
Data Dir: C:\Users\Rick\AppData\Roaming\HandBrake\HandBrake\0.10.0.6534

-------------------------------------------
CLI Query:  -i "C:\Video\BATTLESTAR_S1_D4\Litmus_t03.mkv" -t 1 --angle 1 -c 1-4 -o "C:\Video\BATTLESTAR_S1_D4\Litmus_t03_HandBrakedOutput.mkv"  -f mkv  -w 1918 --crop 0:0:2:0 --loose-anamorphic  --modulus 2 -e x264 -q 20 --vfr -a 1 -E copy -6 none -R Auto -B 0 -D 0 --gain 0 --aname="Surround 5.1" --audio-fallback ac3 --srt-file "C:\\Video\\BATTLESTAR_S1_D4\\LitmusSubtitles.srt" --srt-codeset UTF-8 --srt-offset 0 --srt-lang eng --markers="C:\Users\Rick\AppData\Local\Temp\Litmus_t03_HandBrakedOutput-1-chapters.csv" --encoder-preset=veryfast  --encoder-level="4.0"  --encoder-profile=main  --verbose=1

[10:51:00] hb_init: starting libhb thread
HandBrake 0.10.0 (2014112200) - MinGW x86_64 - https://handbrake.fr
8 CPUs detected
Opening C:\Video\BATTLESTAR_S1_D4\Litmus_t03.mkv...
[10:51:00] CPU: Intel(R) Core(TM) i7-4790S CPU @ 3.20GHz
[10:51:00]  - Intel microarchitecture Haswell
[10:51:00]  - logical processor count: 8
[10:51:01] OpenCL device #1: NVIDIA Corporation GeForce GTX 750
[10:51:01]  - OpenCL version: 1.1 CUDA
[10:51:01]  - driver version: 347.52
[10:51:01]  - device type:    GPU
[10:51:01]  - supported:      no
[10:51:01] Intel Quick Sync Video support: no
[10:51:01] hb_scan: path=C:\Video\BATTLESTAR_S1_D4\Litmus_t03.mkv, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\Video\BATTLESTAR_S1_D4\Litmus_t03.mkv/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\Video\BATTLESTAR_S1_D4\Litmus_t03.mkv/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(C:\Video\BATTLESTAR_S1_D4\Litmus_t03.mkv) failed
[10:51:01] 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
[10:51:01] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'C:\Video\BATTLESTAR_S1_D4\Litmus_t03.mkv':
  Metadata:
    title           : Litmus
  Duration: 00:43:43.48, start: 0.000000, bitrate: N/A
    Chapter #0.0: start 0.000000, end 314.263950
    Metadata:
      title           : Chapter  1
    Chapter #0.1: start 314.263950, end 733.649583
    Metadata:
      title           : Chapter  2
    Chapter #0.2: start 733.649583, end 1704.202500
    Metadata:
      title           : Chapter  3
    Chapter #0.3: start 1704.202500, end 2623.487533
    Metadata:
      title           : Chapter  4
    Stream #0.0(eng): Video: vc1 (Advanced), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 29.97 fps, 1k tbn, 59.94 tbc
    Stream #0.1(eng): Audio: eac3, 48000 Hz, 5.1, fltp, 384 kb/s (default)
    Metadata:
      title           : Surround 5.1
[10:51:01] scan: decoding previews for title 1
[10:51:01] scan: audio 0x1: eac3, rate=48000Hz, bitrate=384000 English (E-AC3) (5.1 ch)
Scanning title 1 of 1, preview 4, 40.00 %
Scanning title 1 of 1, preview 10, 100.00 %[10:51:01] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/2/0, aspect 16:9, PAR 1:1
[10:51:01] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: C:\Video\BATTLESTAR_S1_D4\Litmus_t03.mkv
  + duration: 00:43:43
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 0/0/2/0
  + support opencl: no
  + support hwd: yes
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:05:14
    + 2: cells 0->0, 0 blocks, duration 00:06:59
    + 3: cells 0->0, 0 blocks, duration 00:16:11
    + 4: cells 0->0, 0 blocks, duration 00:15:19
  + audio tracks:
    + 1, English (E-AC3) (5.1 ch) (iso639-2: eng)
  + subtitle tracks:
Reading chapter markers from file C:\Users\Rick\AppData\Local\Temp\Litmus_t03_HandBrakedOutput-1-chapters.csv
[10:51:01] 1 job(s) to process
[10:51:01] starting job
[10:51:01] Auto Passthru: allowed codecs are AAC, AC3, DTS, DTS-HD, MP3
[10:51:01] Auto Passthru: fallback is AC3
[10:51:01] Auto Passthru: passthru not possible for track 1, using fallback
[10:51:01] sync: expecting 62900 video frames
[10:51:01] job configuration:
[10:51:01]  * source
[10:51:01]    + C:\Video\BATTLESTAR_S1_D4\Litmus_t03.mkv
[10:51:01]    + title 1, chapter(s) 1 to 4
[10:51:01]    + container: matroska,webm
[10:51:01]  * destination
[10:51:01]    + C:\Video\BATTLESTAR_S1_D4\Litmus_t03_HandBrakedOutput.mkv
[10:51:01]    + container: Matroska (libavformat)
[10:51:01]      + chapter markers
[10:51:01]  * video track
[10:51:01]    + decoder: vc1
[10:51:01]    + filters
[10:51:01]      + Framerate Shaper (0:27000000:1126125)
[10:51:01]        + frame rate: same as source (around 23.976 fps)
[10:51:01]      + Crop and Scale (1918:1080:0:0:2:0)
[10:51:01]        + source: 1920 * 1080, crop (0/0/2/0): 1918 * 1080, scale: 1918 * 1080
[10:51:01]    + loose anamorphic
[10:51:01]      + storage dimensions: 1918 * 1080, mod 2
[10:51:01]      + pixel aspect ratio: 1 / 1
[10:51:01]      + display dimensions: 1918 * 1080
[10:51:01]    + encoder: H.264 (libx264)
[10:51:01]      + preset:  veryfast
[10:51:01]      + profile: main
[10:51:01]      + level:   4.0
[10:51:01]      + quality: 20.00 (RF)
[10:51:01]  * subtitle track 1, English (track 0, id 0xff) Text [SRT] -> Passthrough, offset: 0, charset: UTF-8
[10:51:01]  * audio track 1
[10:51:01]    + name: Surround 5.1
[10:51:01]    + decoder: English (E-AC3) (5.1 ch) (track 1, id 0x1)
[10:51:01]      + bitrate: 384 kbps, samplerate: 48000 Hz
[10:51:01]    + mixdown: 5.1 Channels
[10:51:01]    + encoder: AC3 (libavcodec)
[10:51:01]      + bitrate: 640 kbps, samplerate: 48000 Hz
[10:51:01] reader: first SCR 0 id 0x0 DTS 0
[10:51:01] encx264: min-keyint: 24, keyint: 240
[10:51:01] encx264: encoding at constant RF 20.000000
[10:51:01] encx264: unparsed options: level=4.0:ref=1:8x8dct=0:weightp=1:subme=2:mixed-refs=0:trellis=0:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=10
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
x264 [info]: profile Main, level 4.0
[10:53:00] vc1: "Chapter 2" (2) at frame 7543 time 28283760
[10:55:53] vc1: "Chapter 3" (3) at frame 17598 time 66028500
[11:02:31] vc1: "Chapter 4" (4) at frame 40868 time 153378270
[11:08:26] reader: done. 1 scr changes
[11:08:27] work: average encoding speed for job is 60.115639 fps
[11:08:27] sync: got 62901 frames, 62900 expected
[11:08:27] render: lost time: 0 (0 frames)
[11:08:27] render: gained time: 0 (0 frames) (0 not accounted for)
[11:08:27] vc1-decoder done: 62901 frames, 0 decoder errors, 0 drops
x264 [info]: frame I:1075  Avg QP:17.96  size:162586
x264 [info]: frame P:50912 Avg QP:21.09  size: 62736
x264 [info]: frame B:10914 Avg QP:21.60  size: 29953
x264 [info]: consecutive B-frames: 67.6% 27.2%  1.6%  3.6%
x264 [info]: mb I  I16..4: 56.6%  0.0% 43.4%
x264 [info]: mb P  I16..4: 40.2%  0.0%  2.0%  P16..4: 34.5% 11.6%  4.7%  0.0%  0.0%    skip: 7.0%
x264 [info]: mb B  I16..4: 10.1%  0.0%  0.4%  B16..8: 26.8%  6.4%  0.4%  direct:18.4%  skip:37.4%  L0:32.2% L1:44.2% BI:23.6%
x264 [info]: coded y,uvDC,uvAC intra: 60.8% 69.1% 38.8% inter: 27.8% 41.0% 7.8%
x264 [info]: i16 v,h,dc,p: 27% 19% 43% 11%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 20% 28%  5%  5%  4%  6%  4%  6%
x264 [info]: i8c dc,h,v,p: 56% 21% 19%  4%
x264 [info]: Weighted P-Frames: Y:1.7% UV:0.8%
x264 [info]: kb/s:11269.75
[11:08:27] eac3-decoder done: 0 frames, 0 decoder errors, 0 drops
[11:08:27] mux: track 0, 62901 frames, 3695696386 bytes, 11269.71 kbps, fifo 2048
[11:08:27] mux: track 1, 81981 frames, 209871360 bytes, 639.98 kbps, fifo 2048
[11:08:27] mux: track 2, 0 frames, 0 bytes, 0.00 kbps, fifo 8
[11:08:27] libhb: work result = 0
Encode done!
HandBrake has exited.

AutomanRJJ
Posts: 9
Joined: Mon Feb 16, 2015 4:05 am

Re: ReEncode MKV results new MKV video Lang Undetermined

Post by AutomanRJJ » Mon Feb 16, 2015 7:27 pm

Another look at the MKV Header and I see that the MakeMKV output file itself has the language value on the Video as not present.
The resulting HandBreak output MKV file is 1.2GB Smaller (Which is exactly what I want) and the MKV Header has the language value Present, but is set to Unknown.

So, back to my request;
Is there a control setting in HandBreak to force the video encoder to set a specific language or to not set it at all in the output MKV file header?

AutomanRJJ
Posts: 9
Joined: Mon Feb 16, 2015 4:05 am

Re: ReEncode MKV results new MKV video Lang Undetermined

Post by AutomanRJJ » Tue Feb 17, 2015 4:29 pm

Should I move this to the Windows GUI Area?

AutomanRJJ
Posts: 9
Joined: Mon Feb 16, 2015 4:05 am

Re: ReEncode MKV results new MKV video Lang Undetermined

Post by AutomanRJJ » Sat Feb 21, 2015 12:58 am

tap tap tap.... is this thing turned on :?:

AutomanRJJ
Posts: 9
Joined: Mon Feb 16, 2015 4:05 am

Re: ReEncode MKV results new MKV video Lang Undetermined

Post by AutomanRJJ » Wed Feb 25, 2015 6:34 am

So... ok, let me phrase this a different way.
The application is flawed and needs an option added.

It outputs all video as Unknown language type and needs to have a method/command to instruct the output to be produced with a tag of a specified language.

mduell
Veteran User
Posts: 6679
Joined: Sat Apr 21, 2007 8:54 pm

Re: ReEncode MKV results new MKV video Lang Undetermined

Post by mduell » Wed Feb 25, 2015 5:09 pm

Patches welcome.

Post Reply