Hardware: AGX ORIN
Software: Jetpack 5.0.2
I have been attempting to send a video file locally via UDP using ffmpeg:
ffmpeg -stream_loop -1 -re -i test.ts -map 0 -c copy -preset ultrafast -f mpegts "udp://127.0.0.1:5000"
And receiving the same stream via UDP using gstreamer:
gst-launch-1.0 udpsrc port=5000 ! application/x-rtp, media=video, clock-rate=90000, encoding-name=H264 ! rtph264depay ! decodebin ! videoconvert ! aasink
But I get an error on the receiving gstreamer end:
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0: Could not decode stream.
Additional debug info:
gstrtpbasedepayload.c(505): gst_rtp_base_depayload_handle_buffer ():
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0:
Received invalid RTP payload, dropping
ERROR: from element /GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0:
The stream is in the wrong format.
Additional debug info:
gstrtph264depay.c(1298): gst_rtp_h264_depay_process ():
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0:
NAL unit type 27 not supported yet
More detailed information on the video file:
Original ID: 1002
Codec: H264 - MPEG-4 AVC (part 10) (h264)
Type: Video
Video resolution: 1920x1080
Buffer dimensions: 1920x1088
Frame rate: 30
Decoded format:
Orientation: Top left
Chroma location: left
When I listen with the command gst-launch-1.0 -v udpsrc port=5000 ! fakesink dump=1
, it is quite apparent that the packets from FFMPEG are being received.
I am not sure why gstreamer’s rtph264depay says the stream is in the wrong format.
Would I have to check some details on the FFMPEG side?
This is what information FFMPEG shows by default while running.
Input #0, mpegts, from 'test.ts':
Duration: 00:00:57.36, start: 20902.827056, bitrate: 2504 kb/s
Program 1
Stream #0:0[0x3ea]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Output #0, mpegts, to 'udp://127.0.0.1:5000':
Metadata:
encoder : Lavf58.29.100
Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame= 611 fps= 30 q=-1.0 Lsize= 5847kB time=00:00:20.62 bitrate=2323.0kbits/s speed= 1x
video:5350kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 9.301388%
Any advice would be appreciated.