Writing Video and reading in same time

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

Writing Video and reading in same time

BGraaf

Hi,

 

I have a problem with gstreamer.

I write a video stream in a file and try to read it with another process (a few seconds later).

If I link the reading pipe using filesrc or playbin2 and could only see the video as long as the file is in opening time.

For example:

If the file is only 4 seconds long in the time I link the reading pipe, I could only see this 4 seconds, but the writing pipe is running and the file is much longer in the meantime (sorry for my bad English).

I hope you can understand my problem.

Here my question:

Is there any solution to write a video file with one process and read it with another pipe?

 

Thanks’ for your help!!!!

 

Bernhard


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

Re: Writing Video and reading in same time

Stefan Sauer
On 06/25/11 17:56, Bernhard Graaf wrote:

Hi,

 

I have a problem with gstreamer.

I write a video stream in a file and try to read it with another process (a few seconds later).

If I link the reading pipe using filesrc or playbin2 and could only see the video as long as the file is in opening time.

For example:

If the file is only 4 seconds long in the time I link the reading pipe, I could only see this 4 seconds, but the writing pipe is running and the file is much longer in the meantime (sorry for my bad English).

I hope you can understand my problem.

Here my question:

Is there any solution to write a video file with one process and read it with another pipe?


What format are you using. Could you explain the scenario better. Do you wnat to relay a we-stream? Maybe you can stream the video without writing it to a file buffer.

Stefan

 

Thanks’ for your help!!!!

 

Bernhard

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


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

AW: Writing Video and reading in same time

BGraaf

Hi Stefan,

 

Yes, no problem.

I’m using my own C-Program for that, but my pipe is looks like:

 

Server:

Dvbsrc ! mpegtsmux name=demux demux.video_xxxx ! queue ! mpegpsmux name=mux ! filesink location=xyz.mpg demux.audo_xxxx ! queue ! mux. (converting Mpeg-TS to Mpeg-PS à is running well)

 

Client:

  1. playbin2 video-sink=xvimagesink uri=xyz.mpg
  2. filesrc location=xyz.mpg ! mpegpsdemux name=demux ! queue ! mpeg2dec ! xvimagsink demux. ! queue ! mad ! alsasink

 

Both of them are running well with a closed file (have a given file length).

But also both of the have the same problem: running to the point of file, where the file length was as opening time.

 

Thanks

 


Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email] [mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]] Im Auftrag von Stefan Kost
Gesendet: Samstag, 25. Juni 2011 18:09
An: [hidden email]
Betreff: Re: Writing Video and reading in same time

 

On 06/25/11 17:56, Bernhard Graaf wrote:

Hi,

 

I have a problem with gstreamer.

I write a video stream in a file and try to read it with another process (a few seconds later).

If I link the reading pipe using filesrc or playbin2 and could only see the video as long as the file is in opening time.

For example:

If the file is only 4 seconds long in the time I link the reading pipe, I could only see this 4 seconds, but the writing pipe is running and the file is much longer in the meantime (sorry for my bad English).

I hope you can understand my problem.

Here my question:

Is there any solution to write a video file with one process and read it with another pipe?


What format are you using. Could you explain the scenario better. Do you wnat to relay a we-stream? Maybe you can stream the video without writing it to a file buffer.

Stefan

 

Thanks’ for your help!!!!

 

Bernhard

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

 


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

AW: Writing Video and reading in same time

BGraaf
In reply to this post by Stefan Sauer

Hi Stefan,

 

sorry, I don’t read your mail to the end.

I know that I don’t need a file buffer and could stream the data directly to the client. Butt his is for a ‚time shift’ function.

 

Bernhard

 


Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email] [mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]] Im Auftrag von Stefan Kost
Gesendet: Samstag, 25. Juni 2011 18:09
An: [hidden email]
Betreff: Re: Writing Video and reading in same time

 

On 06/25/11 17:56, Bernhard Graaf wrote:

Hi,

 

I have a problem with gstreamer.

I write a video stream in a file and try to read it with another process (a few seconds later).

If I link the reading pipe using filesrc or playbin2 and could only see the video as long as the file is in opening time.

For example:

If the file is only 4 seconds long in the time I link the reading pipe, I could only see this 4 seconds, but the writing pipe is running and the file is much longer in the meantime (sorry for my bad English).

I hope you can understand my problem.

Here my question:

Is there any solution to write a video file with one process and read it with another pipe?


What format are you using. Could you explain the scenario better. Do you wnat to relay a we-stream? Maybe you can stream the video without writing it to a file buffer.

Stefan

 

Thanks’ for your help!!!!

 

Bernhard

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

 


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

RE: AW: Writing Video and reading in same time

zelalem
In reply to this post by BGraaf
Hi I have a similar problem but in my case I want to store and retrieve raw rtp packets. Is it possible to do this as well or the filesink requires a specific file format? I put my question here because I thought the issue is the same. Basically I want the functionality of a buffer but because the data will be too big I want to store it in a file temporarily.

Thank you.

- Zelalem S.


From: [hidden email]
To: [hidden email]
Subject: AW: Writing Video and reading in same time
Date: Sat, 25 Jun 2011 18:35:43 +0200

Hi Stefan,

 

Yes, no problem.

I’m using my own C-Program for that, but my pipe is looks like:

 

Server:

Dvbsrc ! mpegtsmux name=demux demux.video_xxxx ! queue ! mpegpsmux name=mux ! filesink location=xyz.mpg demux.audo_xxxx ! queue ! mux. (converting Mpeg-TS to Mpeg-PS à is running well)

 

Client:

  1. playbin2 video-sink=xvimagesink uri=xyz.mpg
  2. filesrc location=xyz.mpg ! mpegpsdemux name=demux ! queue ! mpeg2dec ! xvimagsink demux. ! queue ! mad ! alsasink

 

Both of them are running well with a closed file (have a given file length).

But also both of the have the same problem: running to the point of file, where the file length was as opening time.

 

Thanks

 


Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email] [mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]] Im Auftrag von Stefan Kost
Gesendet: Samstag, 25. Juni 2011 18:09
An: [hidden email]
Betreff: Re: Writing Video and reading in same time

 

On 06/25/11 17:56, Bernhard Graaf wrote:

Hi,

 

I have a problem with gstreamer.

I write a video stream in a file and try to read it with another process (a few seconds later).

If I link the reading pipe using filesrc or playbin2 and could only see the video as long as the file is in opening time.

For example:

If the file is only 4 seconds long in the time I link the reading pipe, I could only see this 4 seconds, but the writing pipe is running and the file is much longer in the meantime (sorry for my bad English).

I hope you can understand my problem.

Here my question:

Is there any solution to write a video file with one process and read it with another pipe?


What format are you using. Could you explain the scenario better. Do you wnat to relay a we-stream? Maybe you can stream the video without writing it to a file buffer.

Stefan

 

Thanks’ for your help!!!!

 

Bernhard

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

 


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

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

Re: AW: Writing Video and reading in same time

Stefan Sauer
In reply to this post by BGraaf
On 06/25/11 18:35, Bernhard Graaf wrote:

Hi Stefan,

 

Yes, no problem.

I’m using my own C-Program for that, but my pipe is looks like:

 

Server:

Dvbsrc ! mpegtsmux name=demux demux.video_xxxx ! queue ! mpegpsmux name=mux ! filesink location=xyz.mpg demux.audo_xxxx ! queue ! mux. (converting Mpeg-TS to Mpeg-PS à is running well)

 

Client:

  1. playbin2 video-sink=xvimagesink uri=xyz.mpg
  2. filesrc location=xyz.mpg ! mpegpsdemux name=demux ! queue ! mpeg2dec ! xvimagsink demux. ! queue ! mad ! alsasink

 

Both of them are running well with a closed file (have a given file length).

But also both of the have the same problem: running to the point of file, where the file length was as opening time.

The problem is that at somepoint filesrc is checking the filesize and it is not aware that it changes.

You could try using a pipe instead of files (fssink+fdsrc instead of filesink,filesrc). Otherwise we might need a flag on filesrc to restat the file for each read and if size changed send a duration change.

Stefan

 

Thanks

 


Von: [hidden email] [[hidden email]] Im Auftrag von Stefan Kost
Gesendet: Samstag, 25. Juni 2011 18:09
An: [hidden email]
Betreff: Re: Writing Video and reading in same time

 

On 06/25/11 17:56, Bernhard Graaf wrote:

Hi,

 

I have a problem with gstreamer.

I write a video stream in a file and try to read it with another process (a few seconds later).

If I link the reading pipe using filesrc or playbin2 and could only see the video as long as the file is in opening time.

For example:

If the file is only 4 seconds long in the time I link the reading pipe, I could only see this 4 seconds, but the writing pipe is running and the file is much longer in the meantime (sorry for my bad English).

I hope you can understand my problem.

Here my question:

Is there any solution to write a video file with one process and read it with another pipe?


What format are you using. Could you explain the scenario better. Do you wnat to relay a we-stream? Maybe you can stream the video without writing it to a file buffer.

Stefan

 

Thanks’ for your help!!!!

 

Bernhard

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

 

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


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

AW: AW: Writing Video and reading in same time

BGraaf

Hi Stafan,

 

thanks’ a lot for helping. I’ll try to use the fdsrc on client side and send you the results of my test.

 

Bernhard

 


Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email] [mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]] Im Auftrag von Stefan Kost
Gesendet: Samstag, 25. Juni 2011 20:32
An: [hidden email]
Betreff: Re: AW: Writing Video and reading in same time

 

On 06/25/11 18:35, Bernhard Graaf wrote:

Hi Stefan,

 

Yes, no problem.

I’m using my own C-Program for that, but my pipe is looks like:

 

Server:

Dvbsrc ! mpegtsmux name=demux demux.video_xxxx ! queue ! mpegpsmux name=mux ! filesink location=xyz.mpg demux.audo_xxxx ! queue ! mux. (converting Mpeg-TS to Mpeg-PS à is running well)

 

Client:

  1. playbin2 video-sink=xvimagesink uri=xyz.mpg
  2. filesrc location=xyz.mpg ! mpegpsdemux name=demux ! queue ! mpeg2dec ! xvimagsink demux. ! queue ! mad ! alsasink

 

Both of them are running well with a closed file (have a given file length).

But also both of the have the same problem: running to the point of file, where the file length was as opening time.

The problem is that at somepoint filesrc is checking the filesize and it is not aware that it changes.

You could try using a pipe instead of files (fssink+fdsrc instead of filesink,filesrc). Otherwise we might need a flag on filesrc to restat the file for each read and if size changed send a duration change.

Stefan


 

Thanks

 


Von: [hidden email] [[hidden email]] Im Auftrag von Stefan Kost
Gesendet: Samstag, 25. Juni 2011 18:09
An: [hidden email]
Betreff: Re: Writing Video and reading in same time

 

On 06/25/11 17:56, Bernhard Graaf wrote:

Hi,

 

I have a problem with gstreamer.

I write a video stream in a file and try to read it with another process (a few seconds later).

If I link the reading pipe using filesrc or playbin2 and could only see the video as long as the file is in opening time.

For example:

If the file is only 4 seconds long in the time I link the reading pipe, I could only see this 4 seconds, but the writing pipe is running and the file is much longer in the meantime (sorry for my bad English).

I hope you can understand my problem.

Here my question:

Is there any solution to write a video file with one process and read it with another pipe?


What format are you using. Could you explain the scenario better. Do you wnat to relay a we-stream? Maybe you can stream the video without writing it to a file buffer.

Stefan


 

Thanks’ for your help!!!!

 

Bernhard

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

 

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

 


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

Re: AW: Writing Video and reading in same time

David Schleef-2
In reply to this post by Stefan Sauer
On Sat, Jun 25, 2011 at 08:32:13PM +0200, Stefan Kost wrote:

> On 06/25/11 18:35, Bernhard Graaf wrote:
> >
> > Both of them are running well with a closed file (have a given file
> > length).
> >
> > But also both of the have the same problem: running to the point of
> > file, where the file length was as opening time.
> >
> The problem is that at somepoint filesrc is checking the filesize and it
> is not aware that it changes.

https://bugzilla.gnome.org/show_bug.cgi?id=647940

and

https://bugzilla.gnome.org/show_bug.cgi?id=652037



David

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

AW: AW: Writing Video and reading in same time

BGraaf
In reply to this post by Stefan Sauer

Hi Stefan,

 

Thanks’ for your tip. It runs with fdsrc. But it seems to be not as stable as filesrc. If I add the ‘do-timestamp’-option, it’s a little bit better. Sometime when I try to use ‘gst_element_seek’ the pipe crashed.   filesrc is much more stable then fdsrc. Do you have any further ideas?

 

Bernhard

 


Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email] [mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]] Im Auftrag von Stefan Kost
Gesendet: Samstag, 25. Juni 2011 20:32
An: [hidden email]
Betreff: Re: AW: Writing Video and reading in same time

 

On 06/25/11 18:35, Bernhard Graaf wrote:

Hi Stefan,

 

Yes, no problem.

I’m using my own C-Program for that, but my pipe is looks like:

 

Server:

Dvbsrc ! mpegtsmux name=demux demux.video_xxxx ! queue ! mpegpsmux name=mux ! filesink location=xyz.mpg demux.audo_xxxx ! queue ! mux. (converting Mpeg-TS to Mpeg-PS à is running well)

 

Client:

  1. playbin2 video-sink=xvimagesink uri=xyz.mpg
  2. filesrc location=xyz.mpg ! mpegpsdemux name=demux ! queue ! mpeg2dec ! xvimagsink demux. ! queue ! mad ! alsasink

 

Both of them are running well with a closed file (have a given file length).

But also both of the have the same problem: running to the point of file, where the file length was as opening time.

The problem is that at somepoint filesrc is checking the filesize and it is not aware that it changes.

You could try using a pipe instead of files (fssink+fdsrc instead of filesink,filesrc). Otherwise we might need a flag on filesrc to restat the file for each read and if size changed send a duration change.

Stefan


 

Thanks

 


Von: [hidden email] [[hidden email]] Im Auftrag von Stefan Kost
Gesendet: Samstag, 25. Juni 2011 18:09
An: [hidden email]
Betreff: Re: Writing Video and reading in same time

 

On 06/25/11 17:56, Bernhard Graaf wrote:

Hi,

 

I have a problem with gstreamer.

I write a video stream in a file and try to read it with another process (a few seconds later).

If I link the reading pipe using filesrc or playbin2 and could only see the video as long as the file is in opening time.

For example:

If the file is only 4 seconds long in the time I link the reading pipe, I could only see this 4 seconds, but the writing pipe is running and the file is much longer in the meantime (sorry for my bad English).

I hope you can understand my problem.

Here my question:

Is there any solution to write a video file with one process and read it with another pipe?


What format are you using. Could you explain the scenario better. Do you wnat to relay a we-stream? Maybe you can stream the video without writing it to a file buffer.

Stefan


 

Thanks’ for your help!!!!

 

Bernhard

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

 

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

 


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

AW: AW: Writing Video and reading in same time

BGraaf
In reply to this post by David Schleef-2
Hi David,

Thanks' for answering!
If I have a right understanding of this, then I should try to use the
'live-running' option from the basesrc to the filesrc element, because all
elements are based on basesrc? Is it right?

Bernhard

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email]
[mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]]
Im Auftrag von David Schleef
Gesendet: Samstag, 25. Juni 2011 22:49
An: Discussion of the development of and with GStreamer
Betreff: Re: AW: Writing Video and reading in same time

On Sat, Jun 25, 2011 at 08:32:13PM +0200, Stefan Kost wrote:

> On 06/25/11 18:35, Bernhard Graaf wrote:
> >
> > Both of them are running well with a closed file (have a given file
> > length).
> >
> > But also both of the have the same problem: running to the point of
> > file, where the file length was as opening time.
> >
> The problem is that at somepoint filesrc is checking the filesize and it
> is not aware that it changes.

https://bugzilla.gnome.org/show_bug.cgi?id=647940

and

https://bugzilla.gnome.org/show_bug.cgi?id=652037



David

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

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

AW: AW: Writing Video and reading in same time

BGraaf
In reply to this post by David Schleef-2
Hi @ all,

are these bugs fixed?
If yes, are there additional parameters for reading a 'growing up size'
file?

Many thanks
Bernhard


-----Ursprüngliche Nachricht-----
Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email]
[mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]]
Im Auftrag von David Schleef
Gesendet: Samstag, 25. Juni 2011 22:49
An: Discussion of the development of and with GStreamer
Betreff: Re: AW: Writing Video and reading in same time

On Sat, Jun 25, 2011 at 08:32:13PM +0200, Stefan Kost wrote:

> On 06/25/11 18:35, Bernhard Graaf wrote:
> >
> > Both of them are running well with a closed file (have a given file
> > length).
> >
> > But also both of the have the same problem: running to the point of
> > file, where the file length was as opening time.
> >
> The problem is that at somepoint filesrc is checking the filesize and it
> is not aware that it changes.

https://bugzilla.gnome.org/show_bug.cgi?id=647940

and

https://bugzilla.gnome.org/show_bug.cgi?id=652037



David

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

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

Bugs closed?

BGraaf
Hi @ all,

are these bugs fixed?
https://bugzilla.gnome.org/show_bug.cgi?id=647940 /
https://bugzilla.gnome.org/show_bug.cgi?id=652037

If yes, are there additional parameters for reading a 'growing up size'
file?

Many thanks
Bernhard

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