Burn in subtitles wired fix issue (zlib Muxing mode)

Discuss about generic usage of MediaCoder.

Moderator: HuggiL

phill75
Beginner
Beginner
Posts: 7
Joined: Sun Aug 24, 2014 1:37 am

Burn in subtitles wired fix issue (zlib Muxing mode)

Post by phill75 » Sun Aug 24, 2014 3:12 am

Hi,

I am using MediaCoder Full version <<Donate>>
Input file: mkv with VC-1 video, DTS audio content and 3 subtitle streams
Output: mkv in h264, copy audio stream, burn in first subtitle stream

Settings:

Code: Select all

Video / Source: MEncoder
Subtitle / Mode: Default Render
Subtitle / Encoding: Auto
Subtitle / ID: 0
I need only the first subtitle stream to be burned in
I tried every thing, include Vobsub and changing to correct ID (after pressing F8), the subs won't be burnt in output
When I Play the original file in MediaCoder, it correctly shows the subtitle. It just doesn't show during encoding.

MediaInfo of subtitle in input file:

Code: Select all

Text #1
ID                                       : 3
Format                                   : PGS
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : The same subtitle format used on BDs/HD-DVDs
Language                                 : French
Default                                  : No
Forced                                   : No

Now, if I process the file through MKVMerge, MediaInfo shows the zlib tag under "Muxing mode" for the subtitle

Code: Select all

Text
ID                                       : 3
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : The same subtitle format used on BDs/HD-DVDs
Language                                 : French
Default                                  : No
Forced                                   : No
DURATION                                 : 00:57:46.080000000
NUMBER_OF_FRAMES                         : 202
NUMBER_OF_BYTES                          : 918108
_STATISTICS_WRITING_APP                  : mkvmerge v7.1.0 ('Good Love') 64bit built on Jul 27 2014 13:06:55
_STATISTICS_WRITING_DATE_UTC             : 2014-08-23 15:23:47
_STATISTICS_TAGS                         : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Now, if I process the new mkv file from mkvmerge, MediaCoder correctly burns in the subtitle stream with above settings

Changing container didn't fix any thing. Also, all other video sources except MEncoder won't pickup the subtitles from mkv input

Any idea why MediaCoder cannot pick the subs until I pass the movie through mkvmerge ?

Many thanks

User avatar
HuggiL
Modest
Modest
Posts: 233
Joined: Tue Oct 18, 2011 3:44 am
Location: Perth, Australia

Re: Burn in subtitles wired fix issue (zlib Muxing mode)

Post by HuggiL » Sun Aug 24, 2014 5:56 pm

When you say "burnt in", are you trying to hardsub it? i.e. render the subs onto the video?
In any case, I've always found that trying to render subs is touchy with MediaCoder (or I haven't played around enough yet since I prefer softsubs). And regarding your problem, I tried processing a MKV of mine through MKVmerge but it didn't add the "Muxing mode" line into the MediaInfo. That said, it wasn't a PGS sub though, just a standard A.S.S sub file so that might be the cause. And it still failed to render with MediaCoder afterwards...
In theory, theory and practice are the same. In practice, they are not.

Tips & Guides: http://forum.mediacoderhq.com/viewtopic.php?f=17&t=8061
Older versions: http://www.videohelp.com/tools/MediaCoder/old-versions#download

phill75
Beginner
Beginner
Posts: 7
Joined: Sun Aug 24, 2014 1:37 am

Re: Burn in subtitles wired fix issue (zlib Muxing mode)

Post by phill75 » Sun Aug 24, 2014 6:15 pm

Yes, I mean hardsub

The issue is that my Panasonic Viera TV cannot read subtitle streams from an MKV
I have no choice than hard rendering them

Using video source as MEncoder fixes most subtitle issues as I read in the forum and I could test it

I thought I'd mention it maybe it is a compatibility issue to read that subtitle format
Just passing it through MKVMerge did the change.

I found by case since I splitted a few minutes of the main movie to debug the subtitle issue. I was surprised that the splitted portion was working while the main file not. The only change Mediainfo showed if the zlib mention in front of the PSG subs

It was a rip from a retail BD I bought from the documentary: Life

phill75
Beginner
Beginner
Posts: 7
Joined: Sun Aug 24, 2014 1:37 am

Re: Burn in subtitles wired fix issue (zlib Muxing mode)

Post by phill75 » Sun Aug 24, 2014 6:54 pm

As a side note: when I chose passthrough for subs, it works perfectly even through FFMPeg as video source

It is just that my TV cannot open sub stream in MKV

User avatar
HuggiL
Modest
Modest
Posts: 233
Joined: Tue Oct 18, 2011 3:44 am
Location: Perth, Australia

Re: Burn in subtitles wired fix issue (zlib Muxing mode)

Post by HuggiL » Wed Aug 27, 2014 12:07 am

I'm not quite sure what that muxing mode is doing in regards to the sub/video playback. However, now knowing that you are trying to play them on a Panasonic TV, I tried looking around for information about those TVs and found that MKV subs are supported (for most models anyway). However, this:
- "header compression" is not supported - can be solved by repacking mkv into a new file with mkvtoolnix utility; this is relatively new option in mkv and some recently encoded movies are using it

from: http://www.avforums.com/threads/do-pana ... b.1620997/
Sounds suspiciously like your case and and after further investigation found this:
1. Download MKVToolnix
2. Install MKVToolnix then go to where you install MKVToolnix (usually C:\Program Files\MKVtoolnix)
3. run MKVMerge GUI
4. Find the MKV file you want to remux. Load it into MKVMerge GUI
5. Once loaded, click on the Video layer, click on the Extra Options tab and change the Compression to "NONE"
6. Click on the Audio Layer, click on the Extra Options tab and change the Compression to "NONE"
7. Set Output Filename accordingly
8. Start Muxing

from: http://forum.serviio.org/viewtopic.php?f=13&t=5804
So I checked MKVmerge and it seems that the compression setting list has three options: blank, "none", or "zlib". This might be what appears as muxing mode in MediaInfo in which case your original subs are missing some data in its headers. So try changing it to "none" and see if that will play on your TV.

With regards to MediaCoder and hardsubbing it, I would say it's the same issue as above. Namely, the missing muxing mode is preventing the hardsubbing program from executing properly. If this is the case, then unfortunately there isn't much we can do about it.

P.S. I also read that note you added via the report function. I apologise for my lack of response over the last couple days as I was focused on finishing off an university assignment. Also, just know that I am not a developer or affiliated with MediaCoder in any way. I'm just a user like you that offered to take up the moderator post after the previous one said he wanted to retire.
In theory, theory and practice are the same. In practice, they are not.

Tips & Guides: http://forum.mediacoderhq.com/viewtopic.php?f=17&t=8061
Older versions: http://www.videohelp.com/tools/MediaCoder/old-versions#download

phill75
Beginner
Beginner
Posts: 7
Joined: Sun Aug 24, 2014 1:37 am

Re: Burn in subtitles wired fix issue (zlib Muxing mode)

Post by phill75 » Wed Aug 27, 2014 7:00 am

HuggiL wrote:I'm not quite sure what that muxing mode is doing in regards to the sub/video playback. However, now knowing that you are trying to play them on a Panasonic TV, I tried looking around for information about those TVs and found that MKV subs are supported (for most models anyway). However, this:
- "header compression" is not supported - can be solved by repacking mkv into a new file with mkvtoolnix utility; this is relatively new option in mkv and some recently encoded movies are using it

from: http://www.avforums.com/threads/do-pana ... b.1620997/
Sounds suspiciously like your case and and after further investigation found this:
1. Download MKVToolnix
2. Install MKVToolnix then go to where you install MKVToolnix (usually C:\Program Files\MKVtoolnix)
3. run MKVMerge GUI
4. Find the MKV file you want to remux. Load it into MKVMerge GUI
5. Once loaded, click on the Video layer, click on the Extra Options tab and change the Compression to "NONE"
6. Click on the Audio Layer, click on the Extra Options tab and change the Compression to "NONE"
7. Set Output Filename accordingly
8. Start Muxing

from: http://forum.serviio.org/viewtopic.php?f=13&t=5804
So I checked MKVmerge and it seems that the compression setting list has three options: blank, "none", or "zlib". This might be what appears as muxing mode in MediaInfo in which case your original subs are missing some data in its headers. So try changing it to "none" and see if that will play on your TV.

With regards to MediaCoder and hardsubbing it, I would say it's the same issue as above. Namely, the missing muxing mode is preventing the hardsubbing program from executing properly. If this is the case, then unfortunately there isn't much we can do about it.

P.S. I also read that note you added via the report function. I apologise for my lack of response over the last couple days as I was focused on finishing off an university assignment. Also, just know that I am not a developer or affiliated with MediaCoder in any way. I'm just a user like you that offered to take up the moderator post after the previous one said he wanted to retire.
No problem, real life is more important.

Thanks for all those info about the MKV and subs

The last 48h, I spent a lot of time and I ended up with your conclusions. However, I wasn't aware of the forum discussions you linked above.

It seems that MKVMerge adds the compression header by default when we set nothing in compression
MediaCoder needs the compression header shown in the PGS subs to be able to hardsub them. Else, they won't show at all

Using stream copy for subs in media coder, works as expected in fact. Just the output is matching the input stream and the compression header is not added. That's why my TV was failing

The wired issue left: The MediaCoder player properly shows the subtitles from those MKV without compression header on the PGS subs. Why it cannot hardsub them unless I manually add the compression header with MKVMerge ?

User avatar
HuggiL
Modest
Modest
Posts: 233
Joined: Tue Oct 18, 2011 3:44 am
Location: Perth, Australia

Re: Burn in subtitles wired fix issue (zlib Muxing mode)

Post by HuggiL » Wed Aug 27, 2014 5:19 pm

MediaCoder's built-in player is actually a free, third-party player called MPlayer. It has its own settings and files which are completely different from the tool that does the hardsubbing. This means that the player displaying subs properly is not a guarantee that it will be easily hardsubbed.
I can't figure out which tool is being used to hardsub PGS onto H.264 video but if you can find that out, you can probably look into why that particular tool needs the muxing mode set to 'zlib' to be able to hardsub.
In theory, theory and practice are the same. In practice, they are not.

Tips & Guides: http://forum.mediacoderhq.com/viewtopic.php?f=17&t=8061
Older versions: http://www.videohelp.com/tools/MediaCoder/old-versions#download

phill75
Beginner
Beginner
Posts: 7
Joined: Sun Aug 24, 2014 1:37 am

Re: Burn in subtitles wired fix issue (zlib Muxing mode)

Post by phill75 » Thu Aug 28, 2014 3:21 am

it is avisynth

User avatar
HuggiL
Modest
Modest
Posts: 233
Joined: Tue Oct 18, 2011 3:44 am
Location: Perth, Australia

Re: Burn in subtitles wired fix issue (zlib Muxing mode)

Post by HuggiL » Thu Aug 28, 2014 11:02 pm

avisynth... hmm... from what I know of it, you need to run scripts which is what actually defines the settings for encoding/hardsubbing. As it is, I can't seem to find any info on avisynth and sub muxing modes. All I can find is that it requires an external plugin called "SUPtitle" to hardcode PGS subs (link here). But it doesn't really give a lot of information either nor does it say anything about if it needs specific muxing modes.
In theory, theory and practice are the same. In practice, they are not.

Tips & Guides: http://forum.mediacoderhq.com/viewtopic.php?f=17&t=8061
Older versions: http://www.videohelp.com/tools/MediaCoder/old-versions#download

shizzlenizzle
Amateur
Amateur
Posts: 10
Joined: Tue Nov 11, 2014 12:00 pm

Subtitles shown in preview but not in rendered file

Post by shizzlenizzle » Tue Nov 11, 2014 12:20 pm

So, I have a MKV file with german subtitles.
Extracted the subtitles (Track 3) with MKVExtractGUI2 to a separate A.S.S file.
pic.jpg
Here you can see the default subtitles in the preview window.
But in the rendered MP4 file the subs are missing.
Is this a bug? I chose different modes but still the same problem.
pic1.jpg

Does anybody have a workaround for this?

Post Reply