GNOME Bugzilla – Bug 542014
sluggish video and out-of-sync audio
Last modified: 2008-07-28 09:01:08 UTC
Cheese video recording has still a lot to be improved. When recording at maximum resolution (1280x1024@9fps here) the video output is really slow, with really low framerate (less than the displayed one), and the audio output is a couple of seconds out of sync. The issue still stands when recording at lower resolutions at high framerates (like 640x480@30fps). Sometimes, instead, video is faster than expected and audio still out-of-sync. Note that I've got two cores at 1,67 GHz both with performance governor set. I think this happens because the vorbis/theoraenc cannot manage to do the encoding in realtime with so high resolution or framerates. A possible solution would be to not use resolutions higher than 640x480 when recording video and slow down framerate to 20/2 or 9/1 in the recorded video. This can be achieved with the videorate element and can be done just in the recorded stream while still displaying the full framerate video source. Here's an example pipeline that creates a good video with in-sync audio on my laptop: gst-launch-0.10 oggmux name=mux ! filesink location=test.ogg v4l2src ! video/x-raw-yuv, width=640, height=480, framerate=\(fraction\)30/1 ! ffmpegcolorspace ! tee ! queue ! ffmpegcolorspace ! xvimagesink qos=false sync=false tee0. ! videorate ! video/x-raw-yuv,framerate=9/1 ! theoraenc quality=30 ! queue ! mux. alsasrc ! queue ! audioconvert ! vorbisenc ! mux. Another solution would be to record raw data and schedule encoding on idle, but I didn't investigate too much on its feasibility. Ideas welcome!
Get real, this is not a blocker bug AT ALL.
I think Daniel marked it as blocker just to gain some quick attention over it
eeks. damn, i should take a look at the bug activity first. sigh. sorry.
;) no problem!
I found that fixing this was simpler than I thought. We just needed to put a videorate element in the video_save_bin; quoting from videorate docs: >This operation is useful to link to elements that require a perfect stream. >Typical examples are formats that do not store timestamps for video frames, but only store a framerate, like Ogg and AVI. So a videorate element should be always needed because we're encoding to ogg. I'm not quite sure to close this bug because video has still something to be improved, I think we should let the user chose video resolution, framerate and audio/video quality at least through gconf properties but I could file a new enhancement bug about this.
Closing it. The out-of-sync bug is fixed in svn trunk. Reopen if you wish to continue the Video Recording improvement discussion within this bug.