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

FFmpeg reporting different frame counts for the same piece of media #1249

Closed
jrobble opened this issue Jan 8, 2021 · 0 comments
Closed

FFmpeg reporting different frame counts for the same piece of media #1249

jrobble opened this issue Jan 8, 2021 · 0 comments

Comments

@jrobble
Copy link
Member

jrobble commented Jan 8, 2021

Three different jobs for different pipelines for the same piece of media produced these errors:

"OpenCV reported the frame count to be 2908, but FFmpeg reported it to be 519. 519 will be used."
"OpenCV reported the frame count to be 2908, but FFmpeg reported it to be 202. 202 will be used."
"OpenCV reported the frame count to be 2908, but FFmpeg reported it to be 123. 123 will be used."

This is the FFmpeg command we're using via Tika:

ffmpeg -i ${INPUT} -map 0:v:0 -c copy -f null -

This results in output that is periodically updated as the video stream is copied. Tika uses the frame=\s*(\d+) regex on the output. Since there is a frame= match on each update we can't guarantee that the value is pulled from the final update. This may result in different values each time the media is inspected.

The solution is to use -nostats in the FFmpeg command.

Land to 6.0.

@jrobble jrobble added this to the Milestone 1 milestone Jan 8, 2021
@jrobble jrobble added this to To do in OpenMPF: Development via automation Jan 8, 2021
@jrobble jrobble moved this from To do to In Progress in OpenMPF: Development Jan 8, 2021
@brosenberg42 brosenberg42 moved this from In Progress to Testing in OpenMPF: Development Jan 8, 2021
@jrobble jrobble closed this as completed May 14, 2021
OpenMPF: Development automation moved this from Testing to Closed May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants