0

I need to record from an RTSP at two different resolutions (original and something lower). I also need to have the files broken up according to clock time on every even 30 minutes, ex. 1:00, 1:30, 2:00, etc.

I imagine the command would look like this.

ffmpeg -rtsp_transport tcp -i rtsp://<rtsp url> \
  -filter_complex "[0:v]split=2[v1][v2];[v1]scale=1920:1080[out1];[v2]scale=448:252[out2]" \
  -map "[out1]" \
  -c:v -an -vcodec libx264 \
  -f segment -segment_format mp4 -segment_time 00:30:00 -strftime 1 \ 
  /mnt/data/original-%Y-%m-%d-%H.%M.%S.mp4 \
  -map "[out2]" \
  -c:v -an -vcodec libx264 \
  -f segment -segment_format mp4 -segment_time 00:30:00 -strftime 1 \ 
  /mnt/data/low-reso-%Y-%m-%d-%H.%M.%S.mp4 \

Of course, this doesn't work. The command above gives me this error.

[NULL @ 0x556c999c2140] Unable to find a suitable output format for 'segment'
segment: Invalid argument

I've tried so many perturbations of this command to get it to work without any luck. Does anyone know how to do this?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.