TransWikia.com

Periodical video hangs when recording rtsp stream with ffmpeg

Super User Asked by Shnuer on January 26, 2021

I write a rtsp stream with ffmpeg to raspberry pi. When recording for a long time, it starts to hang from one second to 20 seconds. I used ffmpeg version 4.2.2 for the recording. I noticed this problem on raspberry pi models 2, 3 and 4 but when writing to my computer this problem was not noticed. The command to write ffmpeg:

ffmpeg -rtsp_transport tcp -stimeout 3000000 -i rtsp://192.168.1.10:554/user=admin&password=&channel=1&stream=0.sdp? -hide_banner -y -vcodec copy -f segment -segment_time 300 -segment_start_number 1 -segment_format mp4 -reset_timestamps 1 -flush_packets 1 /media/CD/TV_%d.mp4 -fflags +genpts -vsync 0 -enc_time_base -1

I have already tried it:

  • change the bitrate
  • write cpu logs, but not any peaks in the core were not noticed.
  • change the version of ffmpeg

None of the above has helped to improve the situation.
How can this problem be solved?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP