Hi All,
I’m able to play rtp streams across the network using nvv4l2h265enc
, but not omxh265enc
. Below are my streams, what am I doing wrong?
It is not a question of starting the receive stream before transmit stream, or vice versa, I have tried all combos.
TX on NANO:
gst-launch-1.0 v4l2src device=/dev/video0 ! \
video/x-raw,width=1920,height=1080, framerate=60/1, format=UYVY ! \
nvvidconv ! omxh265enc iframeinterval=3 preset-level=1 ! \
'video/x-h265, stream-format=(string)byte-stream' ! \
rtph265pay ! udpsink host=$HOST_SINK port=$PORT &
RX on PC:
gst-launch-1.0 udpsrc port=5000 ! application/x-rtp,encoding-name=H265,payload=96 \
! rtph265depay ! avdec_h265 ! autovideosink sync=false async=false -e
Recording the stream as follows DOES work, but I want to play it live.
RX on PC:
ssh -t drl@10.0.0.12 /bin/bash -ic 'a' gst-launch-1.0 udpsrc port=5000 ! application/x-rtp,encoding-name=H265,payload=96 ! rtph265depay ! mpegtsmux ! filesink location=streamtest.ts
Thanks,
M
May I know which platform and JetPack version you used?
Hi @kayccc
I am running the Nano production module, on JetPack version 4.5.
M
Hi,
Please set the properties and see if it helps:
... ! nvv4l2h265enc insert-sps-pps=1 insert-aud=1 insert-vui=1 idrinterval=15 ! ...
@DaneLLL. Please re-read. The omx encoder is the one I am having trouble with. Not the nvv.
Hi,
Since we have deprecated omx plugins, would suggest use v4l2 plugins.
HI @DaneLLL I’ll revisit it, but I had two problems with the nvv4l2h265enc encoder:
-
You cannot start a receive stream after starting the nvv4l2h265enc encoder. You must start the receive stream before.
-
The nvv4l2h265enc doesn’t do well with frequent I-Frames. It generates a lot of noise, which is still unresolved on our side - this thread.
Is there any resolution to point 1
specifically?
Hi,
Do you mean it works if you run TX first and then RX, and does not work if you run RX first and then TX? Not sure if we understand it correctly.
You may have to add h265parse after encoder for OMX:
gst-launch-1.0 v4l2src device=/dev/video0 ! \
video/x-raw,width=1920,height=1080, framerate=60/1, format=UYVY ! \
nvvidconv ! omxh265enc iframeinterval=3 preset-level=1 insert-vui=1 ! \
video/x-h265,stream-format=byte-stream ! \
h265parse ! \
rtph265pay config-interval=1 ! \
udpsink host=$HOST_SINK port=$PORT &
1 Like
This worked @Honey_Patouceul !
You’re awesome, thanks so much!
M
@Honey_Patouceul
One interesting finding - while this works to actually start a live stream, it creates some frame skipping that is not present without the h265parse
.
I have tried various settings, as well as a rtpjitterbuffer
in the receive stream, but i’m unable to remove it. Sometimes even one of the previous frames tends to repeat itself over and over at a non-constant interval.
I wonder if there is a solution to this. Removing the h265parse
fixes it, but breaks the live stream of course.
M
You may try nvv4l2h265enc instead of omxh265.
You may also try nvv4l2camerasrc instead of v4l2src:
gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! \
video/x-raw(memory:NVMM),width=1920,height=1080,framerate=60/1,format=UYVY ! nvvidconv ! \
nvv4l2h265enc insert-sps-pps=1 insert-vui=1 ! \
video/x-h265,stream-format=byte-stream ! \
h265parse ! \
rtph265pay config-interval=1 ! \
udpsink host=$HOST_SINK port=$PORT