Simulation live file source

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

Simulation live file source

pfarmer
Hello,
is there a way to simulate a live source from a file? Like it is possible with the videotestsrc:
$ gst-launch videotestsrc is-live=true ! fakesink -v

And I would like to have a filesrc also acting as a live-src e.g. it does not preroll and no random access is possible.
I need it to test compression elements in use for real-time streaming. For example:

$ gst-launch filesrc location=704x576_i420_long.yuv ! videoparse format=1 width=704 height=576 framerate=15/1 ! theoraenc bitrate=100 ! theoradec ! xvimagesink
Here the filesrc should act as a live src.


Reply | Threaded
Open this post in threaded view
|

Re: Simulation live file source

Stefan Sauer
On 02/02/2012 02:40 PM, pfarmer wrote:

> Hello,
> is there a way to simulate a live source from a file? Like it is possible
> with the videotestsrc:
> $ gst-launch videotestsrc is-live=true ! fakesink -v
>
> And I would like to have a filesrc also acting as a live-src e.g. it does
> not preroll and no random access is possible.
> I need it to test compression elements in use for real-time streaming. For
> example:
>
> $ gst-launch filesrc location=704x576_i420_long.yuv ! videoparse format=1
> width=704 height=576 framerate=15/1 ! theoraenc bitrate=100 ! theoradec !
> xvimagesink
> Here the filesrc should act as a live src.

cat 704x576_i420_long.yuv | gst-launch fdsrc ! videoparse ....

Stefan

>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Simulation-live-file-source-tp4351457p4351457.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> 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: Simulation live file source

Tim-Philipp Müller-2
On Thu, 2012-02-02 at 16:10 +0100, Stefan Sauer wrote:
> > Here the filesrc should act as a live src.
>
> cat 704x576_i420_long.yuv | gst-launch fdsrc ! videoparse ....

I don't think this will work - how would the throttling be done
according to the desired timestamps?

To force a filesrc to operate in push mode, either do:

  filesrc location=xyz ! queue ! ...

or use:

  pushfile:///path/to/xyz ! ...


You might be able to achieve something similar to what you want using:

 filesrc location=foo.yuv ! videoparse ! identity sync=true ! ...

This probably won't do any latency reporting, so you'd need to set the
sinks to sync=false then or adjust the max-lateness.

 Cheers
  -Tim

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

Re: Simulation live file source

pfarmer
Thanks, that helps a lot. I have to work it out now ...

Tim-Philipp Müller-2 wrote
  pushfile:///path/to/xyz ! ...
I didn't know about this syntax. Good to know.