Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

How to extract the same number of frames as with ffmpeg #555

Open
darkAlert opened this issue Dec 6, 2023 · 1 comment
Open

How to extract the same number of frames as with ffmpeg #555

darkAlert opened this issue Dec 6, 2023 · 1 comment

Comments

@darkAlert
Copy link

darkAlert commented Dec 6, 2023

For ffmpeg I use a simple command:
ffmpeg -i input.mp4 -qscale:v 2 %6d.jpeg

I initialize the VPF decoder like this:
decoder = nvc.PyNvDecoder(video_path, gpu_id)

I check the number of frames like this:
decoder.Numframes()

I have some h264 encoded videos at 30fps. And I get a different number of frames (sometimes more with ffmpeg, sometimes with VPF).

For me this is critical. Because I have annotated data extracted using ffmpeg and I want to test a model using VPF but can't compare the results frame by frame.

@RomanArzumanyan
Copy link
Contributor

Hi @darkAlert

Apologies for big delay in response.
Please consider checking out https://github.com/RomanArzumanyan/VALI repository.
It's a VPF spin-off which is actively developed and maintained. It has compatible API and package naming.

Just clone your issue there. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants