Skip to content

Add FPS field if available - #12

Merged
thatcosmonaut merged 2 commits into
MoonsideGames:mainfrom
kiddkaffeine:fps
Jan 12, 2026
Merged

thatcosmonaut merged 2 commits into
MoonsideGames:mainfrom
kiddkaffeine:fps

Conversation

@kiddkaffeine

@kiddkaffeine kiddkaffeine commented Jan 11, 2026 •

Copy link
Copy Markdown
Contributor

I believe the logic here should be correct, but I am light on samples to test with.

ffmpeg does not add this info by default, but permits you to manually specify these values, e.g.:

ffmpeg -I input.m4v -c:v libaom-av1 -bsf:v av1_metadata=tick_rate=30000/1001:num_ticks_per_picture=1 -an output.obu

@flibitijibibo flibitijibibo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not a maintainer but this seems reasonable - it may be worth documenting that this is likely not going to be available unless the AV1 exporter specifies this, but there aren't docs in the headers so I'm not sure what the best fix is without writing a bunch of docs first.

@flibitijibibo flibitijibibo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We ended up talking about this in the FNA Discord and decided to separate this into bool df_guessVideoFramerate, since the other values are guaranteed and we want this to stick out as possible, but not guaranteed. This also allows us to document the one function with the ffmpeg parameters so that people know how to use the function correctly.

@kiddkaffeine

Copy link
Copy Markdown
Contributor Author

Updated per discussion.

If the info is not available, the data at the fps pointer is left alone (undefined). Is that the correct desired behavior?

@flibitijibibo

Copy link
Copy Markdown
Contributor

This looks right - with the documentation this should be ready.

@thatcosmonaut
thatcosmonaut merged commit ed01b75 into MoonsideGames:main Jan 12, 2026
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.

3 participants