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

obs-ffmpeg: Add VAAPI HEVC encoding as an option #2246

Closed
wants to merge 1 commit into from
Closed

obs-ffmpeg: Add VAAPI HEVC encoding as an option #2246

wants to merge 1 commit into from

Conversation

dionney
Copy link
Contributor

@dionney dionney commented Dec 14, 2019

Since VAAPI h264 already exists, and the call to FFmpeg
is (essentially) the same, adapt the code by using the
type_data parameters were appropriate.

Description

Add the ability to choose HEVC as an encoder for recording, when available (depends on FFmpeg).

I tried to reuse a maximum of code from the VAAPI h264 pathway.

image

Motivation and Context

On AMD cards, h264 is... ok... but, at least for the new (NAVI) cards, HEVC is arguably better. It would be nice to have to option to record with this encoder.

How Has This Been Tested?

Changed the encoder for recording. Recorded with CQP, CBR and VBR.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.

Since VAAPI h264 already exists, and the call to FFmpeg
is (essentially) the same, adapt the code by using the
type_data parameters were appropriate.
@WizardCM WizardCM added the Enhancement Improvement to existing functionality label Dec 14, 2019
@kkartaltepe kkartaltepe added the Linux Affects Linux label Dec 14, 2019
@kkartaltepe
Copy link
Collaborator

kkartaltepe commented Dec 14, 2019

Add the ability to choose HEVC as an encoder for recording,

This actually adds HVEC for streaming, which cannot be used on any common platform currently to my knowledge and is strictly not supported on rtmp.

Recording via any ffmpeg codec is already supported by the custom ffmpeg recording option. So I don't find this particularly compelling to PR. And has been rejected every time its been PRed so far for context.

@dionney
Copy link
Contributor Author

dionney commented Dec 15, 2019

For me, it does not appear as an encoder for streaming.
It is my understanding that in


there is a filter for h264 for streaming.

If it is to be rejected, so be it.

@kkartaltepe
Copy link
Collaborator

Looks like i was mistaken on that. There are checks for it in the ui.

@dribbleondo
Copy link

dribbleondo commented Dec 18, 2019

If this ever gets added, I would recommend changing the name of FFMPEG VAAPI to read FFMPEG VAAPI H.264, which keeps it in line with other hardware accelerated options naming conventions (FFMPEG NVENC H.264 and Intel Quicksync H.264). On my own personal commits, I've changed the name to "AMD and Intel FFMPEG VAAPI H.264", with the reasoning that it's more obvious to the end user that VAAPI works on both AMD and Intel devices, and NVENC and Quicksync are known acceleration names on Windows.

Just my two-cents.

@aufkrawall
Copy link

@kkartaltepe

Recording via any ffmpeg codec is already supported by the custom ffmpeg recording option. So I don't find this particularly compelling to PR. And has been rejected every time its been PRed so far for context.

I don't understand this point. Couldn't this be applied to offering any VAAPI option at all in the GUI? Though it wouldn't be very user friendly to hide core options behind a very hard to use CLI function. It's easy to use with NVENC/AMF, while it's not with VAAPI.

@kkartaltepe
Copy link
Collaborator

It's easy to use with NVENC/AMF, while it's not with VAAPI.

Im not sure how that has anything to do with HEVC. If you feel VAAPI is hard to use please file a feature request for how you think it might be easier to use, but its probably the simplest interface next to NVENC in obs.

@jp9000
Copy link
Member

jp9000 commented Dec 29, 2019

The codecs I'm interested in eventually (hopefully, some day) directly supporting directly are AV1 and maybe VP9, mostly because those are the ones that are so important to help define the industry. However, AV1 is still very young and needs time, I admit.

Besides, right now all this PR would do is save you file space when recording. That is not why I'm declining this however: I am declining this because it is extremely important that precedent be set for this codec, it is not because I "don't care" or something, but because this is not the direction the industry should be going. I want to discourage this direction and encourage AV1 and VP9.

Besides, if your Linux system has a build of FFmpeg that supports it, you can just use it through FFmpeg output instead. I just don't want to encourage this codec directly in OBS. Thanks however.

@jp9000 jp9000 closed this Dec 29, 2019
@obsproject obsproject locked and limited conversation to collaborators Dec 29, 2019
@dionney dionney deleted the hevc_vaapi branch August 5, 2020 23:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Enhancement Improvement to existing functionality Linux Affects Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants