Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OverflowException in AviWriter.WriteFileHeader #62

Open
schindlerma opened this issue Jan 18, 2023 · 2 comments
Open

OverflowException in AviWriter.WriteFileHeader #62

schindlerma opened this issue Jan 18, 2023 · 2 comments

Comments

@schindlerma
Copy link

There is a System.OverflowException in AviWriter.cs line 632 in the WriteFileHeader method when using larger values for FramesPerSecond, like 1000.

fileWriter.Write((uint)Decimal.Truncate(FramesPerSecond * streamsInfo.Sum(s => s.MaxChunkDataSize))); // max bytes per second

So, what is the correct way to calculate the byterate?

@baSSiLL
Copy link
Owner

baSSiLL commented Jan 18, 2023

Hi @schindlerma
I wonder in the first place do you really use such high frame rates and what for? Does any video player support such frame rates?

So, what is the correct way to calculate the byterate?

Sorry, not sure what I meant here after the years passed. I guess it's about calculating the (average or maximum) byterate from actual data written to a file. And updating it in the header when the file is being closed.

@schindlerma
Copy link
Author

Hi @baSSiLL

Yes, the high frame rates are not just theoretical, they are actually used in videos from high speed cameras.
The video players I use can handle them, e.g. VLC, Windows MediaPlayer.

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

No branches or pull requests

2 participants