First of all I´m new at jetson nano and gstreamer. There is the following situation:
We have a sony alpha 7 R 4 (IV) attached via the mini-HDMI port to an elgato camlink hdmi capture device. We want to acchieve two things: 1. stream the video signal live to another computer 2. save the original input stream on the jetson nano.
Well we got an rtmp stream working with the following commands:
modprobe v4l2loopback devices=1 exclusive_caps=1 ffmpeg -f v4l2 -input_format yuyv422 -video_size 1920x1080 -i /dev/video0 -pix_fmt yuyv422 -codec copy -f v4l2 /dev/video1 > /dev/null & sleep 5 gst-launch-1.0 -v -e v4l2src device=/dev/video1 ! 'video/x-raw,format=YUY2' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! omxh264enc ! queue ! mux. flvmux name=mux ! rtmpsink location="rtmp://localhost/show/stream live=1"
localhost/show/stream is an nginx server with an rtmp module.
We made it working to perform a live stream and connect a VLC player to the nginx RMTP server. Then we recorded the stream over vlc and the quality wasn´t that good.
How can I tell gstreamer to save the video on the jetson nano?
How can I restart the whole stream when there is an error on the video devices without restarting the jetson nano?