Writing a transport stream to the disk and reading it at the same time

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

Writing a transport stream to the disk and reading it at the same time

Julien Pauty
Hello,

I have an application with two pipelines. The first pipeline writes to the disk the transport streams provided by a dvbbasebin. My second pipeline reads the transport streams from the disk.

My problem is that playing stops after a few seconds. I'm waiting a few seconds before starting playing to be sure that enough data has been saved, but this is not sufficient. My pipeling looks like this: filesrc ! flutsdemux ! queue ! audiodec ! audiosink ! queue! videodec ! videosink . If I use the playbin instead of my custom pipeline, it works. However, I still want to use my pipeline, because it can seek through the transport stream, whereas I'm not able to seek with the playbin.

With a big file I don't have this problem, suggesting some buffering problem. My debbuging session tends to show that, if the file is small (<10meg) the filesrc reads the whole file and send an EOS event. I thought that I may need some prerolling and I tried to insert a queue between the filesrc and the demuxer, but this does not help.

I think it's possible to do it since the playbin can handle this. Unfortunally sources of the playbin are rather complex.

Any idea is welcomed,

Cheers,

Julien

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Writing a transport stream to the disk and reading itat the same time

Irfan Shaikh-2
Hi,
 
I suggest you to first play the video file using mplayer. So that you come to know about the audio video codec sequence as to know whetehr audo or video comes first.Based on that you can use the respective decoders as per sequence in mplayer.If audio comes first use audio decoder,  else video.....
Try changing the demux or the decoder elements by trial and error.I also had faced the same problem, some time ago, it worked out when i changed the respective decoder.
Hope it works for you too .
 
Regards,
Irfan
 
-----Original Message-----
From: [hidden email] [mailto:[hidden email]]On Behalf Of Julien Pauty
Sent: Tuesday, September 16, 2008 12:46 AM
To: [hidden email]
Subject: [gst-devel] Writing a transport stream to the disk and reading itat the same time

Hello,

I have an application with two pipelines. The first pipeline writes to the disk the transport streams provided by a dvbbasebin. My second pipeline reads the transport streams from the disk.

My problem is that playing stops after a few seconds. I'm waiting a few seconds before starting playing to be sure that enough data has been saved, but this is not sufficient. My pipeling looks like this: filesrc ! flutsdemux ! queue ! audiodec ! audiosink ! queue! videodec ! videosink . If I use the playbin instead of my custom pipeline, it works. However, I still want to use my pipeline, because it can seek through the transport stream, whereas I'm not able to seek with the playbin.

With a big file I don't have this problem, suggesting some buffering problem. My debbuging session tends to show that, if the file is small (<10meg) the filesrc reads the whole file and send an EOS event. I thought that I may need some prerolling and I tried to insert a queue between the filesrc and the demuxer, but this does not help.

I think it's possible to do it since the playbin can handle this. Unfortunally sources of the playbin are rather complex.

Any idea is welcomed,

Cheers,

Julien

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Writing a transport stream to the disk and reading itat the same time

Julien Pauty
Hello,

Thank you for your answer.

2008/9/16 irfanshaikh <[hidden email]>
Hi,
 
I suggest you to first play the video file using mplayer. So that you come to know about the audio video codec sequence as to know whetehr audo or video comes first.Based on that you can use the respective decoders as per sequence in mplayer.If audio comes first use audio decoder,  else video.....

I tried to read a saved transport stream with mplayer but it fails. Vlc can read the video part but there's no sound. So here, gstreamer is a winner.

I'm using the capabilities of the pads created by the demuxer to determine the kind of stream that comes out of it, so I'm pretty sure I'm using the correct decoders.

Julien


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel