Skip to content

Instantly share code, notes, and snippets.

@TomHumphries
TomHumphries / readme.md
Created January 31, 2022 16:15
Saving RTSP Camera Streams with FFmpeg

Saving RTSP Streams from Tapo C310 Cameras with FFmpeg

The full FFmpeg command to copy-paste:

ffmpeg -hide_banner -y -loglevel error -rtsp_transport tcp -use_wallclock_as_timestamps 1 -i rtsp://username:[email protected]:554/stream1 -vcodec copy -acodec copy -f segment -reset_timestamps 1 -segment_time 900 -segment_format mkv -segment_atclocktime 1 -strftime 1 %Y%m%dT%H%M%S.mkv

The input stream URL is for a Tapo C310 camera with the RTSP username and password "username" and "password".

I've put a fair bit of experimentation into the settings in this command. I've included the what and whys below, as well as a camera recommendation for RTSP.