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

duration #38

Open
anacrolix opened this issue Mar 12, 2018 · 1 comment
Open

duration #38

anacrolix opened this issue Mar 12, 2018 · 1 comment

Comments

@anacrolix
Copy link

I'm trying to get the duration of an input. I think something like what's done here: https://stackoverflow.com/questions/6451814/how-to-use-libavcodec-ffmpeg-to-find-duration-of-video-file. Is this exposed? I suspect something needs to added here? https://hackage.haskell.org/package/ffmpeg-light-0.12.0/docs/Codec-FFmpeg-Types.html#t:AVFormatContext

@acowley
Copy link
Owner

acowley commented Mar 12, 2018

I think your analysis is all correct. I guess we'd put this in the Decode module, and we have to do something sensible for when the open input is a camera. We've got checkStreams which seems relevant to the caveat suggested by the SO answer you found. The last consideration would be to try to ensure we give an answer back in a friendly way (perhaps a Ratio).

Would you care to open a PR for this?

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