[gst-devel] output freezes when recording video for the 2nd time

Daniel Drake dsd at laptop.org
Wed Jul 9 18:29:07 CEST 2008


Hi,

I'm having some trouble using gstreamer to record videos from my webcam.
I've slimmed down the problem to a simple app and reproduced it with
videotestsrc.

Here's my app:
http://dev.laptop.org/~dsd/20080709/recordtwice.txt

Here's what the pipelines look like:
http://dev.laptop.org/~dsd/20080709/pipeline.png

Output with GST_DEBUG=3:
http://dev.laptop.org/~dsd/20080709/gst-debug-3.txt

Basically, the app shows live-video on screen, then starts additionally
recording it to a video. That much works. Then it stops recording, and
tries to start a 2nd recording. Then the display freezes and the
recording fails, for no reasons that I can fathom. In more detail:

1. The app starts in display mode - it shows videotestsrc on-screen

<3 second delay>

2. The app moves into display+capture mode - it starts additionally
saving videotestsrc to a video file on disk. It does this by the
following sequence of actions:
 - set pipeline state to GST_STATE_NULL
 - add videobin to pipeline
 - link videobin to tee
 - set pipeline state to GST_STATE_PLAYING
Video is then recorded to disk, successfully. It is also displayed
on-screen at the same time.

<5 second delay>

3. The app ends the recording and moves back to display mode, through
these actions:
 - set pipeline state to GST_STATE_NULL
 - unlink videobin from tee
 - remove videobin from pipeline
 - set pipeline state to GST_STATE_PLAYING
Video is then displayed on-screen again.

<2 second delay>

4. The app moves back to display+capture mode, same sequence as (2).
This is where the problem appears. This time, the video on-screen
freezes and the output .ogg file is 0 bytes.

<5 second delay>

5. The app moves back to display mode, same sequence as (3).
Interestingly, the display un-freezes and resumes showing the live video
feed.

<1 second delay>

6. The app exits


I realise that I could be modifying the pipeline without setting it to
NULL (using pad blocking and such) but this results in the issues I
mentioned in a previous post ("Problems recording video from live
pipeline").

Am I doing something wrong, or should I file this as a gstreamer bug?

Thanks,
Daniel






More information about the gstreamer-devel mailing list