Sending mkv file over udpsink gstreamer

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

Sending mkv file over udpsink gstreamer

Pkwom
I am trying to stream an mkv file over udpsink as an rtp payload, but when
the I receive the packets it drops almost every other frame. The stream just
freezes for a couple of seconds and then shows the time synced frame. I have
a timestamp on the video file and it jumps a the same amount of time it
freezes for. The setup is gstreamer is run on a Raspberry Pi 4 and I view
the stream using vlc on another computer.

I have the payload working so it sends over the udpsink successfully using:

gst-launch-1.0 filesrc location=file.mkv ! matroskademux ! rtph264pay !
udpsink host=127.0.0.1 port=8054

I tried changing the buffer size of the udpsink and it had little effect (it
might have increased the shown frames a bit).



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Sending mkv file over udpsink gstreamer

josh
I've been looking into your issue as I have a similar issue. From my testing
it seems to be an issue when the file is h264 encoded as it works fine with
VP8 encoding for me. I'm wondering if it has something to do with h264
and/or the bitrate.

For example :
# Download an example VP8 file without audio
gst-launch-1.0 souphttpsrc
location=https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm
! matroskademux name=d d.video_0 ! matroskamux ! filesink
location=vp8noaudio.mkv sync=false

# Stream example VP8 file (works fine)
gst-launch-1.0 filesrc location=vp8noaudio.mkv ! matroskademux ! rtpvp8pay !
udpsink host=127.0.0.1 port=8054

# Download same file and encode H264 without audio
gst-launch-1.0 souphttpsrc
location=https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm
! matroskademux name=d d.video_0 ! matroskamux ! filesink
location=h264noaudio.mkv sync=false

# Stream example H264 (drops frames)
gst-launch-1.0 filesrc location=vp8noaudio.mkv ! matroskademux ! rtph264pay
! udpsink host=127.0.0.1 port=8054

# On the client side receiving video I'm using this for VP8
gst-launch-1.0 udpsrc port=8056 !
application/x-rtp,media=video,encoding-name=VP8 ! rtpjitterbuffer !
rtpvp8depay ! decodebin ! videoconvert ! queue max-size-buffers=3 !
autovideosink

# On the client side receiving video I'm using this for H264
gst-launch-1.0 udpsrc port=8056 !
application/x-rtp,media=video,encoding-name=H264 ! rtpjitterbuffer !
rtph264depay ! decodebin ! videoconvert ! queue max-size-buffers=3 !
autovideosink

When I use gst-discover-1.0 on the files I noticed that bitrate isn't listed
on the h264 file but on the vp8 it's 80000.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Sending mkv file over udpsink gstreamer

Pkwom
I didn't try it with vp8 before but using your example I also got a result
that worked fine compared to the h264 file. I would be fine with using vp8
but unfortunately do to the amount processing required I wouldn't be able to
transcode the stream using gstreamer. I have continued to try different
things to effect the rate of the stream like config-interval or blocksize
but it only helped reduce the dropping frequency, but none of them actually
fixed the issue completely.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel