[MEncoder-users] encode to flv with sound

Andrei-Ionut Balcanasu andrei.balcanasu at gruprc.ro
Wed Mar 21 18:13:15 CET 2007


Hello
I have a peculiar problem with mencoder. I want to encode videos into 
flv format. The problem is that it returned a zero byte size file when I 
want to encode it with sount (lame). When I skip the sound part, the 
encoding is succesfull. What did  I do wrong?

1st command (with sound)
mencoder attention.mpg -o temp07.flv -of lavf -oac mp3lame -lameopts 
abr:br=56 -srate 22050 -ovc lavc -lavcopts 
vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -lavfopts 
i_certify_that_my_video_stream_does_not_use_b_frames

Output:
** MUXER_LAVF 
*****************************************************************
You have certified that your video stream does not contain B frames.
REMEMBER: MEncoder's libavformat muxing is presently broken and will 
generate
INCORRECT files in the presence of B frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
The selected video_out device is incompatible with this codec.
Try adding the scale filter, e.g. -vf spp,scale instead of -vf spp.
[root at developer lib]# mencoder /var/www/html/new.catavencu/attention.mpg 
-o /var/www/html/new.catavencu/temp07.flv -of lavf -oac mp3lame 
-lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts 
vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -lavfopts 
i_certify_that_my_video_stream_does_not_use_b_frames
MEncoder 1.0rc1-4.1.1 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Xeon(TM) CPU 2.40GHz (Family: 15, Model: 2, Stepping: 7)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

success: format: 0  data: 0x0 - 0x1892ab
MPEG-PS file format detected.
VIDEO:  MPEG1  240x180  (aspect 8)  25.000 fps  250.0 kbps (31.2 kbyte/s)
[V] filefmt:2  fourcc:0x10000001  size:240x180  fps:25.00  ftime:=0.0400
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 32000 Hz, 2 ch, s16le, 32.0 kbit/3.12% (ratio: 4000->128000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
** MUXER_LAVF 
*****************************************************************
You have certified that your video stream does not contain B frames.
REMEMBER: MEncoder's libavformat muxing is presently broken and will 
generate
INCORRECT files in the presence of B frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 240 x 180 (preferred colorspace: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try adding the scale filter, e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
==========================================================================

Exiting...


2nd command (no sound):
mencoder attention.mpg -o temp07.flv -of lavf -nosound -ovc lavc 
-lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 
-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames

Output:
MEncoder 1.0rc1-4.1.1 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Xeon(TM) CPU 2.40GHz (Family: 15, Model: 2, Stepping: 7)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

success: format: 0  data: 0x0 - 0x1892ab
MPEG-PS file format detected.
VIDEO:  MPEG1  240x180  (aspect 8)  25.000 fps  250.0 kbps (31.2 kbyte/s)
[V] filefmt:2  fourcc:0x10000001  size:240x180  fps:25.00  ftime:=0.0400
** MUXER_LAVF 
*****************************************************************
You have certified that your video stream does not contain B frames.
REMEMBER: MEncoder's libavformat muxing is presently broken and will 
generate
INCORRECT files in the presence of B frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 240 x 180 (preferred colorspace: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try adding the scale filter, e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
==========================================================================
VDec: vo config request - 240 x 180 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.42:1 - prescaling to correct movie aspect.
videocodec: libavcodec (240x180 fourcc=766c66 [flv])
[VE_LAVC] High quality encoding selected (non-realtime)!
VIDEO CODEC ID: 02f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
Writing header...

1 duplicate frame(s)!
Pos:  45.0s   1125f (99%) 109.69fps Trem:   0min   2mb  A-V:0.000 [386:0]
Flushing video frames
Writing index...
SEEK 4
SEEK 52
SEEK 148
SEEK 2192649

Video stream:  386.925 kbit/s  (48365 B/s)  size: 2174517 bytes  44.960 
secs  1125 frames

Sorry for the big post, but I really don't understand where is the problem.
Thank you.

-- 



Andrei-Ionut Balcanasu
Web Developer New Media
Grupul Realitatea Catavencu

andrei.balcanasu at gruprc.ro




More information about the MEncoder-users mailing list