Skip to content

Added VAAPI encoder support#2709

Merged
lastzero merged 1 commit into
photoprism:developfrom
blue-kaleidoscope:feature/vaapi_encoding_support
Sep 28, 2022
Merged

Added VAAPI encoder support#2709
lastzero merged 1 commit into
photoprism:developfrom
blue-kaleidoscope:feature/vaapi_encoding_support

Conversation

@blue-kaleidoscope

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

Copy link
Copy Markdown
Contributor

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

CLAassistant commented Sep 16, 2022

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@lastzero

Copy link
Copy Markdown
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 video Video Formats, Transcoding, FFmpeg, Streaming & Co merged Changes are merged, but may require further testing labels Sep 28, 2022
@graciousgrey graciousgrey added the please-test Ready for manual testing & feedback 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
Copy Markdown
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
Copy Markdown
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...)!

@blue-kaleidoscope blue-kaleidoscope Oct 24, 2022

Copy link
Copy Markdown
Contributor Author

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 a stable release and removed please-test Ready for manual testing & feedback labels Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged Changes are merged, but may require further testing released Available in a stable release video Video Formats, Transcoding, FFmpeg, Streaming & Co

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants