Closed mgorny closed 5 months ago
It looks like the output text has changed a bit. It looks for a line starting with frame=
, but its not there.
I think it doesn't output frame=
with -c copy
anymore. I guess it doesn't count frames if it doesn't decode the stream.
😢 any idea about how we can modify the command to make ffmpeg include the frame count again?
I'm afraid I don't know. I was able to find a solution involving ffprobe but I haven't tested it.
Same issue here... I quickly looked at ffmpeg code. It looks like the print command is still there but with an additional requirement for a filter:
ffmpeg 6.1: https://github.com/FFmpeg/FFmpeg/blob/33efa50fa4508567b1d84d0a84728b400e492a6a/fftools/ffmpeg.c#L539-L557
ffmpeg 5.1: https://github.com/FFmpeg/FFmpeg/blob/9bf90b12602845b1a07a4ba4e7452d9229195df5/fftools/ffmpeg.c#L1566-L1586
Changing -c copy
to -vf copy
in the current call thus seems to work for me although I don't know how robust or efficient that is.
https://github.com/imageio/imageio-ffmpeg/blob/9ab981a8d09138fb1b3b814cb4287b705f258ec5/imageio_ffmpeg/_io.py#L150-L160
to
cmd = [
get_ffmpeg_exe(),
"-i",
path,
"-map",
"0:v:0",
"-vf",
"copy",
"-f",
"null",
"-",
There is also a null
filter which may be more appropriate:
https://ffmpeg.org/ffmpeg-filters.html#null
https://ffmpeg.org/ffmpeg-filters.html#copy
@tvercaut Thanks, it would be great if this issue could be fixed with such a simple change.
@mgorny do you perhaps have a chance to check whether the fix proposed by @tvercaut works for you?
@mgorny do you perhaps have a chance to check whether the fix proposed by @tvercaut works for you?
Yes, the tests pass for me with that change.
Thanks!
@mgorny thanks for confirming this!
@tvercaut could I interest you in contributing this change via a PR? 😄
PR submitted in #107 but note that I haven't tested it with ffmpeg 5.X so hopefully the CI will do that
When running the test suite today, I'm getting a number of failures:
Also some similar failures when running imageio's test suites. I'm pretty sure it worked around release time, so I suspect something changed on my system. I suspect it's because of ffmpeg upgrade to 6.1 but can't check right now.
Full log: imageio-ffmpeg.txt