-
Notifications
You must be signed in to change notification settings - Fork 19
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
Support newer ffmpeg #52
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update.
] | ||
command = [_get_ffmpeg_path(), '-nostdin', '-i', str(path)] | ||
|
||
older_ffmpeg_version = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand. If the value is hardcoded, shouldn't this be removed ? Only the new command could be kept
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it would be fine to keep only the new command.
I wasn't sure if it was useful to document the change this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll update the code from my end before merging.
The more recent versions of ffmpeg (including 6.1.1-3ubuntu5 which is the default in github.com ubuntu:latest) no longer output
"frame= *(\d+)"
using the old command invocation in_get_video_metadata()
.This results in issue #44.
We overcome this be replacing the command invocation to use
['-acodec', 'copy', '-vf', 'select=1', '-vsync', '0']
rather than['-acodec', 'copy', '-vcodec', 'copy']
. This is backwards compatible with the older ffmpeg.For github actions to work correctly, it was necessary to update the action version numbers.