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

Add warning for using an old version of ffmpeg, be accomodating for log quirks of older versions #8005

Merged
merged 5 commits into from
Nov 6, 2024

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Nov 5, 2024

What

Most replacing randomness with warnings. I haven't deep dived on which version will work but 5.1 went fine with my test data minus a bit of log spam which I fixed here.

I considered adding a check for coded availability, but this seems a bit cumbersome given that any off-the-shelf ffmpeg install comes with h264: the problem is that while we get a full string of compile options that ffmpeg was built with, we can't really infer the decoders from this since any given library may fulfill various roles. Instead we'd need to parse the output of ffmpeg -codecs. We should eventually! But doesn't seem urgent right now.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!
  • If have noted any breaking changes to the log API in CHANGELOG.md and the migration guide

To run all checks from main, comment on the PR with @rerun-bot full-check.

@Wumpf Wumpf added exclude from changelog PRs with this won't show up in CHANGELOG.md 🎞️ video labels Nov 5, 2024
crates/store/re_video/src/decode/ffmpeg.rs Outdated Show resolved Hide resolved
crates/store/re_video/src/decode/ffmpeg.rs Outdated Show resolved Hide resolved
crates/store/re_video/src/decode/ffmpeg.rs Outdated Show resolved Hide resolved
&& minor < FFMPEG_MINIMUM_VERSION_MINOR)
{
re_log::warn_once!(
"FFmpeg version is {}. Only versions >= {FFMPEG_MINIMUM_VERSION_MAJOR}.{FFMPEG_MINIMUM_VERSION_MINOR} are officially supported",
Copy link
Member

@emilk emilk Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make all error messages actionable

Suggested change
"FFmpeg version is {}. Only versions >= {FFMPEG_MINIMUM_VERSION_MAJOR}.{FFMPEG_MINIMUM_VERSION_MINOR} are officially supported",
"The found `ffmpeg` binary on your system has version {}. Rerun has only been tested with >= {FFMPEG_MINIMUM_VERSION_MAJOR}.{FFMPEG_MINIMUM_VERSION_MINOR}. Please update your `ffmpeg` version.",

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better: include the link to the latest ffmpeg version, as provided by ffmpeg-sidecar!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…and maybe we should just return an error instead

Copy link
Member Author

@Wumpf Wumpf Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't want to return an error since chances that things just work are quite high. But yeah let's log an error with url to make it more visible!
The can't-parse situation is a different story, granted

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed my mind again after seeing that 7.1-essentials_build-www.gyan.dev is a version string we might get. This is too wild to make it any of this an error, stays a warning
But adding the download link

Comment on lines 584 to 587
re_log::warn_once!(
"Failed to parse FFmpeg version: {}",
ffmpeg_version.raw_log_message
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think at this point we should return an error, so that we show the "Install ffmpeg" stuff in the selection panel, perhaps with a different message

@emilk
Copy link
Member

emilk commented Nov 6, 2024

Btw, it would be super-useful to send an analytics events when:

  • ffmpeg is missing
  • ffmpeg version can't be parsed
  • ffmpeg version is too old

@Wumpf
Copy link
Member Author

Wumpf commented Nov 6, 2024

analytics even on ffmpeg missing might be a bit too spammy, no? We can't assume that a first time user has ffmpeg installed

@Wumpf Wumpf force-pushed the andreas/ffmpeg-version-check branch from 6d2c164 to d4daf35 Compare November 6, 2024 15:36
@Wumpf Wumpf merged commit 06b47f6 into main Nov 6, 2024
36 checks passed
@Wumpf Wumpf deleted the andreas/ffmpeg-version-check branch November 6, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude from changelog PRs with this won't show up in CHANGELOG.md 🎞️ video
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants