[MEncoder-users] video plays super fast if using libavcodec
Yordan Pavlov
y.d.pavlov at gmail.com
Sun Jun 27 13:28:48 CEST 2010
Hi there,
I am having trouble recording a video out of my Ligitech UVC camera.
Actually the video is fine, but there is something about the audio which
makes the resulting video file broken.
Here is the command I use along with the output I receive during encoding
dancho at debian:~$ mencoder tv:// -tv
driver=v4l2:width=640:height=480:device=/dev/video0:adevice=hw.0,2:alsa:forceaudio
-oac lavc -ovc lavc -o FullVideo.avi
MEncoder SVN-r31475-snapshot-4.4.4 (C) 2000-2010 MPlayer Team
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 ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM
was used instead.
Selected device: UVC Camera (046d:09a1)
Capabilites: video capture streaming
supported norms:
inputs: 0 = Camera 1;
Current input: 0
Current format: YUYV
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
[V] filefmt:9 fourcc:0x32595559 size:640x480 fps:15.000 ftime:=0.0667
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is undefined - no prescaling applied.
[swscaler @ 0x986d280]using unscaled yuyv422 -> yuv420p special converter
videocodec: libavcodec (640x480 fourcc=34504d46 [FMP4])
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==========================================================================
[ac3 @ 0x98ce6c0]No channel layout specified. The encoder will guess the
layout, but it might be incorrect.
Forcing audio preload to 0, max pts correction to 0.
Writing header...1f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.
Pos: 0.2s 3f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
Skipping frame!
Pos: 0.5s 9f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0
.
.
.
Flushing video frames.
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.
Video stream: 641.923 kbit/s (80240 B/s) size: 904042 bytes 11.267 secs
169 frames
Audio stream: 224.000 kbit/s (27999 B/s) size: 314026 bytes 11.215 secs
v4l2: ioctl set mute failed: Invalid argument
v4l2: 171 frames successfully processed, 0 frames dropped.
When I try to play the resulted video file the video goes at super fast
speed, the CPU is almost 100% and I receive the usual "System slow" message
pointing me to a buggy audio driver. I have played along with options for a
couple of days and here is the result.
-nosound on playback fixes the problem. Video goes smoothly.
-oac copy and -oac pcm on encoding fixes the problem.
-lavcopts acodec=ac3/vorbis or any other does not seem to help.
Despite narrowing down the problem to something with libavcodec I am unable
to solve it so I am looking for your assistance.
More information about the MEncoder-users
mailing list