udpsrc -> decode -> shmsink
Peter Maersk-Moller
pmaersk at gmail.com
Mon Jul 28 05:27:27 PDT 2014
Hi Buzzy.
The reason you pipeline is stalling is because the shmsize for the shmsink
need to be adjusted.
When migrating from GStreamer-0.10 to 1.x you need to increase the shmsize
option of shmsink to something like
shmsize=`echo "$WIDTH * $HEIGHT * 4 * 14"|bc`
So I am saying, you need to be able to hold 14 frames in shm. In some
version of GStreamer 1.x the number is 14, in others it is lower, but 14
should be safe, if the shmsink has sync set false (set to false by default).
However, if sync is set to false, shmsink will deliver frames asap it is
receiving them from the decoder. If the feed in Snowmix receiving the
frames is set to *live* as opposed to *recorded*, the feed will for every
frame period look at the number of frames ready and discard all ready
frames except for the last or second last (forgot the details) and discard
all other received frames. So when the feed is set to live in Snowmix, make
sure you don't feed frames into Snowmix faster than you want to.
So if you set the option sync=true for shmsink when feeding to Snowmix and
the Snowmix feed is defined live, you may have to increase the number 14
for the shmsize calculation.
Perhaps Tim Müller can explain what shmsize is as a minimum required to
have the following pipeline NOT stalling:
gst-launch some-source ! some-decoder ! videoconvert ! queue ! shmsink
I guess the answer will be version dependent.
I also don't understand why the pipeline is not flowing again when shm is
released from whatever uses the shm produced by shmsink. Perhaps Tim has an
answer there as well.
Best regards
Peter Maersk-Moller
On Mon, Jul 28, 2014 at 11:05 AM, buzzy <zygjys at gmail.com> wrote:
> Hello, Peter,
>
> yes, thank you. I was just constructed this pipeline on friday. I've added
> the sound also:
>
> (
> echo "audio feed ctr isaudio $AUDIO_FEED_ID";\
> gst-launch-1.0 -q udpsrc multicast-group=$MULTICAST_ADDRESS
> auto-multicast=true port=1234 ! decodebin name=decoder ! videorate !
> videoscale ! videoconvert ! \
> video/x-raw, format=BGRA, framerate=24/1, width=$WIDTH, height=$HEIGHT
> ! videoconvert ! \
> shmsink socket-path=$FEED_PIPE shm-size=40000000 wait-for-connection=0
> decoder. ! queue ! audioconvert ! audioresample ! \
> audio/x-raw, format=S16LE, rate=48000, channels=2 ! fdsink fd=1
> sync=true \
> ) | nc $IP $PORT
>
> But still there's one problem. I need this input to be valid for 3
> different resolutions: 1280x720, 1024x576, 768x432. The last two works well
> (I'm changing WIDTH and HEIGHT values in script), but it doesn't work with
> 1280x720 resolution. It starts to work and then fails after couple of
> seconds. Is there are way to make this work? Is it a resize problem?
>
> Thank you.
>
>
>
> On Sun, Jul 27, 2014 at 5:47 PM, Peter Maersk-Moller-2 [via
> GStreamer-devel] <[hidden email]
> <http://user/SendEmail.jtp?type=node&node=4668085&i=0>> wrote:
>
>> Hi Buzzy.
>>
>> You have omitted the decoding part in your pipeline so it is difficult to
>> say why it goes wrong.
>>
>> But if you use the following, it has been tested to work.
>>
>> gst-launch-1.0 -v udpsrc multicast-group='224.0.0.5' auto-multicast=true
>> port=1234 ! decodebin ! videorate ! videoscale ! videoconvert !
>> 'video/x-raw, format=BGRA, pixel-aspect-ratio=1/1, width=1024, height=576,
>> framerate=24/1' ! shmsink socket-path=/tmp/feed4-control-pipe
>> shm-size=40000000 wait-for-connection=0 sync=true
>>
>> If you were using http://185.24.220.14/lnk/stream.m3u8 as input, using
>> VLC, then the source had the geometry being 720x576, pixel aspect ratio of
>> 16:11 and framerate of 25/1. That will give a geometry of 720*16/11 =
>> 1147x576 trying to scale to 1024x576.
>>
>> VLC command is
>>
>> vlc -I dummy http://185.24.220.14/lnk/stream.m3u8 --sout
>> '#udp{mux=ts,dst=224.0.0.5,port=1234,sdp=sap,name="TestStream"}'
>>
>> You can use GStreamer for retransmission instead of VLC.
>>
>> Best regards
>>
>> Peter Maersk-Moller
>>
>>
>>
>> On Wed, Jul 23, 2014 at 3:29 PM, buzzy <[hidden email]
>> <http://user/SendEmail.jtp?type=node&node=4668077&i=0>> wrote:
>>
>>> Hello,
>>>
>>> I'm trying to feed snowmix (http://sourceforge.net/projects/snowmix/)
>>> with
>>> multicast source. Currently I have the following pipeline (not working of
>>> course):
>>>
>>> gst-launch-1.0 -q udpsrc multicast-group='224.0.0.5' auto-multicast=true
>>> port=1234 ! ... ! video/x-raw, format=BGRA, pixel-aspect-ratio=1/1,
>>> interlace-mode=progressive, width=1024, height=576, framerate=24/1 !
>>> shmsink
>>> socket-path=/tmp/feed-control-pipe-3-4 shm-size=40000000
>>> wait-for-connection=0
>>>
>>> UDP source is a h264 video and i can't seem to find a way to decode it
>>> properly. Everything seems to fail. Below is the pipeline for feeding
>>> snowmix from file (working):
>>>
>>> gst-launch-1.0 -q filesrc location=/tmp/video1.mp4 ! decodebin
>>> name=decoder
>>> ! \
>>> videorate ! videoscale ! \
>>> videoconvert ! \
>>> video/x-raw, format=BGRA, pixel-aspect-ratio=1/1,
>>> interlace-mode=progressive, width=1024, height=576, framerate=24/1 ! \
>>> shmsink socket-path=/tmp/feed-control-pipe-3-4
>>> shm-size=40000000
>>> wait-for-connection=0
>>>
>>> If someone could help me out here, that'd be great!
>>>
>>> Thank you.
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://gstreamer-devel.966125.n4.nabble.com/udpsrc-decode-shmsink-tp4668040.html
>>> Sent from the GStreamer-devel mailing list archive at Nabble.com.
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> [hidden email] <http://user/SendEmail.jtp?type=node&node=4668077&i=1>
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email] <http://user/SendEmail.jtp?type=node&node=4668077&i=2>
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://gstreamer-devel.966125.n4.nabble.com/udpsrc-decode-shmsink-tp4668040p4668077.html
>> To start a new topic under GStreamer-devel, email [hidden email]
>> <http://user/SendEmail.jtp?type=node&node=4668085&i=1>
>> To unsubscribe from udpsrc -> decode -> shmsink, click here.
>> NAML
>> <http://gstreamer-devel.966125.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
> ------------------------------
> View this message in context: Re: udpsrc -> decode -> shmsink
> <http://gstreamer-devel.966125.n4.nabble.com/udpsrc-decode-shmsink-tp4668040p4668085.html>
>
> Sent from the GStreamer-devel mailing list archive
> <http://gstreamer-devel.966125.n4.nabble.com/> at Nabble.com.
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140728/16de2bbb/attachment.html>
More information about the gstreamer-devel
mailing list