output freezes when recording video for the 2nd time

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

output freezes when recording video for the 2nd time

Daniel Drake-5
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



-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel