I have an Xavier AGX dev kit and x4 AGXs I hope to replicate this pipeline on. I am serving the RTSP stream to _my_ip_address:8554/test. I can see it on other computers and VLC no problem. The stream itself is MJPEG. I am not doing h264 because my camera can get better quality and higher fps with mjpeg.
My clear intention/problem statement; I want to split a MJPEG RTSP stream from gstreamer into segmented mp4s on my client. Interval length doesn't matter, just the specific commands is what I am missing.
I can split the live rtsp stream into chunks with ffmpeg on other computers just fine using;
ffmpeg -rtsp_transport tcp -i rtsp://10.42.0.1:8554/test -c copy -f segment -segment_time 600 /home/miles/Documents/line_1_%d.mp4
(how do you format code segments on stack?)
The pipeline is being launched from python/gstreamer on the xavier end. For some reason using python on my ubuntu machine doesn't work. I installed opencv with gstreamer support and it is looking at the correct python path.
I can import gi, etc, but I can't get the video to play in my opencv on my ubuntu machine. If anyone can solve that for me.. that would be great, but not the main problem. I am happy to use command line to solve the problem, but my thought was to first try and use gstreamer to get the stream in python and then do the multifile work in python as well....have spent great deal of time on it, but to no avail. So, I switched to ffmpeg, which seems to have an easier to find solution..
import os os.system("ffmpeg -rtsp_transport tcp -i rtsp://10.42.0.1:8554/test -c copy -f segment -segment_time 600 /home/miles/Documents/line_1_%d.mp4")
It seems like I should be able to use gstreamer to do this....but I can't figure out the mjpeg part. For instance, I found an example using splitmuxsink....
gst-launch-1.0 rtspsrc location=rtsp://10.82.131.240:8554/h264ESVideoTest ! rtph264depay ! h264parse ! splitmuxsink location=file%02d.mp4 max-size-time=10000000000
That expects h264 though, not mjpeg.
Anyone have an idea of how to do this in gstreamer? Otherwise I have a bandaged together pipeline.
M
See above, I didn't realize it was in two sections.