'Where should 'queue' be positioned in a pipeline?
When decoding a file or a stream, does anyone know where queue should be placed in the pipeline? All of the following seem to have the same behaviour:
gst-launch-1.0 filesrc location=r_25_1920.mp4 ! qtdemux name=demuxer demuxer. ! **queue** ! avdec_h264 ! autovideosink
gst-launch-1.0 rtspsrc location=rtsp://192.168.100.60:554/stream1 latency=0 ! rtph264depay ! **queue** ! avdec_h264 ! autovideosink
gst-launch-1.0 filesrc location=r_25_1920.mp4 ! **queue** ! qtdemux name=demuxer demuxer. ! avdec_h264 ! autovideosink
gst-launch-1.0 rtspsrc location=rtsp://192.168.100.60:554/stream1 latency=0 ! **queue**! rtph264depay ! avdec_h264 ! autovideosink
gst-launch-1.0 filesrc location=r_25_1920.mp4 ! qtdemux name=demuxer demuxer. ! avdec_h264 ! **queue** ! autovideosink
gst-launch-1.0 rtspsrc location=rtsp://192.168.100.60:554/stream1 latency=0 ! rtph264depay ! avdec_h264 ! **queue** ! autovideosink
Solution 1:[1]
Someone more skilled may better answer, but I don't think that queue can help a lot with this case.
Queue has many properties that can be set in order to have various behaviors. You may check these with gst-inspect-1.0 queue and play with.
Without any property set as different from default, queue is mainly used for solving deadlock/race/synchro issues that can happen when using parallel pipelines such as with tee/demuxer/... creating several streams from one, where you would use queue in front of each outgoing sub-pipeline such as:
...your_source_stream ! tee name=t \
t. ! queue ! some_processing... \
t. ! queue ! some_other_processing...
So the correct location for your case would be after qtdemux, but probably useless until a second stream is extracted from that container.
Or inversely when sinking several streams into a mux/compositor/..., where you would add queue at tail of each incoming stream before mux :
...some_input ! queue ! mux.sink_0 \
...some_other_input ! queue ! mux.sink_1 \
somemux name=mux ! what_you_do_with_muxed_stream...
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
