GNOME Bugzilla – Bug 515249
Basic gst-launch command creates fast-forward style AVIs
Last modified: 2009-04-17 07:35:48 UTC
Please describe the problem: Hi, A basic command such a this: gst-launch v4l2src ! video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! theoraenc ! oggmux ! filesink location=osug-1.ogg Or even this: gst-launch v4lsrc ! video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! jpegenc ! avimux ! filesink location=osug-1.avi Creates video files which seem to go "as fast a possible" when viewed with any program (totel or mplayer) BTW my dmesg says: [ 18.860000] Linux video capture interface: v2.00 [ 18.912000] uvcvideo: Found UVC 1.00 device <unnamed> (eb1a:2761) And I am using an eee PC. I am using the command line directly because the camera only works with V4L2 and I cannot find ANY piece of software that will record the video input properly. I might have missed something in the command line... if that's the case, please accept my apologies! Steps to reproduce: 1. gst-launch v4lsrc ! video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! jpegenc ! avimux ! filesink location=osug-1.avi 2. mplayer osug-1.avi (you will see it reproducing at super speed) 3. Actual results: When you play the saved video, you see that it's super-fast Expected results: I expect the video to be recorded at "normal time"... Does this happen every time? Yes Other information:
This may be fixed already in newer gst-plugins-good - there have been a lot of fixes in v4l2src. You might also benefit from specifying a frame-rate in the caps: gst-launch v4lsrc ! video/x-raw-yuv,width=320,height=240,framerate=15/1 ! ffmpegcolorspace ! jpegenc ! avimux ! filesink location=test.avi for example. A careful reading of my blog post about this shows I was using v4l2src from CVS - which will become gst-plugins-good 0.10.7 in about 10 days.
Hi, I can't specify any framerate other than 1/30 or I get the nasty "ERROR: for element /pipeline0/v4l2src0: Could not negotiate format" (!). I am using Ubuntu at the moment, but the poor eee doesn't have the compiling abilities. Do you absolutely think that this is a problem with v4l2src? Bye, Merc.
Which other framerates have you tried, and at which resolutions? You need to pick ones your camera can support - normally the application wrapping v4l2src handles that, but on the command line you have to do it manually.
Hi, How can I find ask the camera which framerates it supports? I tried 1/15, 1/10, /25... Merc.
you would need to trawl through the output from GST_DEBUG=v4l2src:5. Applications can do it by looking at the allowed caps, but there's no interface to that in gst-launch. 1/15, 1/10 are the wrong way around though -> 15fps = 15/1, 7.5 fps = 15/2 1/15 = 1 frame every 15 seconds, which no camera will produce.
Hi, I knew that :-D I set GST_DEBUG, and discovered that 30/1 is indeed the only option... When I record, I am also getting a lot of these: "warning: got unexpected frame size of 655360 instead of 614400 ... is this part of the problem? (When a lot of these happen, the whole _computer_ freezes... I think I am gonna go insane within then next 4 days :-( ) Merc.
Hi, Upgrading to the latest uvc drivers fixed the "freezing" problems (yay!). Now, I also get the "warning: got unexpected frame size [...]" error ONCE at the very beginning, and then never again. I installed the latest dev gstreamer. And... the fastforward problem is unfortunately still there. Would it be rude for me to post a 500Kb example video here, with the debug info and the command line I used to record it? Thanks a lot people. GStreamer really seems insanely good. Merc.
Sorry for the late reply. > I installed the latest dev gstreamer. And... the fastforward problem is > unfortunately still there. > > Would it be rude for me to post a 500Kb example video here, with the debug info > and the command line I used to record it? Absolutely not. The max. attachment size is 1MB, feel free to attach whether you think is helpful. Also of interest would be the output of this command: $ gst-launch-0.10 -v v4l2src num-buffers=100 ! ffmpegcolorspace ! jpegenc ! fakesink 2>&1 | tee log.txt Please close this bug if this isn't an issue anymore or you're not interested or don't have time to track this down further - thanks!
Hi, Sorry, it's been more than a year, I no longer have the system with the problem! Merc.