Skip to content

Conversation

vadosnaprimer
Copy link
Contributor

https://ffmpeg.org/ffmpeg.html#Video-Options

-r[:stream_specifier] fps (input/output,per-stream)
As an output option:

  • video encoding
    Duplicate or drop frames right before encoding them to achieve constant output frame rate fps.
  • video streamcopy
    Indicate to the muxer that fps is the stream frame rate. No data is dropped or duplicated in this case. This may produce invalid files if fps does not match the actual stream frame rate as determined by packet timestamps.

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).

Copy link
Collaborator

@Pedro-Beirao Pedro-Beirao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Work fine, thank you!

@Pedro-Beirao
Copy link
Collaborator

I do want a proper website for dsda-doom with viddump documentation and guide, but making the defaults more flexible is good anyway.

@Pedro-Beirao Pedro-Beirao merged commit d236f1d into kraflab:master Aug 11, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants