[MEncoder-users] Bug: crash while encoding to DV

Levente Novák lnovak at dragon.unideb.hu
Wed Feb 14 10:29:58 CET 2007


This bug was already reported but it happens also with the current SVN
build. With the command line below (which should be valid AFAIK),
MEncoder crashes (segfaults). 


Command line:


mencoder tv:// -tv \
driver=v4l2:device=/dev/video0:input=2:outfmt=yuy2:width=720:\
height=576:fps=25:audiorate=48000:forceaudio:amode=1:forcechan=2 \
-vf il=d:d,scale,format=yv12,il=i:i -srate 48000 -ofps 25 -fps 25 \
-aspect 4/3 -of lavf -lavfopts \
i_certify_that_my_video_stream_does_not_use_b_frames:format=dv \
-oac pcm -ovc lavc -lavcopts vcodec=dvvideo -o video.dv


Output of stout:


MEncoder dev-SVN-r22215-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Celeron(R) CPU 3.06GHz (Family: 15, Model: 4, Stepping: 1)
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: 9  data: 0x0 - 0x0
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski at zpr.uni-koeln.de>
 comment: first try, more to come ;-)
Selected device: BT878 video (Pinnacle PCTV Stud
 Tuner cap:
 Tuner rxs: MONO
 Capabilites:  video capture  video overlay  VBI capture device  tuner
read/write  streaming
 supported norms: 0 = PAL; 1 = NTSC; 2 = SECAM; 3 = PAL-Nc; 4 = PAL-M; 5
= PAL-N; 6 = NTSC-JP; 7 = PAL-60;
 inputs: 0 = Television; 1 = Composite1; 2 = S-Video;
 Current input: 2
 Current format: YUYV
v4l2: current audio mode is : STEREO
[V] filefmt:9  fourcc:0x32595559  size:720x576  fps:25.00  ftime:=0.0400
Input fps will be interpreted as 25.00 instead.
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio:
192000->192000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
OK, exit
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [il=i:i]
Opening video filter: [format fmt=yv12]
Opening video filter: [scale]
Opening video filter: [il=d:d]
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 720 x 576 (preferred colorspace: Packed YUY2)
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
videocodec: libavcodec (720x576 fourcc=69767664 [dvvi])
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==========================================================================
Pos:   0.0s      1f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.000
[0:0]VIDEO CODEC ID: 0
AUDIO CODEC ID: 10000, TAG: 0
Writing header...


Output of stderr:


Audio block size too low, setting to 16384!
** 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!
*******************************************************************************
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 9 -> 8
[swscaler @ 0x88bad98]SwScaler: BICUBIC scaler, from yuyv422 to yuv420p
using MMX2
[swscaler @ 0x88bad98]SwScaler: using 4-tap MMX scaler for horizontal
luminance scaling
[swscaler @ 0x88bad98]SwScaler: using 4-tap MMX scaler for horizontal
chrominance scaling
[swscaler @ 0x88bad98]SwScaler: using 1-tap MMX "scaler" for vertical
scaling (YV12 like)
[swscaler @ 0x88bad98]SwScaler: 720x576 -> 720x576
Forcing audio preload to 0, max pts correction to 0.
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
[dv @ 0x87b1d08]Can't initialize DV format!
Make sure that you supply exactly two streams:
     video: 25fps or 29.97fps, audio: 2ch/48Khz/PCM
     (50Mbps allows an optional second audio stream)


Here the program segfaults. Why does it state that it can't initialize
DV format as I do supply 2ch/48Khz/PCM audio and 25 fps YV12 video? 

Levente

PS: this should be a problem with lavf as when the container is AVI,
there is no crash (but the resulting file is not DV, of course). With
ffmpeg, encoding to DV works well when specifying -target dv (does it
also use lavf?). Unfortunately it seems I can not use video filters
within ffmpeg which is vital as bttv is borked with YV12 (chroma
sampling bug) and I have to capture in YUY2.







More information about the MEncoder-users mailing list