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

Fix packet timebase handling during encoding. #398

Merged
merged 2 commits into from
Sep 28, 2018

Conversation

jlaine
Copy link
Member

@jlaine jlaine commented Sep 27, 2018

We must not use the frame's timebase as frame is None while flushing the
encoder, which gives random results. In any case we know that frames were
rebased into the CodecContext's time_base.

For a lengthier discussion see #397

@jlaine
Copy link
Member Author

jlaine commented Sep 27, 2018

Travis is failing with this error:

libav.generic: ERROR: Cannot load libcuda.so.1

I'm a bit puzzled by why nvidia extensions were built at all, could we nuke the cache?

@jlaine jlaine force-pushed the encode-with-pts branch 3 times, most recently from fa14a21 to 85b084c Compare September 27, 2018 23:04
We must not use the frame's timebase as frame is None while flushing the
encoder, which gives random results. In any case we know that frames were
rebased into the CodecContext's time_base.

For a lengthier discussion see PyAV-Org#397
@jlaine
Copy link
Member Author

jlaine commented Sep 27, 2018

Problem solved by adding libx264 support to all our Travis builds (appveyor already had it).

As a nice side effect, we no longer skip test_encoding_h264.

@mikeboers
Copy link
Member

I'm really liking this as our immediate solution.

I still want to go on that deep dive to finally decide, once and for all, how time works. But we don't have to do it today.

@jlaine
Copy link
Member Author

jlaine commented Sep 28, 2018

I agree - let's fix the immediate issue while retaining the overall behaviour and take a breath before we dive deeper. I'm now looking into the subleties of AVCodecContext.time_base vs AVStream.time_base

@mikeboers mikeboers merged commit 0d00960 into PyAV-Org:develop Sep 28, 2018
@jlaine jlaine deleted the encode-with-pts branch September 28, 2018 20:59
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.

2 participants