Opened 12 years ago
Last modified 12 years ago
#2034 new defect
Both Mplayer and Mencoder fail to process some subtitles in mkv sometimes
Reported by: | Owned by: | reimar | |
---|---|---|---|
Priority: | normal | Component: | core |
Version: | HEAD | Severity: | major |
Keywords: | Cc: | compn | |
Blocked By: | Blocking: | ||
Reproduced by developer: | no | Analyzed by developer: | no |
Description
this is how it is supposed to be
http://i39.tinypic.com/21dijab.jpg
this is how mplayer handles it
http://i42.tinypic.com/vgooyf.jpg
and this is how mencoder convetrted it with line http://pastebin.com/ZgMk73TE
http://i40.tinypic.com/o5n61g.png
Attachments (2)
Change History (20)
comment:1 by , 12 years ago
Cc: | added |
---|
comment:2 by , 12 years ago
comment:3 by , 12 years ago
Mencoder console output
http://pastebin.com/2eKakCEQ
Sample .ass that i've extracted from is in attachment
adding -ass to command line of mencoder will fix issue, but subs in result file will be styled, which in my case is not good. I want them to be affected by
-subfont C://Windows//Fonts//arialbd.ttf -subpos 100 -subcp cpUnicode -subfont-text-scale 3
comment:4 by , 12 years ago
These are all completely different issues, your chances of getting a fix are far higher if you say which of these you want to have fixed.
I have no idea about the MPlayer issue, it fails to strip the "Dialogue" part, but I can't see that happen. Since mencoder uses exactly the same code but (according to your screenshots) gives a different result I'd almost expect something wrong on your end.
The double subtitles are due to the subtitles using some silly blur effect that for some reason draws them twice. I guess I could add a hack in for capturing that for embedded subs at least though.
The way you are "supposed" to do it is by using -ass and -ass-force-style, but don't ask me how to use the latter.
And -subcp is completely irrelevant for embedded MKV subtitles.
comment:5 by , 12 years ago
I guess you used -demuxer mkv only for the mencoder command and not the mplayer one.
The result with -demuxer mkv now seems to work fine, -demuxer lavf seems to be buggy.
However -demuxer lavf has more bugs without -ass (bugs that I think are in FFmpeg) and the maintainer has been very reluctant to allow them to be fixed...
comment:6 by , 12 years ago
comment:7 by , 12 years ago
well, first of all, why one have to use -ass if mencoder (judging from cmd output) understand that there is ass track in mkv? same goes for demuxer.
Without -demuxer mkv subs are staying for longer than they're supposed to be so iive told me to use -demuxer mkv but that is causing side effects on fixing which he is working atm.
adding -ass made lines appear once even with blurry effect (http://i42.tinypic.com/i6ieck.png) but subs are styled, which is not good. i want them to be effected by -subfont
also, it happened http://i44.tinypic.com/1z4vpxv.jpg with ass in attachment (sample ass2)
comment:8 by , 12 years ago
btw, "Since mencoder uses exactly the same code" is not pretty accurate.
-demuxer mkv causes some side effects on mkv with compression, yet mplayer have no issues with it
comment:9 by , 12 years ago
If you only care about -subfont you can use -ass-force-style 'Font=Arial' or such.
Without -demuxer mkv subs are staying for longer than they're supposed to be
Yes, that is the issue that the maintainer (in FFmpeg) didn't want to have fixed.
adding -ass made lines appear once even with blurry effect
Yes and no. Yes, you see them only once. No because the subtitle renderer actually does draw them twice, just at the same place. But without styles that information (that it's just overdrawing exactly the same test once more) gets lost.
with ass in attachment (sample ass2)
Code does not (yet) work for multi-line subtitles. If you feel like it you can of course manually remove those duplicate lines.
-demuxer mkv causes some side effects on mkv with compression, yet mplayer have
Without details I can't say much to that, except "are you sure?" Because you had been running MPlayer without -demuxer mkv for the screenshots at least.
no issues with it
comment:10 by , 12 years ago
-demuxer mkv causes some side effects on mkv with compression, yet mplayer have
Without details I can't say much to that, except "are you sure?" Because you
had been running MPlayer without -demuxer mkv for the screenshots at least.
no issues with it
well, iive said that mencoder messes up with -demuxer mkv sometimes cause of
mkv compression
with ass in attachment (sample ass2)
Code does not (yet) work for multi-line subtitles. If you feel like it you can
of course manually remove those duplicate lines.
will it work with multi-line subs anyhow soon?
what bout
why one have to use -ass if mencoder (judging from cmd
output) understand that there is ass track in mkv?
-ass -ass-force-style "Font=Arial Bold" didn't have any effect
comment:11 by , 12 years ago
will it work with multi-line subs anyhow soon?
It's a bit messy and I don't really feel like implementing it, so probably not.
-ass-force-style "Font=Arial Bold"
Yes, that was slightly wrong. Something like
-ass-force-style 'FontName=Arial,Bold=1'
rather
comment:12 by , 12 years ago
that didn't work either
will it work with multi-line subs anyhow soon?
It's a bit messy and I don't really feel like implementing it, so probably not.
that's too bad. remaking subs myself or downloading other release of show is not that great option tbh
comment:13 by , 12 years ago
"Didn't work" means? I can't test the font part since I don't have the font specified in the style, but I checked like this:
-ass -sub Kurokami\ -\ 23_track3_eng.ass -ass-force-style 'FontName=FreeSans,Bold=1'
vs.
-ass -sub Kurokami\ -\ 23_track3_eng.ass -ass-force-style 'FontName=FreeSerif,Bold=1'
And the font clearly changed.
Changing Bold=1 to Bold=0 also clearly changed how it looks.
Obviously running Windows those fonts won't exist (though there should be a printout telling you which actually was used), it will require a build with fontconfig support (otherwise you at least can't use names. I doubt paths are possible).
comment:14 by , 12 years ago
you tried with external subs, i tried with embedded.
i built my build with fontconfig support but there is no fontconfig configuration file.
Arial Bold was actually name of font. and yea, it didn't work with font path.
comment:15 by , 12 years ago
you tried with external subs, i tried with embedded.
I had tried both (actually even -demuxer mkv), it makes no difference.
But since I don't have your original file but only one created with mkvmerge it wouldn't have been a good example to give.
However I only tested with MPlayer, not mencoder (though it shouldn't make any difference).
And fontconfig shouldn't need a config file, it will build a cache on its own, also you should see a warning if it does not recognize the font name.
comment:16 by , 12 years ago
well, actually it doesn't matter anymore. i've built latest rev with your fix for subs and now it's showing one time. with mencoder at least. now, i hope for fix for multi line subs if you will ever feel like it . thanks for your hard work :)
comment:17 by , 12 years ago
there is a -nooverlapsub option, but probably isnt related to these bugs?
comment:18 by , 12 years ago
I think I figured out your issue with mencoder and -ass-force-style: You _have_ to put that option before the input file name, if you put it after it will be ignored.
I am not quite sure what is special about that options that it only happens with it though.
are you using -ass with mencoder or mplayer? you need to use -ass to enable the libass renderer. there are also more commands you need to provide to get ass working in mencoder.
please upload sample subtitle file if it fails with -ass.
also missing mencoder/mplayer console output.