Hi, I'm trying to convert a mkv with subtitles, to a simple xvid avi, with the subtitles directly displayed in the movie. To do this, I've tried : mencoder -slang fre movie.mkv -oac mp3lame -lameopts cbr:br=128 -ovc xvid -xvidencopts vhq=1:chroma_me:hq_ac:bitrate=1500 -o movie.avi The problem is that the subtitles aren't correctly displayed (bottom of it is displayed randomly on the screen, and distorted), on the encoded avi. Of course, the movie plays ok with mplayer and subtitles ... Here is the output from mencoder about the mkv : [mkv] Found the head... [mkv] + a segment... [mkv] /---- [ parsing seek head ] --------- [mkv] /---- [ parsing seek head ] --------- [mkv] \---- [ parsing seek head ] --------- [mkv] /---- [ parsing cues ] ----------- [mkv] \---- [ parsing cues ] ----------- [mkv] \---- [ parsing seek head ] --------- [mkv] |+ segment information... [mkv] | + duration: 1145.002s [mkv] |+ segment tracks... [mkv] | + a track... [mkv] | + Track number: 1 [mkv] | + Track type: Video [mkv] | + Codec ID: V_REAL/RV40 [mkv] | + CodecPrivate, length 34 [mkv] | + Default duration: 40.000ms ( = 25.000 fps) [mkv] | + Default flag: 1 [mkv] | + Language: eng [mkv] | + Video track [mkv] | + Pixel width: 640 [mkv] | + Pixel height: 480 [mkv] | + Display width: 640 [mkv] | + Display height: 480 [mkv] | + a track... [mkv] | + Track number: 2 [mkv] | + Track type: Audio [mkv] | + Codec ID: A_AAC/MPEG2/LC/SBR [mkv] | + Default duration: 42.667ms ( = 23.438 fps) [mkv] | + Default flag: 1 [mkv] | + Language: jpn [mkv] | + Audio track [mkv] | + Sampling frequency: 24000.000000 [mkv] | + Channels: 2 [mkv] | + a track... [mkv] | + Track number: 3 [mkv] | + Track type: Audio [mkv] | + Codec ID: A_AAC/MPEG2/LC/SBR [mkv] | + Default duration: 42.667ms ( = 23.438 fps) [mkv] | + Default flag: 0 [mkv] | + Language: fre [mkv] | + Audio track [mkv] | + Sampling frequency: 24000.000000 [mkv] | + Channels: 2 [mkv] | + a track... [mkv] | + Track number: 4 [mkv] | + Track type: Subtitle [mkv] | + Codec ID: S_VOBSUB [mkv] | + CodecPrivate, length 348 [mkv] | + Default flag: 1 [mkv] | + Language: fre [mkv] | + a track... [mkv] | + Track number: 5 [mkv] | + Track type: Subtitle [mkv] | + Codec ID: S_TEXT/UTF8 [mkv] | + Default flag: 0 [mkv] | + Language: mis [mkv] |+ found cluster, headers are parsed completely :) [mkv] Track ID 1: video (V_REAL/RV40), -vid 0 [mkv] Track ID 2: audio (A_AAC/MPEG2/LC/SBR), -aid 0, -alang jpn [mkv] Track ID 3: audio (A_AAC/MPEG2/LC/SBR), -aid 1, -alang fre [mkv] Track ID 4: subtitles (S_VOBSUB), -sid 0, -slang fre [mkv] Track ID 5: subtitles (S_TEXT/UTF8), -sid 1, -slang mis ==> Found video stream: 1 [mkv] Aspect: 0.000000 [mkv] Will play video track 1 ==> Found audio stream: 2 [mkv] Will play audio track 2 [mkv] VobSub size: 720x576 [mkv] VobSub forced subs: 0 [mkv] VobSub palette: 4af05a,81c44a,a3b833,c5a41f,a07c3d,7c6455,952336,b210a6,375be0,219e9b,49d58d,fe8080,b28080,7f8080,4d8080,008080 [mkv] VobSub custom colors: OFF [mkv] VobSub colors: 000000,000000,000000,000000 [mkv] Will display subtitle track 4 From what I see, maybe the problem simply comes from the difference in resolutions from the video stream (640x480) and the vobsub (720x576). But then if I'm right why does mplayer manage to display them correctly and not mencoder ? Cheers Marc Cousin -- BOFH Excuse #151: Some one needed the powerstrip, so they pulled the switch plug.
Marc Cousin wrote:
Hi,
I'm trying to convert a mkv with subtitles, to a simple xvid avi, with the subtitles directly displayed in the movie.
To do this, I've tried : mencoder -slang fre movie.mkv -oac mp3lame -lameopts cbr:br=128 -ovc xvid -xvidencopts vhq=1:chroma_me:hq_ac:bitrate=1500 -o movie.avi
I do this all the time, but like this: mencoder -oac mp3lame \ -ovc lavc \ -lavcopts vcodec=mpeg4:vqscale=2:vhq:v4mv:trell:vbitrate=1500 \ -aid 1 \ -sid 0 \ -o $file.avi $file.mkv For encoding, ffmpeg (lavc) rules, IMHO. -- Phil Ehrens <phil@slug.org> | Fun stuff: The SilverLake Linux Users Group | http://www.ralphmag.org 3428 Winslow Drive | http://www.yellow5.com Silverlake, CA 90026 | http://www.slug.org
On Wednesday 29 December 2004 15:21, Phil Ehrens wrote:
Marc Cousin wrote:
Hi,
I'm trying to convert a mkv with subtitles, to a simple xvid avi, with the subtitles directly displayed in the movie.
To do this, I've tried : mencoder -slang fre movie.mkv -oac mp3lame -lameopts cbr:br=128 -ovc xvid -xvidencopts vhq=1:chroma_me:hq_ac:bitrate=1500 -o movie.avi
I do this all the time, but like this:
mencoder -oac mp3lame \ -ovc lavc \ -lavcopts vcodec=mpeg4:vqscale=2:vhq:v4mv:trell:vbitrate=1500 \ -aid 1 \ -sid 0 \ -o $file.avi $file.mkv
For encoding, ffmpeg (lavc) rules, IMHO.
it's not an encoding problem, I think, but a subtitle problem. But I'll give it a try anyway
On Wednesday 29 December 2004 15:25, Marc Cousin wrote:
On Wednesday 29 December 2004 15:21, Phil Ehrens wrote:
Marc Cousin wrote:
Hi,
I'm trying to convert a mkv with subtitles, to a simple xvid avi, with the subtitles directly displayed in the movie.
To do this, I've tried : mencoder -slang fre movie.mkv -oac mp3lame -lameopts cbr:br=128 -ovc xvid -xvidencopts vhq=1:chroma_me:hq_ac:bitrate=1500 -o movie.avi
I do this all the time, but like this:
mencoder -oac mp3lame \ -ovc lavc \ -lavcopts vcodec=mpeg4:vqscale=2:vhq:v4mv:trell:vbitrate=1500 \ -aid 1 \ -sid 0 \ -o $file.avi $file.mkv
For encoding, ffmpeg (lavc) rules, IMHO.
it's not an encoding problem, I think, but a subtitle problem. But I'll give it a try anyway
Same problem. It's not codec related, I'm pretty sure it comes from the wrong size of the subtitles in the mkv stream
Marc Cousin wrote:
On Wednesday 29 December 2004 15:25, Marc Cousin wrote:
On Wednesday 29 December 2004 15:21, Phil Ehrens wrote:
Marc Cousin wrote:
Hi,
I'm trying to convert a mkv with subtitles, to a simple xvid avi, with the subtitles directly displayed in the movie.
To do this, I've tried : mencoder -slang fre movie.mkv -oac mp3lame -lameopts cbr:br=128 -ovc xvid -xvidencopts vhq=1:chroma_me:hq_ac:bitrate=1500 -o movie.avi
I do this all the time, but like this:
mencoder -oac mp3lame \ -ovc lavc \ -lavcopts vcodec=mpeg4:vqscale=2:vhq:v4mv:trell:vbitrate=1500 \ -aid 1 \ -sid 0 \ -o $file.avi $file.mkv
For encoding, ffmpeg (lavc) rules, IMHO.
it's not an encoding problem, I think, but a subtitle problem. But I'll give it a try anyway
Same problem. It's not codec related, I'm pretty sure it comes from the wrong size of the subtitles in the mkv stream
Hmm, I'm not an expert on subtitle formats, but the subtitles in all the .mkv files I've ever seen were in text format, so the size is controlled by the subtitle font you have installed for mplayer. In any case, if it looks distorted I think it is happening in the encoding. Good luck! -- Phil Ehrens <phil@slug.org> | Fun stuff: The SilverLake Linux Users Group | http://www.ralphmag.org 3428 Winslow Drive | http://www.yellow5.com Silverlake, CA 90026 | http://www.slug.org
On Wednesday 29 December 2004 17:24, Phil Ehrens wrote:
Marc Cousin wrote:
On Wednesday 29 December 2004 15:25, Marc Cousin wrote:
On Wednesday 29 December 2004 15:21, Phil Ehrens wrote:
Marc Cousin wrote:
Hi,
I'm trying to convert a mkv with subtitles, to a simple xvid avi, with the subtitles directly displayed in the movie.
To do this, I've tried : mencoder -slang fre movie.mkv -oac mp3lame -lameopts cbr:br=128 -ovc xvid -xvidencopts vhq=1:chroma_me:hq_ac:bitrate=1500 -o movie.avi
I do this all the time, but like this:
mencoder -oac mp3lame \ -ovc lavc \ -lavcopts vcodec=mpeg4:vqscale=2:vhq:v4mv:trell:vbitrate=1500 \ -aid 1 \ -sid 0 \ -o $file.avi $file.mkv
For encoding, ffmpeg (lavc) rules, IMHO.
it's not an encoding problem, I think, but a subtitle problem. But I'll give it a try anyway
Same problem. It's not codec related, I'm pretty sure it comes from the wrong size of the subtitles in the mkv stream
Hmm, I'm not an expert on subtitle formats, but the subtitles in all the .mkv files I've ever seen were in text format, so the size is controlled by the subtitle font you have installed for mplayer. In any case, if it looks distorted I think it is happening in the encoding. Good luck!
unfortunately, here, it's S_VOBSUB (track 4), not text ...
Marc Cousin wrote:
On Wednesday 29 December 2004 17:24, Phil Ehrens wrote:
Marc Cousin wrote:
On Wednesday 29 December 2004 15:25, Marc Cousin wrote:
On Wednesday 29 December 2004 15:21, Phil Ehrens wrote:
Marc Cousin wrote:
Hi,
I'm trying to convert a mkv with subtitles, to a simple xvid avi, with the subtitles directly displayed in the movie.
To do this, I've tried : mencoder -slang fre movie.mkv -oac mp3lame -lameopts cbr:br=128 -ovc xvid -xvidencopts vhq=1:chroma_me:hq_ac:bitrate=1500 -o movie.avi
I do this all the time, but like this:
mencoder -oac mp3lame \ -ovc lavc \ -lavcopts vcodec=mpeg4:vqscale=2:vhq:v4mv:trell:vbitrate=1500 \ -aid 1 \ -sid 0 \ -o $file.avi $file.mkv
For encoding, ffmpeg (lavc) rules, IMHO.
it's not an encoding problem, I think, but a subtitle problem. But I'll give it a try anyway
Same problem. It's not codec related, I'm pretty sure it comes from the wrong size of the subtitles in the mkv stream
Hmm, I'm not an expert on subtitle formats, but the subtitles in all the .mkv files I've ever seen were in text format, so the size is controlled by the subtitle font you have installed for mplayer. In any case, if it looks distorted I think it is happening in the encoding. Good luck!
unfortunately, here, it's S_VOBSUB (track 4), not text ...
Ah! Well, that is a shame. Those things are a huge pain. It may be easier to search the web for a set of srt subs than to fix the vobsubs. -- Phil Ehrens <phil@slug.org> | Fun stuff: The SilverLake Linux Users Group | http://www.ralphmag.org 3428 Winslow Drive | http://www.yellow5.com Silverlake, CA 90026 | http://www.slug.org
I have misplaced the original post, but did you say that the subs looked okay in mplayer? If so, you can output mpegpes video from mplayer and reencode that to make your avi. -- Phil Ehrens <phil@slug.org> | Fun stuff: The SilverLake Linux Users Group | http://www.ralphmag.org 3428 Winslow Drive | http://www.yellow5.com Silverlake, CA 90026 | http://www.slug.org
On Wednesday 29 December 2004 17:45, Phil Ehrens wrote:
I have misplaced the original post, but did you say that the subs looked okay in mplayer? If so, you can output mpegpes video from mplayer and reencode that to make your avi. you're right, that may be a solution... do you know of a way to decode full speed (it will be slow to convert, if i can't do that :) )
On Wednesday 29 December 2004 18:02, Marc Cousin wrote:
On Wednesday 29 December 2004 17:45, Phil Ehrens wrote:
I have misplaced the original post, but did you say that the subs looked okay in mplayer? If so, you can output mpegpes video from mplayer and reencode that to make your avi.
you're right, that may be a solution... do you know of a way to decode full speed (it will be slow to convert, if i can't do that :) ) with -vo mpegpes:file.mpeg, subtitles aren't displayed at all ... :(
_______________________________________________ MEncoder-users mailing list MEncoder-users@mplayerhq.hu http://mplayerhq.hu/mailman/listinfo/mencoder-users
Marc Cousin wrote:
On Wednesday 29 December 2004 18:02, Marc Cousin wrote:
On Wednesday 29 December 2004 17:45, Phil Ehrens wrote:
I have misplaced the original post, but did you say that the subs looked okay in mplayer? If so, you can output mpegpes video from mplayer and reencode that to make your avi.
you're right, that may be a solution... do you know of a way to decode full speed (it will be slow to convert, if i can't do that :) ) with -vo mpegpes:file.mpeg, subtitles aren't displayed at all ... :(
Hmmm... when I have done it, the vobsub file was seperate. You may have to demux the .mkv file and use the -vobsub and -vobsubid options. BTW, I found an apparently undocumented feature of the -x mplayer option to transcode: http://zebra.fh-weingarten.de/~maxi/html/transcode-devel/2003-03/msg00018.ht... Which I am going to try and get more info about on the transcode mailing list... -- Phil Ehrens <phil@slug.org> | Fun stuff: The SilverLake Linux Users Group | http://www.ralphmag.org 3428 Winslow Drive | http://www.yellow5.com Silverlake, CA 90026 | http://www.slug.org
On Wednesday 29 December 2004 18:30, Phil Ehrens wrote:
Marc Cousin wrote:
On Wednesday 29 December 2004 18:02, Marc Cousin wrote:
On Wednesday 29 December 2004 17:45, Phil Ehrens wrote:
I have misplaced the original post, but did you say that the subs looked okay in mplayer? If so, you can output mpegpes video from mplayer and reencode that to make your avi.
you're right, that may be a solution... do you know of a way to decode full speed (it will be slow to convert, if i can't do that :) )
with -vo mpegpes:file.mpeg, subtitles aren't displayed at all ... :(
Hmmm... when I have done it, the vobsub file was seperate. You may have to demux the .mkv file and use the -vobsub and -vobsubid options. you're going to like this one ... It's impossible to demux a S_VOBSUB ... :)
BTW, I found an apparently undocumented feature of the -x mplayer option to transcode:
http://zebra.fh-weingarten.de/~maxi/html/transcode-devel/2003-03/msg00018.h tml Maybe the -x mplayer is another solution :)
Which I am going to try and get more info about on the transcode mailing list...
Marc Cousin wrote:
On Wednesday 29 December 2004 18:30, Phil Ehrens wrote:
Marc Cousin wrote:
On Wednesday 29 December 2004 18:02, Marc Cousin wrote:
On Wednesday 29 December 2004 17:45, Phil Ehrens wrote:
I have misplaced the original post, but did you say that the subs looked okay in mplayer? If so, you can output mpegpes video from mplayer and reencode that to make your avi.
you're right, that may be a solution... do you know of a way to decode full speed (it will be slow to convert, if i can't do that :) )
with -vo mpegpes:file.mpeg, subtitles aren't displayed at all ... :(
Hmmm... when I have done it, the vobsub file was seperate. You may have to demux the .mkv file and use the -vobsub and -vobsubid options. you're going to like this one ... It's impossible to demux a S_VOBSUB ... :)
Oh my, Bug #80, LOW priority... too bad. What about using: mplayer -vo yuv4mpeg ... >& /dev/null and mencoder -i stream.yuv ... This is of course getting into the magical realm... -- Phil Ehrens <phil@slug.org> | Fun stuff: The SilverLake Linux Users Group | http://www.ralphmag.org 3428 Winslow Drive | http://www.yellow5.com Silverlake, CA 90026 | http://www.slug.org
Marc Cousin wrote:
On Wednesday 29 December 2004 18:30, Phil Ehrens wrote:
Marc Cousin wrote:
On Wednesday 29 December 2004 18:02, Marc Cousin wrote:
On Wednesday 29 December 2004 17:45, Phil Ehrens wrote:
I have misplaced the original post, but did you say that the subs looked okay in mplayer? If so, you can output mpegpes video from mplayer and reencode that to make your avi.
you're right, that may be a solution... do you know of a way to decode full speed (it will be slow to convert, if i can't do that :) )
with -vo mpegpes:file.mpeg, subtitles aren't displayed at all ... :(
Hmmm... when I have done it, the vobsub file was seperate. You may have to demux the .mkv file and use the -vobsub and -vobsubid options.
you're going to like this one ... It's impossible to demux a S_VOBSUB ... :)
Oh my, Bug #80, LOW priority... too bad. What about using:
mplayer -vo yuv4mpeg ... >& /dev/null and mencoder -i stream.yuv ...
This is of course getting into the magical realm... It's been a while on this one... I've been very busy, but I can work on this again ... The -vo yuv4mpeg works, thanks, but is there a way to speed up the creation of
On Wednesday 29 December 2004 19:07, Phil Ehrens wrote: the stream.yuv ? Then, what's the best way to put the sound back in the target movie ?
Marc Cousin wrote:
Marc Cousin wrote:
On Wednesday 29 December 2004 18:30, Phil Ehrens wrote:
Marc Cousin wrote:
On Wednesday 29 December 2004 18:02, Marc Cousin wrote:
On Wednesday 29 December 2004 17:45, Phil Ehrens wrote: > I have misplaced the original post, but did you say that > the subs looked okay in mplayer? If so, you can output > mpegpes video from mplayer and reencode that to make your > avi.
you're right, that may be a solution... do you know of a way to decode full speed (it will be slow to convert, if i can't do that :) )
with -vo mpegpes:file.mpeg, subtitles aren't displayed at all ... :(
Hmmm... when I have done it, the vobsub file was seperate. You may have to demux the .mkv file and use the -vobsub and -vobsubid options.
you're going to like this one ... It's impossible to demux a S_VOBSUB ... :)
Oh my, Bug #80, LOW priority... too bad. What about using:
mplayer -vo yuv4mpeg ... >& /dev/null and mencoder -i stream.yuv ...
This is of course getting into the magical realm... It's been a while on this one... I've been very busy, but I can work on this again ... The -vo yuv4mpeg works, thanks, but is there a way to speed up the creation of
On Wednesday 29 December 2004 19:07, Phil Ehrens wrote: the stream.yuv ? Then, what's the best way to put the sound back in the target movie ?
mplayer -ao pcm -vo null -vc dummy ... | lame (or sox, or ?) maybe that's not the best way, just one way. Dealing with this vob-in-a-mkv thing seems pretty nasty. Glad I've never seen one. -- Phil Ehrens <phil@slug.org> | Fun stuff: The SilverLake Linux Users Group | http://www.ralphmag.org 3428 Winslow Drive | http://www.yellow5.com Silverlake, CA 90026 | http://www.slug.org
On Saturday 22 January 2005 17:24, Phil Ehrens wrote:
Marc Cousin wrote:
On Wednesday 29 December 2004 19:07, Phil Ehrens wrote:
Marc Cousin wrote:
On Wednesday 29 December 2004 18:30, Phil Ehrens wrote:
Marc Cousin wrote:
On Wednesday 29 December 2004 18:02, Marc Cousin wrote: > On Wednesday 29 December 2004 17:45, Phil Ehrens wrote: > > I have misplaced the original post, but did you say that > > the subs looked okay in mplayer? If so, you can output > > mpegpes video from mplayer and reencode that to make your > > avi. > > you're right, that may be a solution... > do you know of a way to decode full speed (it will be slow to > convert, if i can't do that :) )
with -vo mpegpes:file.mpeg, subtitles aren't displayed at all ... :(
Hmmm... when I have done it, the vobsub file was seperate. You may have to demux the .mkv file and use the -vobsub and -vobsubid options.
you're going to like this one ... It's impossible to demux a S_VOBSUB ...
:)
Oh my, Bug #80, LOW priority... too bad. What about using:
mplayer -vo yuv4mpeg ... >& /dev/null and mencoder -i stream.yuv ...
This is of course getting into the magical realm...
It's been a while on this one... I've been very busy, but I can work on this again ... The -vo yuv4mpeg works, thanks, but is there a way to speed up the creation of the stream.yuv ? Then, what's the best way to put the sound back in the target movie ?
mplayer -ao pcm -vo null -vc dummy ... | lame (or sox, or ?)
maybe that's not the best way, just one way. Dealing with this vob-in-a-mkv thing seems pretty nasty. Glad I've never seen one. Ok, I think I'm about to succeed encoding one (27 to go :( ) I must say I'm lucky it's all "small"100M files, as the yuv is 15G every time ... :)
Marc Cousin wrote:
On Saturday 22 January 2005 17:24, Phil Ehrens wrote:
Marc Cousin wrote:
On Wednesday 29 December 2004 19:07, Phil Ehrens wrote:
Marc Cousin wrote:
On Wednesday 29 December 2004 18:30, Phil Ehrens wrote:
Marc Cousin wrote: > On Wednesday 29 December 2004 18:02, Marc Cousin wrote: > > On Wednesday 29 December 2004 17:45, Phil Ehrens wrote: > > > I have misplaced the original post, but did you say that > > > the subs looked okay in mplayer? If so, you can output > > > mpegpes video from mplayer and reencode that to make your > > > avi. > > > > you're right, that may be a solution... > > do you know of a way to decode full speed (it will be slow to > > convert, if i can't do that :) ) > > with -vo mpegpes:file.mpeg, subtitles aren't displayed at all ... > :(
Hmmm... when I have done it, the vobsub file was seperate. You may have to demux the .mkv file and use the -vobsub and -vobsubid options.
you're going to like this one ... It's impossible to demux a S_VOBSUB ...
:)
Oh my, Bug #80, LOW priority... too bad. What about using:
mplayer -vo yuv4mpeg ... >& /dev/null and mencoder -i stream.yuv ...
This is of course getting into the magical realm...
It's been a while on this one... I've been very busy, but I can work on this again ... The -vo yuv4mpeg works, thanks, but is there a way to speed up the creation of the stream.yuv ? Then, what's the best way to put the sound back in the target movie ?
mplayer -ao pcm -vo null -vc dummy ... | lame (or sox, or ?)
maybe that's not the best way, just one way. Dealing with this vob-in-a-mkv thing seems pretty nasty. Glad I've never seen one. Ok, I think I'm about to succeed encoding one (27 to go :( ) I must say I'm lucky it's all "small"100M files, as the yuv is 15G every time ... :)
I wish smebody who knows more about it would comment, but I *think* that the stream.yuv file is a fifo, so you can just call mencoder right after you start mplayer and avoid creating a 15G file. I don't think a fifo can get that big anyway... somebody with experience doing this needs to speak up here. -- Phil Ehrens <phil@slug.org> | Fun stuff: The SilverLake Linux Users Group | http://www.ralphmag.org 3428 Winslow Drive | http://www.yellow5.com Silverlake, CA 90026 | http://www.slug.org
Marc Cousin wrote:
On Wednesday 29 December 2004 17:45, Phil Ehrens wrote:
I have misplaced the original post, but did you say that the subs looked okay in mplayer? If so, you can output mpegpes video from mplayer and reencode that to make your avi. you're right, that may be a solution... do you know of a way to decode full speed (it will be slow to convert, if i can't do that :) )
The only things I know of to speed it up are to not decode the audio when you decode the video, and to use -oac copy to avoid encoding the audio when you reencode. Other than that, ffmpeg (lavc) is about twice as fast at encoding as bbmpeg (xvidenc, or whatever it's called). If I seem to be offering a lot of advice, but not to know exactly what I'm talking about, it's because I do a LOT of encoding, but don't really know anything about video ;^) -- Phil Ehrens <phil@slug.org> | Fun stuff: The SilverLake Linux Users Group | http://www.ralphmag.org 3428 Winslow Drive | http://www.yellow5.com Silverlake, CA 90026 | http://www.slug.org
participants (2)
-
Marc Cousin -
Phil Ehrens