After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 515249 - Basic gst-launch command creates fast-forward style AVIs
Basic gst-launch command creates fast-forward style AVIs
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: dont know
0.10.14
Other All
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-02-08 18:36 UTC by Tony Mobily
Modified: 2009-04-17 07:35 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20



Description Tony Mobily 2008-02-08 18:36:21 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:
Comment 1 Jan Schmidt 2008-02-08 19:22:46 UTC
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.

Comment 2 Tony Mobily 2008-02-08 19:41:17 UTC
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.
Comment 3 Jan Schmidt 2008-02-08 21:12:38 UTC
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.

Comment 4 Tony Mobily 2008-02-09 02:24:32 UTC
Hi,

How can I find ask the camera which framerates it supports?
I tried 1/15, 1/10, /25... 

Merc.
Comment 5 Jan Schmidt 2008-02-09 02:38:38 UTC
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.
Comment 6 Tony Mobily 2008-02-09 03:06:39 UTC
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.
Comment 7 Tony Mobily 2008-02-10 00:51:50 UTC
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.
Comment 8 Tim-Philipp Müller 2009-04-16 19:12:31 UTC
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!


Comment 9 Tony Mobily 2009-04-17 00:46:25 UTC
Hi,

Sorry, it's been more than a year, I no longer have the system with the problem!

Merc.