Closed daltskin closed 2 years ago
Can you give --ffmpeg-args='-c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -bsf:v "h264_metadata=tick_rate=12.5"'
a go? The 12.5 is 2x the FPS of your stream based on your ffprobe output.
Thanks, I tried that and it didn't work :( I think this could be similar to #194 where in my case, the DVR fps output (6.5 fps) is just too low. The Samsung SRD-870D I was using doesn't have much/any ability to fine tune the video rtsp output. The only way I could get it working was to encode rather than copy the stream using the ffmpeg setting -cv h264
. But, this was no use to me as it sent the CPU sky high on my PC whilst debugging, so RPi would have no chance feeding 8 cameras!
So, as a test I bought a Annke DVR and moved over the existing cameras to it. This unit allows me to specify the frame rate per stream and doesn't require encoding, so using the default ffmpeg settings is so far working well for the live stream :)
Re-titled in case this helps others. @keshavdv feel free to close, or if you want me to test anything against the old unit lmk.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
First thing - great app @keshavdv, this makes the Unifi Protect actually useful :)
Describe the bug When using with a Samsung (Techwin) DVR and Hikvision THC-D220 & THC-T220 cameras the RTSP output within the Unifi Protect web or mobile app are not updating - using the Android app, I'm just seeing the original image and 3 dots animation.
From the docker-compose example I'm have lots of "BrokenPipeError" errors eg:
ffprobe output from RTSP
VLC streams fine with no issue as does ffmpeg when outputting to a local mp4 file.
Things I've tried
Have tried using various --ffmpeg settings (and dropping audio) eg:
--ffmpeg-args '-c:v copy -bsf:v "h264_metadata=tick_rate=60000/1001:fixed_frame_rate_flag=1" -an' --ffmpeg-args '-c:v copy -bsf:v "h264_metadata=tick_rate=30000/1001:fixed_frame_rate_flag=1" -an' --ffmpeg-args '-c:v copy -bsf:v "h264_metadata=tick_rate=30" -an' --ffmpeg-args '-c:v copy -an'
Also tried different rtsp protocols (udp/http etc.) but to no avail. Any tips on what I can try next?
Thanks again!