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

Support newer ffmpeg #52

Merged
merged 10 commits into from
Apr 11, 2025
Merged

Support newer ffmpeg #52

merged 10 commits into from
Apr 11, 2025

Conversation

hhoppe
Copy link
Collaborator

@hhoppe hhoppe commented Apr 3, 2025

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.

Copy link
Member

@Conchylicultor Conchylicultor left a 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
Copy link
Member

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

Copy link
Collaborator Author

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.

Copy link
Member

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.

@copybara-service copybara-service bot merged commit 848eefb into google:main Apr 11, 2025
1 check passed
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