flutsmux video time

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

flutsmux video time

ldac

    Hello,

I am using the following gstreamer pipeline to save a MPEG2-TS file
using Fluendo MPEG2-TS muxer:

gst-launch-0.10 videotestsrc !
video/x-raw-yuv,format=(fourcc)I420,width=640,height=480,framerate=(fraction)25/1
! \
                  videorate ! queue ! x264enc ! h264parse ! queue ! mux. \
                  audiotestsrc ! audioconvert !
audio/x-raw-int,rate=44100,channels=2 ! ffenc_mp2 ! queue ! mux. \
                  flutsmux name=mux ! filesink location=/tmp/test.ts

    The point is that I start a chronometer when I launch the pipeline,
and I stop it when 10 seconds has elapsed. But when I play the file
using either VLC or mplayer o whatever, the playing time is around 3
times the expected 10 seconds (over 34 seconds).

    Why is happening this? I have read about the framerate, but I am
specifying the framerate into the pipeline.

    Thank you very much in advance.
    Regards.
    Luis.




------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: flutsmux video time

Jan Schmidt-6
On Fri, 2009-04-17 at 16:01 +0200, ldac wrote:

> Hello,
>
> I am using the following gstreamer pipeline to save a MPEG2-TS file
> using Fluendo MPEG2-TS muxer:
>
> gst-launch-0.10 videotestsrc !
> video/x-raw-yuv,format=(fourcc)I420,width=640,height=480,framerate=(fraction)25/1
> ! \
>                   videorate ! queue ! x264enc ! h264parse ! queue ! mux. \
>                   audiotestsrc ! audioconvert !
> audio/x-raw-int,rate=44100,channels=2 ! ffenc_mp2 ! queue ! mux. \
>                   flutsmux name=mux ! filesink location=/tmp/test.ts
>
>     The point is that I start a chronometer when I launch the pipeline,
> and I stop it when 10 seconds has elapsed. But when I play the file
> using either VLC or mplayer o whatever, the playing time is around 3
> times the expected 10 seconds (over 34 seconds).

This pipeline has no constraint to run at realtime speed - it will
simply encode and mux frames as quickly as your CPU can handle, which
appears to be about 3 times faster than realtime for you.

Only pipelines that contain an element which waits on the clock, or
where the data comes from a rate-limited input (like RTSP or DVB) will
run at 'real time' speed.

- Jan.
--
Jan Schmidt <[hidden email]>


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: flutsmux video time

Julien Moutte-2
In reply to this post by ldac

Use the is-live property on the source element so that they don't try to
run as fast as possible.

Julien

ldac wrote:

>     Hello,
>
> I am using the following gstreamer pipeline to save a MPEG2-TS file
> using Fluendo MPEG2-TS muxer:
>
> gst-launch-0.10 videotestsrc !
> video/x-raw-yuv,format=(fourcc)I420,width=640,height=480,framerate=(fraction)25/1
> ! \
>                   videorate ! queue ! x264enc ! h264parse ! queue ! mux. \
>                   audiotestsrc ! audioconvert !
> audio/x-raw-int,rate=44100,channels=2 ! ffenc_mp2 ! queue ! mux. \
>                   flutsmux name=mux ! filesink location=/tmp/test.ts
>
>     The point is that I start a chronometer when I launch the pipeline,
> and I stop it when 10 seconds has elapsed. But when I play the file
> using either VLC or mplayer o whatever, the playing time is around 3
> times the expected 10 seconds (over 34 seconds).
>
>     Why is happening this? I have read about the framerate, but I am
> specifying the framerate into the pipeline.
>
>     Thank you very much in advance.
>     Regards.
>     Luis.
>
>
>
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: flutsmux video time

Christian Fredrik Kalager Schaller
In reply to this post by ldac
Hi,
I think you need to set the 'is-live' attribute on the audiotestsrc
element (to have it pretend to be a real time stream) as currently you
are creating as much audio and video as you have the CPU capacity to do.

Christian

On Fri, 2009-04-17 at 16:01 +0200, ldac wrote:

> Hello,
>
> I am using the following gstreamer pipeline to save a MPEG2-TS file
> using Fluendo MPEG2-TS muxer:
>
> gst-launch-0.10 videotestsrc !
> video/x-raw-yuv,format=(fourcc)I420,width=640,height=480,framerate=(fraction)25/1
> ! \
>                   videorate ! queue ! x264enc ! h264parse ! queue ! mux. \
>                   audiotestsrc ! audioconvert !
> audio/x-raw-int,rate=44100,channels=2 ! ffenc_mp2 ! queue ! mux. \
>                   flutsmux name=mux ! filesink location=/tmp/test.ts
>
>     The point is that I start a chronometer when I launch the pipeline,
> and I stop it when 10 seconds has elapsed. But when I play the file
> using either VLC or mplayer o whatever, the playing time is around 3
> times the expected 10 seconds (over 34 seconds).
>
>     Why is happening this? I have read about the framerate, but I am
> specifying the framerate into the pipeline.
>
>     Thank you very much in advance.
>     Regards.
>     Luis.
>
>
>
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: flutsmux video time

ldac

    Thanks Mr. Kalager, Mr. Moutte and Mr. Schmidt for your fast and
accourate answer.

    You were right. I have set the property "is-live" either to the
"videotestsrc" or to the "audiotestsrc" (or in both), and it works fine now.

    One more detail, if I use a source element such as "v4l2src", has
this element itself something that makes his output rate-limited???
(something that acts as "is-live" property does for 'audiotestsrc' or
'videotestsrc' elements).

    Thanks a lot.
    Regads.
    LD.





------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

flutsmux flutsdemux streaming

ldac
In reply to this post by Jan Schmidt-6

    Hello,

this is the second part of a previous question named "flutsmux video time". I want to do streaming over the network with my MPEG2-TS video/audio.

    What I do is to substitute in my pipeline the "filesink" by an "udpsink" (with ip and port), so the pipeline could be something like this (just video):

gst-launch-0.10 videotestsrc is-live=true ! video/x-raw-yuv,format=(fourcc)I420,width=640,height=480,framerate=(fraction)25/1 ! \
                 videorate ! queue ! x264enc ! h264parse ! queue ! mux. \
                 flutsmux name=mux ! udpsink ip=192.168.0.2 port=5001
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX MMXEXT SSE SSE2 SSE3 SSSE3 Cache64


    And receive and display the video (being at 192.168.0.2), I guess that I should do:

gst-launch-0.10 udpsrc port=5001 ! flutsdemux name=demux demux. ! rtph264depay ! decodebin ! autovideosink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: FluTSClock


    Any suggestion? Both pipelines stay waiting. What am I doing wrong?

    Thanks in advance (again!).
    Regards.
    LD.



------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: flutsmux video time

ved kpl
In reply to this post by ldac
Hi,

v4l2src is a *live src* by itself.
It will *give out* the frames in realtime. (rate based on fps)


On Fri, Apr 17, 2009 at 8:21 PM, ldac <[hidden email]> wrote:

>
>    Thanks Mr. Kalager, Mr. Moutte and Mr. Schmidt for your fast and
> accourate answer.
>
>    You were right. I have set the property "is-live" either to the
> "videotestsrc" or to the "audiotestsrc" (or in both), and it works fine now.
>
>    One more detail, if I use a source element such as "v4l2src", has
> this element itself something that makes his output rate-limited???
> (something that acts as "is-live" property does for 'audiotestsrc' or
> 'videotestsrc' elements).
>
>    Thanks a lot.
>    Regads.
>    LD.
>
>
>
>
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

alsasrc is a live source?

ldac

    Hi,

is "alsasrc"  a live source by itself? As (thanks for expert's answers)
"v4l2src" is or like "videotestsrc" or "audiotestsrc" enabling the
property "is-live".

    If not, which element is needed to get realtime sampling?

    Thank you very much.
    LD.


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: alsasrc is a live source?

Andrey Boyko
It's live. I think fastest way to check it is run simple pipeline like
gst-launch alsasrc ! fakesink:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock

For properties look at output of gst-inspect alsasrc.

ldac wrote:
    Hi,

is "alsasrc"  a live source by itself? As (thanks for expert's answers) 
"v4l2src" is or like "videotestsrc" or "audiotestsrc" enabling the 
property "is-live".

    If not, which element is needed to get realtime sampling?

    Thank you very much.
    LD.


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

  


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel