stream video file over multicast

Hi,

i am using the following pipeline to stream a video over multicast / rtp:

IFACE=en0
gst-launch-1.0 -v \
filesrc location=../videofiles/video.mp4 ! \
qtdemux name=demux demux.video_0 ! \
h264parse ! \
queue max-size-buffers=10000 ! \
rtph264pay config-interval=1 pt=96 ! \
rtpulpfecenc percentage=20 name=fecenc ! \
udpsink multicast-iface=$IFACE host=239.255.42.42 port=5000 auto-multicast=true

I can receive and play this video using the receiver pipeline like:
IFACE=en0

gst-launch-1.0 -v \
udpsrc multicast-iface=$IFACE multicast-group=239.255.42.42 port=5000 caps="application/x-rtp, media=video, encoding-name=H264, payload=96, clock-rate=90000" ! \
rtpjitterbuffer latency=200 ! \
rtpulpfecdec ! \
rtph264depay ! \
h264parse ! \
vtdec ! \
videoconvert ! \
osxvideosink

Looking at tcpdump I can see that the output from the sending script is really bursty.
I already added a queue on the sending pipeline which smoothed things out a little, but I’m new to gstreamer and didn’t find any information on this subject.

I there some best practice I should take into account when streaming a file over udp multicast?

Thanks

Bernhard

Hey by any chance is the multicast stream transmitted over WiFi? If so, WiFi has a reduced bandwidth for multicast and sends it out in batches, and that could explain the bursts. Wired connections are also susceptible to this but it takes a lot of bandwidth for this to happen, so what is the bandwidth your video file is using?

Hi - Thanks for checking - yes you’re right!
I will have to test using wire - I’ll check back in with results.

Apart from that - do you have any information on best practices?
Thanks again,

Bernhard

I would say if possible consider using unicast or an RTSP server to provide this streams to your wireless clients

thanks unicast was not an option, using a stable connection helped :slight_smile: