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
frameReaderTime giving wrong timestamps #17
Comments
Probably! I'm not at a computer right now, but if you can see where to pull it out of the stream, I'd be happy to accept a fix! |
I would export the AVStream in the findVideoStream function. findVideoStream :: (MonadIO m, MonadError String m) => AVFormat -> m (CInt, AVCodecContext, AVCodec, AVStream) Then the AVStream can be used instead of the AVCodecContext to find the numerator and denominator of the inverse framerate. like this: AVRational num den <- liftIO $ getTimeBase vidStream |
@noughtmare Can you check that the |
Yes, that solves the issue. |
Previously, frame time was obtained from the AVCodecContext, but this was incorrect for some videos. Fixes acowley#17
frameReaderTime is giving the wrong timestamps for some H.264 videos. I think this is the case because it is getting the time_base from the AVCodecContext. The time_base of the AVStream seems to give me the correct values. Is there a way to fix this?
The text was updated successfully, but these errors were encountered: