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

ActiveEncode ffmpeg error messages need refinement #4860

Closed
cjcolvar opened this issue Aug 29, 2022 · 3 comments
Closed

ActiveEncode ffmpeg error messages need refinement #4860

cjcolvar opened this issue Aug 29, 2022 · 3 comments
Assignees

Comments

@cjcolvar
Copy link
Member

cjcolvar commented Aug 29, 2022

Upgrading to ActiveEncode 1.0 brings with it capture of the ffmpeg error log. This allows encodes to surface stderr output which might be non-fatal instead of failing encodes. Running this in producation at IU has revealed that ffmpeg can be very verbose at the default log level (sometimes greater than 16MB). This leads to overflowing the DB column for raw_object of ActiveEncode::EncodeRecord, poor UX in the encode dashboard and item view page (which only care about the first value in the encode's errors), and sometimes solr indexing errors when trying to tokenize the ffmpeg logging.

I think we should do a few things to improve this:

  • Change the default ffmpeg loglevel to "error" to reduce the amount of logging
  • Invert the order of the errors on the encode object so failure error messages appear first before the dump of the stderr output
  • Add a human-readable, explanatory note to the errors on the encode object before the dump of the stderr output to improve UX when the encode doesn't fail. "Error encountered during encoding. Check ffmpeg log for more details."

Implementing these changes will require PRs to ActiveEncode and Avalon and probably a patch or minor release of ActiveEncode.

References
-loglevel https://ffmpeg.org/ffmpeg.html
Related ActiveEncode issue which came up when investigating this: samvera-labs/active_encode#110

@cjcolvar cjcolvar self-assigned this Aug 30, 2022
@cjcolvar
Copy link
Member Author

ActiveEncode was already setting the ffmpeg loglevel to error so I did some testing with one of the files that generated these long error logs and found that all of the logging was error level. As a result I think we need to bump loglevel to fatal. I think it might also be nice to set the level flag which will log the level of the message in brackets before the message (e.g. [error] Skipping invalid frame)

@cjcolvar
Copy link
Member Author

I think all of these changes are handled in samvera-labs/active_encode#111

@joncameron
Copy link
Contributor

I approved but didn't merge samvera-labs/active_encode#111

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

No branches or pull requests

2 participants