[MEncoder-users] WMV to FLV problem with video

Brandon Ooi booi at crunchyroll.com
Mon Jan 12 18:25:14 CET 2009


You need to know what the input file's fps is.

Use ffmpeg

> ffmpeg -i $FILENAME

Take resulting FPS and put into mencoder.

> mencoder -forceidx -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=250:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf scale=360:240 -fps $FPS -ofps $FPS -o Video.wmv.flv Video.wmv

b


On Mon, Jan 12, 2009 at 9:14 AM, Francisco Antonio Vieira Souza
<francisco.vieira.souza at gmail.com> wrote:
> Sorry but I am kinda newbie on mencoder, could you tell me what I have to
> change in this command line?
>
>  (I had copied this from somewhere in web)
>
> mencoder -forceidx -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050
> -ovc lavc -lavcopts
> vcodec=flv:vbitrate=250:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf
> scale=360:240 -o Video.wmv.flv Video.wmv
>
> Thank you very much for your reply.
> 2009/1/12 Brandon Ooi <booi at crunchyroll.com>
>
>> Mencoder can't read fps from a wmv container.
>>
>> use -fps to force the input fps (read from vlc or something)
>> use -ofps to set the output fps.
>>
>> b
>>
>> On Mon, Jan 12, 2009 at 4:45 AM, Francisco Antonio Vieira Souza
>> <francisco.vieira.souza at gmail.com> wrote:
>> > I tried to convert wmv video to flv using 2 command lines, in both
>> > cases the video seems to play too quickly and finishes but the audio
>> > keeps playing normally.
>> >
>> > mencoder -forceidx -of lavf -oac mp3lame -lameopts abr:br=56 -srate
>> > 22050 -ovc lavc -lavcopts
>> > vcodec=flv:vbitrate=250:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf
>> > scale=360:240 -o Video.wmv.flv Video.wmv
>> >
>> > mencoder -forceidx -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc
>> > -lavcopts vcodec=flv:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf
>> > scale=360:240 -o Video.wmv.flv Video.wmv
>> >
>> > Output:
>> > MEncoder 1.0rc2-4.2.1 (C) 2000-2007 MPlayer Team
>> > CPU: AMD Turion(tm) 64 Mobile Technology ML-32 (Family: 15, Model: 36,
>> > Stepping: 2)
>> > CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
>> > Compiled with runtime CPU detection.
>> > success: format: 0  data: 0x0 - 0x67259
>> > ASF file format detected.
>> > [asfheader] Audio stream found, -aid 1
>> > [asfheader] Video stream found, -vid 2
>> > VIDEO:  [MP43]  320x240  24bpp  1000.000 fps    0.0 kbps ( 0.0 kbyte/s)
>> > [V] filefmt:6  fourcc:0x3334504D  size:320x240  fps:1000.00
>>  ftime:=0.0010
>> >
>> ==========================================================================
>> > Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
>> > AUDIO: 22050 Hz, 2 ch, s16le, 32.0 kbit/4.54% (ratio: 4005->88200)
>> > Selected audio codec: [ffwmav2] afm: ffmpeg (DivX audio v2 (FFmpeg))
>> >
>> ==========================================================================
>> > OK, exit
>> > Opening video filter: [expand osd=1]
>> > Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
>> > Opening video filter: [scale w=360 h=240]
>> >
>> ==========================================================================
>> > Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
>> > Selected video codec: [ffdivx] vfm: ffmpeg (FFmpeg DivX ;-) (MS MPEG-4
>> v3))
>> >
>> ==========================================================================
>> > MP3 audio selected.
>> > VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12)
>> > VDec: using Planar YV12 as output csp (no 0)
>> > Movie-Aspect is undefined - no prescaling applied.
>> > videocodec: libavcodec (360x240 fourcc=31564c46 [FLV1])
>> > [VE_LAVC] High quality encoding selected (non-realtime)!
>> > VIDEO CODEC ID: 22
>> > AUDIO CODEC ID: 15001, TAG: 0
>> > Writing header...
>> > Pos:   0.0s      1f ( 3%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
>> > ...
>> > Pos:  12.5s    358f (100%) 76.87fps Trem:   0min   0mb  A-V:0.007 [55:46]
>> >
>> > Flushing video frames.
>> > Writing index...
>> >
>> > Video stream:   55.586 kbit/s  (6948 B/s)  size: 87124 bytes  12.539
>> > secs  358 frames
>> >
>> > Audio stream:   46.176 kbit/s  (5771 B/s)  size: 72072 bytes  12.487 secs
>> >
>> >
>> > What am I doing wrong?
>> > _______________________________________________
>> > MEncoder-users mailing list
>> > MEncoder-users at mplayerhq.hu
>> > https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>> >
>> _______________________________________________
>> MEncoder-users mailing list
>> MEncoder-users at mplayerhq.hu
>> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>>
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>



More information about the MEncoder-users mailing list