fix framerate when dumping video to avi container #759
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://ffmpeg.org/ffmpeg.html#Video-Options
When framerate is not set for the muxer, due to limitations of the AVI container it assumes some default framerate of 600.000 when VFW importer is used to process that video, resulting in lots of imaginary "duplicate frames".
Why does VFW matter? Because it's fast and you can import directly into avisynth, while an ffmpeg-based importer takes forever to index video AND THEN audio for high resolution footage. But why does avisynth matter? Because it's what we've been using for all these years over at tasvieos to encode TASes, and it's usually easy to be compatible with it for emulators (and anything else that dumps video).
Obviously this entire change could be replaced with just shipping custom config or providing users with docs on how to fix their AVI dumping with this and other source ports. But I thought it'd be nice to both document and implement the proper fix for future generations, even if nobody else is using AVI anymore.
I tested dumping to MKV and it didn't cause any difference (not that I expect it to).