H264, UDP and RTP = Video freezes for a few milliseconds while playing

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

H264, UDP and RTP = Video freezes for a few milliseconds while playing

solo_juan
This post was updated on .
Hi,

I am capturing video and transmitting it via UDP protocol from a Raspberry
PI to a remotely computer server (using RTP protocol). When the video is
received, I played it. The problem is that I think packets are lost in
reception and the video freezes for a few milliseconds.

The sender pipeline:

gst-launch-1.0 rpicamsrc bitrate=3870000 preview=false fullscreen=false rotation=180 \
 inline-headers=true keyframe-interval=15 sensor-mode=0 annotation-mode=0x020c \
 ! video/x-raw,width=1280,height=720,framerate=15/1,profile=high \
 ! omxh264enc target-bitrate=1500000 control-rate=1 ! video/x-h264,profile=high \
 ! h264parse ! rtph264pay config-interval=10 pt=96 ! queue ! udpsink host=168.162.134.129 port=9990

The receiver pipeline:

GST_DEBUG=2 gst-launch-1.0 -vc udpsrc caps="application/x-rtp" port=9990 buffer-size=102400  \
 ! rtpjitterbuffer drop-on-latency=false latency=250 do-lost=true !  rtph264depay \
 ! avdec_h264 max-threads=100 output-corrupt=true !  queue  ! fpsdisplaysink sync=false --verbose

Is it possible to do something to avoid this problem?

Cheers.




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

Re: H264, UDP and RTP = Video freezes for a few milliseconds while playing

solo_juan
I'm sorry, the pipelines are:

The sender pipeline:

gst-launch-1.0 rpicamsrc bitrate=3870000 preview=false fullscreen=false
rotation=180 \
 inline-headers=true keyframe-interval=15 sensor-mode=0
annotation-mode=0x020c \
 ! video/x-raw,width=1280,height=720,framerate=15/1,profile=high \
 ! omxh264enc target-bitrate=1500000 control-rate=1 !
video/x-h264,profile=high \
 ! h264parse ! rtph264pay config-interval=10 pt=96 ! queue ! udpsink
host=168.162.134.129 port=9990

The receiver pipeline:

GST_DEBUG=2 gst-launch-1.0 -vc udpsrc caps="application/x-rtp" port=9990
buffer-size=102400  \
 ! rtpjitterbuffer drop-on-latency=false latency=250 do-lost=true !
rtph264depay \
 ! avdec_h264 max-threads=100 output-corrupt=true !  queue  ! fpsdisplaysink
sync=false --verbose



--
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: H264, UDP and RTP = Video freezes for a few milliseconds while playing

Marc Leeman
In reply to this post by solo_juan

With those pipelines, I am surprised you got any video at all :-P

I would guess some frames are lost because of timing issue.

On Thu, 5 Mar 2020 at 12:15, solo_juan <[hidden email]> wrote:
Hi,

I am capturing video and transmitting it via UDP protocol from a Raspberry
PI to a remotely computer server (using RTP protocol). When the video is
received, I played it. The problem is that I think packets are lost in
reception and the video freezes for a few milliseconds.

The sender pipeline:



The receiver pipeline:



Is it possible to do something to avoid this problem?

Cheers.




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


--
g. Marc

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

Re: H264, UDP and RTP = Video freezes for a few milliseconds while playing

solo_juan
Hi,

I used the raw text option and failed!!

These are the pipelines:

The sender pipeline:

gst-launch-1.0 rpicamsrc bitrate=3870000 preview=false fullscreen=false
rotation=180 \
 inline-headers=true keyframe-interval=15 sensor-mode=0
annotation-mode=0x020c \
 ! video/x-raw,width=1280,height=720,framerate=15/1,profile=high \
 ! omxh264enc target-bitrate=1500000 control-rate=1 !
video/x-h264,profile=high \
 ! h264parse ! rtph264pay config-interval=10 pt=96 ! queue ! udpsink
host=168.162.134.129 port=9990

The receiver pipeline:

GST_DEBUG=2 gst-launch-1.0 -vc udpsrc caps="application/x-rtp" port=9990
buffer-size=102400  \
 ! rtpjitterbuffer drop-on-latency=false latency=250 do-lost=true !
rtph264depay \
 ! avdec_h264 max-threads=100 output-corrupt=true !  queue  ! fpsdisplaysink
sync=false --verbose



--
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: H264, UDP and RTP = Video freezes for a few milliseconds while playing

solo_juan
Hi,

The problem is in this part:

omxh264enc target-bitrate=1500000 control-rate=1

This target bitrate is incorrect. For a Raspberry Pi version 3 model b, what
is the highest value that can be set?

Cheers.



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