Problem with recording mp4 and EOS

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with recording mp4 and EOS

Liru7
This post was updated on .
Hey GStreamers :)

My question is about recording video files with mp4mux (GStreamer-1.0).
I have a C++ application for Android where I get a live stream via udpsrc...the pipeline has a tee. One branch is for showing the video on screen and the other is for running in an appsink. I have a second pipeline (for recording) with appsrc which I connect with the first pipeline. The connection is realized via appsrc-callbacks (need-data signal).

udpsrc - queue - tee - queue - ... - sink for previewing
                                    - queue - appsink

appsrc - queue - rtph264depay - h264parse - mp4mux - filesink


- the video output is showed in the specific window :)
- the connection "appsink-appsrc" also works: I can record a playable mp4-File :) ...but only once! If I want to record a second file, it doesn't work?! The second file is created but not playable.

I know that mp4mux needs EOS, so when I want to stop recording I send EOS to the queue of the second pipeline to close the mp4 file properly. But it seems that this EOS signal destroys my recording pipeline for all the time? Even if I set the state of the recording pipeline to NULL + unref the pipeline + create a new one with a new name and a new connection to the first pipeline  I'm not able to get a second playable mp4 file. Does anybody know about this problem? I'm stucked with this :/

Thanks in advance, Liru
Reply | Threaded
Open this post in threaded view
|

Re: Problem with recording mp4 and EOS

Liru7
*append*

The usecase: a user can start & stop recording at any time and several times.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with recording mp4 and EOS

Liru7
I think I've found an answer:

http://permalink.gmane.org/gmane.comp.video.gstreamer.devel/31453

Do you agree? I'll give feedback when I'm done with this.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with recording mp4 and EOS

Liru7
Nobody has an idea? :(
Reply | Threaded
Open this post in threaded view
|

Re: Problem with recording mp4 and EOS

Tim Müller
On Mon, 2016-02-22 at 06:23 -0800, Liru7 wrote:

Hi,

> Nobody has an idea? :(

I think this is similar to what you want to do:
http://people.freedesktop.org/~tpm/code/test-backlog-recording-h264.c

so maybe you can find something useful in there.

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem with recording mp4 and EOS

amartin
You can also have a look to probes and flush events.

Best,

Angel


On 25 February 2016 at 08:29, Tim Müller <[hidden email]> wrote:
On Mon, 2016-02-22 at 06:23 -0800, Liru7 wrote:

Hi,

> Nobody has an idea? :(

I think this is similar to what you want to do:
http://people.freedesktop.org/~tpm/code/test-backlog-recording-h264.c

so maybe you can find something useful in there.

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem with recording mp4 and EOS

Liru7
Thank you very much for your answers Tim Müller & amartin