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

feat(libvideo2x): use OpenCV to retrieve total frame count #1194

Merged
merged 5 commits into from
Oct 21, 2024
Merged

Conversation

k4yt3x
Copy link
Owner

@k4yt3x k4yt3x commented Oct 21, 2024

No description provided.

Signed-off-by: k4yt3x <i@k4yt3x.com>
Signed-off-by: k4yt3x <i@k4yt3x.com>
Signed-off-by: k4yt3x <i@k4yt3x.com>
Signed-off-by: k4yt3x <i@k4yt3x.com>
@k4yt3x k4yt3x changed the title feat(libvideo2x): use OpenCV to retrieve total frame count when nb_frames isn't available feat(libvideo2x): use OpenCV to retrieve total frame count Oct 21, 2024
@k4yt3x k4yt3x merged commit bc168d1 into master Oct 21, 2024
2 of 6 checks passed
@k4yt3x k4yt3x deleted the dev branch October 21, 2024 23:54
@mirh
Copy link

mirh commented Oct 22, 2024

Why can't you check nb_read_frames?

@k4yt3x
Copy link
Owner Author

k4yt3x commented Oct 22, 2024

@mirh Because it only exists in FFprobe, not FFmpeg's C bindings. To do it with just FFmpeg I'll need to decode all frames. I'm also going to need OpenCV anyways for some upcoming features.

@k4yt3x
Copy link
Owner Author

k4yt3x commented Oct 25, 2024

Yeah I am aware. The goal is to get a rough estimation of the total frames quickly so we can calculate the progress. At this time, I don't see the necessity to have it 100% accurate, since we are only using this information to show the user roughly how much of the video has been processed and how much is left.

I just didn't think it'll be worth decoding every frame in the video just to get an accurate reading. It doesn't matter too much if it's off by a couple of frames.

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