0

Currently we tried using AVCodecContext->frame_number/fps to get the current time of the video, but this variable seem to only go up, so after a backward seek the calculated time is all messed up.

Can AVCodecContext->frame_number be used for this purpose? If so, how should it be used; if not, what then is the correct method?

1 Answer 1

0

You can use AVStream duration field to get full video length. And here is an example how to get current video time.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.