[MEncoder-users] Mencoder segmentation fault

Grozdan Nikolov microchip at chello.be
Tue Jul 17 15:11:20 CEST 2007


On Tuesday 17 July 2007 12:38, Sofija Blazevski wrote:
> Grozdan Nikolov wrote:
> > On Monday 16 July 2007 22:10, Sofija Blazevski wrote:
> >> Grozdan Nikolov wrote:
> >>> Is this a WMV9 file? if so, AFAIK, WMV9 supports b-frames (I might be
> >>> wrong though) so if the input file has any b-frames in it, the lavf
> >>> muxer will segfaul... Make sure that you don't feed this muxer with any
> >>> files that have b-frames in them
> >>>
> >>> Maybe first re-encode the input file to Xvid or Divx *without* b-frames
> >>> and then use the resulting file with the lavf muxer to convert it to
> >>> FLV
> >>
> >> No this is WMV8 file - I had to add additional codec for it (it isn't
> >> with in binary codec package available from
> >> http://www.mplayerhq.hu/design7/dload.html )
> >> And it is not just with .wmv same is for .mov and I think for .avi but
> >> I'd have to check. For sure it goes ok with .mpg
> >
> > hmmm this is strange, I have no problems converting files without
> > b-frames into FLV format using the lavf muxer
>
> I think I might found source of the problem. There are two files that
> succeeded converting to flv. Both of them had no audio, just video.
> "Segmentation fault" probably is connected to "MP3 Audio selected"
> appearing just before it.Look at these outputs

Yes, this could be a problem with mp3lame. I'm not a MEncoder developer but 
I've tested several files here with the same options you use and they all 
converted. I don't think I can help more on that issue, maybe wait until a 
developer responds

As for the errors, VDecorder init failed is because it has opened first the 
MPEG PS decoder but your file is not MPEG PS rather a normal MPEG 1 or 2 
file. Nothing to worry, I see it a lot of the times here. If a decoder is 
incompatible with a video format, after it opens it will print some 
errors/warnings that it cannot play this file and it will exit. Then, 
MEncoder will try the next decoder (libmpeg2 in your case) which successfully 
has detected the format of your file


>
> [OUTPUT 1 START ]
>  mencoder video/a3.avi -o flvideo/a3.flv -of lavf -oac mp3lame -lameopts
> abr:br=56 -ovc lavc -lavcopts
> vcodec=flv:vbitrate=800:mbd=2:mv0:trell:v4mv:keyint=10:cbp:last_pred=3
> -lavfopts
> format=flv:i_certify_that_my_video_stream_does_not_use_b_frames -srate
> 22050 MEncoder 1.0rc1-3.4.6 (C) 2000-2006 MPlayer Team
> CPU: Dual-Core AMD Opteron(tm) Processor 1212 (Family: 15, Model: 67,
> Stepping: 3)
> 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 - 0x23af0
> AVI file format detected.
> AVI_NI: No audio stream found -> no sound.
> AVI: No audio stream found -> no sound.
> VIDEO:  [IV50]  240x180  24bpp  10.000 fps  111.7 kbps (13.6 kbyte/s)
> [V] filefmt:3  fourcc:0x30355649  size:240x180  fps:10.00  ftime:=0.1000
> ** 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: [dshow] DirectShow video codecs
> Decoder supports the following YUV formats: YUY2 IYUV UYVY YV12 I420
> Decoder is capable of YUV output (flags 0x2f)
> VDec: vo config request - 240 x 180 (preferred colorspace: Packed YUY2)
> [PP] Using codec's postprocessing, max q = 4.
> VDec: using Planar YV12 as output csp (no 0)
> Movie-Aspect is undefined - no prescaling applied.
> videocodec: libavcodec (240x180 fourcc=766c66 [flv])
> [VE_LAVC] High quality encoding selected (non-realtime)!
> Selected video codec: [indeo5ds] vfm: dshow (Intel Indeo 5)
> ==========================================================================
> VIDEO CODEC ID: 0
> Writing header...
> Pos:  10.0s    100f (98%)  0.00fps Trem:   0min   0mb  A-V:0.000 [308:0]
> Flushing video frames
> Writing index...
> SEEK 4
> SEEK 52
> SEEK 148
> SEEK 387743
>
> Video stream:  308.783 kbit/s  (38597 B/s)  size: 385979 bytes  10.000
> secs  100 frames
> [OUTPUT 1 END]
>
>
> [OUTPUT 2 START]
>  mencoder video/Pinguino.mpg -o flvideo/pinguino.flv -of lavf -oac
> mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts
> vcodec=flv:vbitrate=800:mbd=2:mv0:trell:v4mv:keyint=10:cbp:last_pred=3
> -lavfopts
> format=flv:i_certify_that_my_video_stream_does_not_use_b_frames -srate
> 22050 MEncoder 1.0rc1-3.4.6 (C) 2000-2006 MPlayer Team
> CPU: Dual-Core AMD Opteron(tm) Processor 1212 (Family: 15, Model: 67,
> Stepping: 3)
> 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 - 0x6169c
> MPEG-ES file format detected.
> VIDEO:  MPEG1  360x288  (aspect 1)  25.000 fps  921.6 kbps (115.2 kbyte/s)
> [V] filefmt:1  fourcc:0x10000001  size:360x288  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 - 360 x 288 (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 - 360 x 288 (preferred colorspace: Planar YV12)
> VDec: using Planar YV12 as output csp (no 0)
> Movie-Aspect is 1.25:1 - prescaling to correct movie aspect.
> videocodec: libavcodec (360x288 fourcc=766c66 [flv])
> [VE_LAVC] High quality encoding selected (non-realtime)!
> VIDEO CODEC ID: 02f ( 3%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
> Writing header...
>
> 1 duplicate frame(s)!
> Pos:   3.4s     86f (99%) 61.87fps Trem:   0min   0mb  A-V:0.000 [1118:0]
> Flushing video frames
> Writing index...
> SEEK 4
> SEEK 52
> SEEK 148
> SEEK 476717
>
> Video stream: 1118.139 kbit/s  (139767 B/s)  size: 475209 bytes  3.400
> secs  86 frames
> [OUTPUT 2 END]
>
> You see, I thnik they passed because they don't have sound. Next output
> is .avi with audio
>
> [OUTPUT 3 START]
> mencoder video/p.avi -o flvideo/p.flv -of lavf -oac mp3lame -lameopts
> abr:br=56 -ovc lavc -lavcopts
> vcodec=flv:vbitrate=800:mbd=2:mv0:trell:v4mv:keyint=10:cbp:last_pred=3
> -lavfopts
> format=flv:i_certify_that_my_video_stream_does_not_use_b_frames -srate
> 22050 MEncoder 1.0rc1-3.4.6 (C) 2000-2006 MPlayer Team
> CPU: Dual-Core AMD Opteron(tm) Processor 1212 (Family: 15, Model: 67,
> Stepping: 3)
> 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 - 0x13592a
> AVI file format detected.
> Detected NON-INTERLEAVED AVI file format.
> VIDEO:  [DIVX]  640x480  24bpp  29.970 fps  1020.3 kbps (124.6 kbyte/s)
> [V] filefmt:3  fourcc:0x58564944  size:640x480  fps:29.97  ftime:=0.0334
> ==========================================================================
> Opening audio decoder: [msadpcm] MS ADPCM audio decoder
> AUDIO: 22050 Hz, 2 ch, s16le, 177.4 kbit/25.15% (ratio: 22179->88200)
> Selected audio codec: [msadpcm] afm: msadpcm (MS ADPCM)
> ==========================================================================
> ** 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: [ffmpeg] FFmpeg's libavcodec codec family
> Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
> ==========================================================================
> MP3 audio selected.
> Segmentation fault
> [OUTPUT 3 END]
>
> Do you have any idea how to fix this?
>
>
> In the output 2 there are some errors but it converted, how important is
> this part?
>
> 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 :(
>
> >> Just for info, can I check if there is B frame in a movie using
> >> mencoder? Or some other program? I ask because I'd like to see if check
> >> it through php at the end by using exec for example.
> >
> > you can visualize b-frames with:
> >
> > mplayer -lavdopts vismv=2 path_to_file.wmv
> >
> > not sure if it's very useful
>
> It is useful visually :) but I can use it as I'd like with php exec.
>
> >> Here is output of .mov
> >>
> >> [OUTPUT START]
> >>  mencoder video/14.mov -o flvideo/14.flv -of lavf -oac mp3lame -lameopts
> >> abr:br=56 -ovc lavc -lavcopts
> >> vcodec=flv:vbitrate=800:mbd=2:mv0:trell:v4mv:keyint=10:cbp:last_pred=3
> >> -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -srate
> >> 22050
> >
> > add just before the -lavfopts option...
> >
> > format=flv:i_certify_that_my_video_stream_does_not_use_b_frame
> >
> >> MEncoder 1.0rc1-3.4.6 (C) 2000-2006 MPlayer Team
> >> CPU: Dual-Core AMD Opteron(tm) Processor 1212 (Family: 15, Model: 67,
> >> Stepping: 3)
> >> 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 - 0x116358
> >> Quicktime/MOV file format detected.
> >> VIDEO:  [mp4v]  320x240  24bpp  15.000 fps    0.0 kbps ( 0.0 kbyte/s)
> >> [V] filefmt:7  fourcc:0x7634706D  size:320x240  fps:15.00  ftime:=0.0667
> >> ========================================================================
> >>== Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
> >> AUDIO: 32000 Hz, 2 ch, s16le, 64.0 kbit/6.25% (ratio: 8000->128000)
> >> Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio)
> >> decoder)
> >> ========================================================================
> >>== ** 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: [ffmpeg] FFmpeg's libavcodec codec family
> >> Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
> >> ========================================================================
> >>== MP3 audio selected.
> >> Segmentation fault
> >> [OUTPUT END]
> >>
> >> Might it be something with audio - "Segmentation fault" appeared just
> >> after  "MP3 audio selected."?
> >>
> >>>> [OUTPUT START]
> >>>> mencoder video/15.wmv -o flvideo/15.flv -of lavf -oac mp3lame
> >>>> -lameopts abr:br=56 -ovc lavc -lavcopts
> >>>> vcodec=flv:vbitrate=800:mbd=2:mv0:trell:v4mv:keyint=10:cbp:last_pred=3
> >>>> -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -srate
> >>>> 22050 MEncoder 1.0rc1-3.4.6 (C) 2000-2006 MPlayer Team
> >>>> CPU: Dual-Core AMD Opteron(tm) Processor 1212 (Family: 15, Model: 67,
> >>>> Stepping: 3)
> >>>> 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 - 0x75880
> >>>> ASF file format detected.
> >>>> VIDEO:  [WMV2]  320x240  24bpp  1000.000 fps    0.0 kbps ( 0.0
> >>>> kbyte/s) [V] filefmt:6  fourcc:0x32564D57  size:320x240  fps:1000.00
> >>>> ftime:=0.0010
> >>>> ======================================================================
> >>>>== == Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
> >>>> AUDIO: 32000 Hz, 2 ch, s16le, 40.0 kbit/3.91% (ratio: 5000->128000)
> >>>> Selected audio codec: [ffwmav2] afm: ffmpeg (DivX audio v2 (FFmpeg))
> >>>> ======================================================================
> >>>>== == ** 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: [dshow] DirectShow video codecs
> >>>> Decoder supports the following YUV formats: YUY2 IYUV UYVY YV12 YVYU
> >>>> I420 YVU9
> >>>> Decoder is capable of YUV output (flags 0x7f)
> >>>> VDec: vo config request - 320 x 240 (preferred colorspace: Packed
> >>>> YUY2) [PP] Using codec's postprocessing, max q = 4.
> >>>> VDec: using Planar YV12 as output csp (no 0)
> >>>> Movie-Aspect is undefined - no prescaling applied.
> >>>> videocodec: libavcodec (320x240 fourcc=766c66 [flv])
> >>>> [VE_LAVC] High quality encoding selected (non-realtime)!
> >>>> Selected video codec: [wmv8] vfm: dshow (Windows Media Video 8)
> >>>> ======================================================================
> >>>>== == MP3 audio selected.
> >>>> Segmentation fault
> >>>> [OUTPUT END
> >>>> ]
> >>>>
> >>>> Grozdan Nikolov wrote:
> >>>>> On Monday 16 July 2007 13:37, Sofija Blazevski wrote:
> >>>>>> [OUTPUT START]
> >>>>>> mencoder video/9.wmv -o flvideo/9.flv -of lavf -oac mp3lame
> >>>>>> -lameopts abr=br56 -ovc lavc -lavcopts
> >>>>>> vcodec=flv:vbitrate=800:mbd=2:mv0:trell:v4mv:keyint=10:cbp:last_pred
> >>>>>>=3 -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames
> >>>>>> -srate 22050
> >>>>>
> >>>>> it should be -oac mp3lame -lameopts abr:br=56
> >>>>>
> >>>>> you have abr=br56 which is wrong
> >>>>>
> >>>>>> _______________________________________________
> >>>>>> MEncoder-users mailing list
> >>>>>> MEncoder-users at mplayerhq.hu
> >>>>>> http://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
> >
> > _______________________________________________
> > MEncoder-users mailing list
> > MEncoder-users at mplayerhq.hu
> > http://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/mencoder-users



More information about the MEncoder-users mailing list