Fix recording of video streams with delayes SPS/PPS#2274
Conversation
b51523b to
c9387e0
Compare
Increasing the `--probesize` to 100MB and `--analyzeduration` to 15 seconds makes it so FFMPEG will try to find the header/info of the stream till it reach those values, which are much higher than the default values (5MB and 5 seconds). This allows us to wait more for the SPS/PPS to be found on an IDR, preventing cases of undecoded video frames when those take too much to arrive. This is essential for the usage with old MCM versions (till 3.22.0), where the SPS/PPS were not sent on every IDR, but every 10 seconds.
c9387e0 to
2e2d8d0
Compare
ES-Alexander
left a comment
There was a problem hiding this comment.
Confirmed working great on an example set of chunks that was processing to black previously :-)
Not sure how you decided on those limits, but I suppose they're not too crazy, and it's probably better to be conservative here rather than trimming fat for optimal performance. A bit of extra RAM usage to make sure the video recording works seems like a reasonable tradeoff 👍
🚀
Old MCM versions send SPS and PPS every 10 seconds, so 15 seconds give us some margin. The 100MB is accounting for a very unlikeable scenario of a 4K camera at 60fps (normal) at an insanely high bitrate of 7.5 MBps (only normal for very high-end cameras).
Exactly my thoughts. |
This PR effectively solves the problem of RadCam recordings made with MCM versions prior to 3.22.1 to generate completely black videos.
The solution was to increase the
--probesizeofFFMPEGto 100MB and the--analyzedurationto 15 seconds. This increases the initial buffer thatFFMPEGuses to find the decoding information (SPS and PPS). Since the old versions of MCM send this code every 10 seconds, and the default values are 5MB and 5s, about half the recordings were failing for missing decoding info (SPS and PPS).Did 20 records in a row with the same ROV that can rarely do two. The problem is gone.
Was also able to process the failing videos that Wilson recorded on the original issue report, with the chunk ZIPs.
Fix #2275