[MPlayer-users] transform .mkv in divx and add sub in an .avi

octane octane at alinto.com
Sat Jul 9 14:24:48 CEST 2005


Phil Oleynik a écrit :

> octane wrote:
>
>> Hello
>>
>> two questions.
>>
>> 1.
>> I got a mkv file which have 2 sound channel and 2 sub files.
>> I can play nice the movie with mplayer.
>> I want:
>> change the video codec, use one sound channel, and 1 sub file
>> in order to have a single divX file.
>> How can I do that with mencoder?
>
>
> You probably cannot, excluding hardsubbing way. AVI may contain subtitles
> in some strange way, but it is similar to "with sufficient thrust, 
> pigs fly just fine.
> However, this is not necessarily a good idea." RFC1925.3
> If you are talking about new DivX container, AFAIK it is not supported 
> as output.
>
No, I just want to have subtitles *in* the images of the movie. Dont' want
to play with multiples flows in one file like mkv.

>> 2.
>> I have a .avi file and a sub .srt file. I want to mix them in order
>> to have the file _with_ the sub. Also, I need to intriduce a -subdelay.
>> How can I do that with mencoder?
>
>
> You can shift timecode with tons of utils, without mencoder. And then 
> do any of
> you like, hardsub or muxing in OGM/MKV.

At last, it's easy with
mencoder file.avi -ovc lavc -lavcopts vcodec=mpeg4 -sub subfile.txt
-subdelay 12 -o movie.avi

And I have the movie subtitles incrusted, no sound.

mencoder movie.avi -ovc copy -oac copy -audiofile video.ogg -o out.avi
gives me an error
Flux vidéo:  820.137 kbit/s  (102517 bps)  taille: 4145793 octets
40.440 secs  1121 trames

Flux audio:  112.000 kbit/s  (13999 bps)  taille: 574000 octets  41.000 secs
*** glibc detected *** double free or corruption (!prev): 0x08692868 ***
Abandon

And the out.avi have no sound.

I use the mmg tools to mux movie.avi and video.ogg, and I have a .mkv
file, with images+sub+sound (1 ogg flow for sound, 1 mpeg flow with
images of the movies remencoded with sub in it).

And at last, I do a

mencoder out.mkv -oac copy -ovc copy -o ok.avi

but mencoder hangs :
Failed to open frameno.avi
success: format: 0  data: 0x0 - 0x5f3635
[mkv] Track ID 1: audio (A_VORBIS), -aid 0, -alang und
[mkv] Track ID 2: video (V_MS/VFW/FOURCC), -vid 0
[mkv] Will play video track 2
[mkv] Will play audio track 1
Matroska file detected..
VIDEO:  [FMP4]  480x360  24bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:31  fourcc:0x34504D46  size:480x360  fps:25.00  ftime:=0.0400
videocodec: framecopy (480x360 24bpp fourcc=34504d46)
audiocodec: framecopy (format=7276 chans=2 rate=44100 bits=16 bps=0
sample-0)
Writing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not
writing vprp header.
ODML: Aspect information not (yet?) available or unspecified, not
writing vprp header.
Pos:   0.0s      1f ( 0%)   0fps Trem:   0min  10mb  A-V:  nan [0:0]

(...) and nothing happens from there.

An idea to make it another way?

The goal is to have a single old divX codec file, in order to play it
everywhere: mac, win, linux, CD-player compatible divx on TV.
thanks





More information about the MPlayer-users mailing list