Tee with multiple pipelines at different frame rates

Josue josuercuevas at gmail.com
Sun Oct 4 18:53:05 PDT 2015


Hi all;

I've been working with Gstreamer for a while now, and I'm facing a very
weird issue when using http live streaming (hlssink) on a multi-pipeline
framework. The pipelines I have been using are as follows:

1. 
*.ts files have right size and duration (from the very beginning, first ts
file):
gst-launch -m -vvv imxv4l2src capture-mode=4 ! tee name=t t. \
! queue leaky=upstream ! gputransform_and_sink t. \
! queue ! imxvpuenc_h264 bitrate=1000 gop-size=90 ! queue ! h264parse ! mux.
alsasrc !  voaacenc ! queue ! aacparse ! mux. mpegtsmux name=mux ! hlssink
location="my_location/file_%05d.ts"
playlist-location="my_location/play.m3u8" playlist-length=2 max-files=5
target-duration=6 async-handling=TRUE

Here the output *.ts files have the right duration and proper size, which is
about 900+ Kbytes.

2.
*.ts files get messed up:
gst-launch -m -vvv imxv4l2src capture-mode=4 ! tee name=t t. \
! queue ! imxvpuenc_h264 bitrate=1000 gop-size=90 ! queue ! h264parse ! mux.
alsasrc !  voaacenc ! queue ! aacparse ! mux. mpegtsmux name=mux ! hlssink
location="my_location/file_%05d.ts"
playlist-location="my_location/play.m3u8" playlist-length=2 max-files=5
target-duration=6 async-handling=TRUE t.\
! queue leaky=upstream ! videorate ! video/x-raw,framerate=1/2 !
videotransform ! fakesink

Here the output *.ts files have half the expected size (400 Kbytes) and
alsasrc is constantly reporting "Dropped 14553 samples. This is most likely
because downstream can't keep up and is consuming samples too slowly.", and
the ts file has a single still video frame.
Additionally, The framerate=1/2 is because I don't want to process every
frame since is going to be too computation expensive, so "1/2 or 1/1" is
good for my purposes. However, when I increase the framerate=10/1 the *.ts
files " Do get the right file size and duration..!!! ". 

Notes:
gputransform_and_sink -> just a gpu based transformation of a videoframe
which is a sink element at the same time.
videotransform -> any kind of cpu-based transformation such as, warptv,
rippletv, etc ...

Does anyone have a suggestion or idea of why this is happening?, I mean is
it an issue of the videorate being <= 1fps, or a problem that I do not
specify any videorate in the live streaming part?

Things That I have tried:
1. Specified a videorate at 30 fps for the live streaming part: Works fine
at the beginning but after about 2 hours of running the pipeline, the files
start to get smaller and the "Dropping samples" issue in the Alsasrc element
comes back. 
2. Change the sync, async properties for the other pipelines (not the live
streaming one) -> sync=false, async=false. Doesn't help
3. Removed the videorate element, and make the videotransform element to
process a frame at a specified gap-time, for example, 1 frame every 1 or 2
or 3 seconds.

Thanks for the help
Josue



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Tee-with-multiple-pipelines-at-different-frame-rates-tp4673952.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list