- GStreamer
gst-launch-1.0 playbin uri=rtsp://...
gst-launch-1.0 rtspsrc location=rtsp://... latency=200 protocols=4 ! queue ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! autovideosink
gst-launch-1.0 filesrc location=file.mp4 ! decodebin ! videoconvert ! autovideosink
gst-launch-1.0 uridecodebin source::latency=200 uri=rtsp://... ! videoconvert ! queue ! videoconvert ! jpegenc ! multifilesink location=image_%06d.jpg
1. gst-launch-1.0 -e rtspsrc location=rtsp://... protocols=tcp ! rtph264depay ! h264parse ! mp4mux ! filesink location=output.mp4
2. gst-launch-1.0 uridecodebin uri=rtsp://... ! 'video/x-raw,width=1920,height=1080,format=RGB,framerate=60/1' ! videoconvert ! queue ! videoconvert ! jpegenc ! filesink location=output.mp4
3. ffmpeg -rtsp_transport tcp -i rtsp://... -c:v copy -c:a aac video.mp4
- ffmpeg
ffmpeg -i rtsp://... -vcodec copy test.mp4
ffmpeg -rtsp_transport tcp -i rtsp://... -vcodec copy test.mp4
ffmpeg -i input.mp4 -filter:v "setpts=PTS/60" output.mp4
ffmpeg -i video.mp4 -ss 01:06:56 -to 01:07:08 -c copy cut.mp4
ffmpeg -safe 0 -f concat -i list.txt -c copy output.mp4
ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i video.avi -c:a mp2 -c:v h264_nvenc video.mp4
- vlc restream
1. Restream rtsp
vlc rtsp://... --sout='#transcode{vcodec=h264,scale=Auto,acodec=none,scodec=none}:rtp{sdp=rtsp://:8554/mystream}' --no-sout-all --sout-keep -Idummy
2. mp4 to rtsp
vlc file.mp4 --sout='#transcode{vcodec=h264,scale=Auto,acodec=none,scodec=none}:rtp{sdp=rtsp://:8554/mystream}' --no-sout-all --sout-keep --loop -Idummy
- ffmpeg restream
docker run --rm -it --network=host aler9/rtsp-simple-server
ffmpeg -re -stream_loop -1 -i cam1.mp4 -c copy -f rtsp rtsp://localhost:8554/mystream
- h264 to h265
ffmpeg -i test.mp4 -c:v libx265 test2.mp4
- ERROR from element sink_encoder: Can not initialize x265 encoder.
ffmpeg -i ./20220321_15h-16h_p2.mp4 -vcodec h264 -acodec mp2 ./20220321_15h-16h_p2_.mp4
- decodebin0/GstMpegPSDemux:mpegpsdemux0: Internal data stream error.
ffmpeg -i video.mp4 -c:v copy -c:a aac video1.mp4