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

Added VAAPI encoder support #2709

Merged

Conversation

blue-kaleidoscope
Copy link
Contributor

@blue-kaleidoscope blue-kaleidoscope commented Sep 16, 2022

Added VAAPI encoder support for ffmpeg which is necessary for Intel architectures like Haswell and older.

Topic was discussed here: #2450

Acceptance Criteria:

  • Features and enhancements are fully implemented so that they can be released at any time without additional work
  • Automated unit and/or acceptance tests have been added to ensure the changes work as expected and to reduce repetitive manual work
  • User interface changes are fully responsive and have been tested on all major browsers and various devices
  • Database-related changes are compatible with SQLite and MariaDB
  • Translations have been / will be updated (specify if needed)
  • Documentation has been / will be updated (specify if needed)
  • Contributor License Agreement (CLA) has been signed

@CLAassistant
Copy link

CLAassistant commented Sep 16, 2022

CLA assistant check
All committers have signed the CLA.

@lastzero
Copy link
Member

Excellent, thank you very much! I was wondering why it didn't work on Haswell. This explains it.

@lastzero lastzero merged commit c2e1989 into photoprism:develop Sep 28, 2022
@lastzero lastzero added bug Something isn't working video Video Formats, Transcoding, FFmpeg, Streaming & Co merged Changes should be tested again after they have been integrated labels Sep 28, 2022
@graciousgrey graciousgrey added the please-test Ready for acceptance test label Oct 23, 2022
@blue-kaleidoscope blue-kaleidoscope deleted the feature/vaapi_encoding_support branch October 24, 2022 10:39
"-hwaccel", "vaapi",
"-i", fileName,
"-c:a", "aac",
"-vf", format,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lastzero Unbelievable but I commited a mistake here. Line 88 should be "-vf", format=nv12,hwupload instead.
Not specifying the format throws an error message when trying to encode. Could you correct this small mistake?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not quite sure I understand? "format" is a variable, so it is not the actual value of the parameter:

format := "format=nv12,hwupload"

Feel free to send us a quick pull request if you want to change any details (after you have tested it...)!

Copy link
Contributor Author

@blue-kaleidoscope blue-kaleidoscope Oct 24, 2022

Choose a reason for hiding this comment

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

Ooops, I posted quicker than I read.

I just got error messages on my system when trying to encode with VA-API and first thought it was about a missing specification of the format.
Now I see in line 82 I specified it. Sorry... my bad.

The error messages by the way are related to HEVC which means: The old Haswell architecture is not able to encode HEVC (so basically any new iPhone shot) video: https://wiki.libav.org/Hardware/vaapi

With H.264 however, it works with the snippet above.

Maybe I should accept that my NAS is simply too old for the new fancy bancy stuff. ;-)

Have a nice evening and sorry for the confusion!

@lastzero lastzero added released Available in the stable release and removed please-test Ready for acceptance test labels Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working merged Changes should be tested again after they have been integrated released Available in the stable release video Video Formats, Transcoding, FFmpeg, Streaming & Co
Projects
Status: Release 🌈
Development

Successfully merging this pull request may close these issues.

4 participants