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

"-svtav1-params" equivalent for av1_qsv encoder (to pass HDR10 mastering metadata)? #221

Open
jian2x opened this issue Jan 18, 2023 · 5 comments

Comments

@jian2x
Copy link

jian2x commented Jan 18, 2023

Hello, I am working to understand how to take advantage of the av1_qsv encoder with my A770 DG2 dGPU. I am trying to encode 10-bit AV1 files with HDR10, but I am struggling to understand how to encode the HDR10 metadata.

With svt-av1, you can pass in the parameters in ffmpeg using the "-svtav1-params" command-line option, for example:
-c:v libsvtav1 -svtav1-params "preset=6:crf=13:tune=0:enable-hdr=1:color-primaries=9:transfer-characteristics=16:matrix-coefficients=9:mastering-display=G(0.265,0.69)B(0.15,0.06)R(0.68,0.32)WP(0.3127,0.329)L(4000.0,0.005):content-light=1000,755"
(svtav1 parameters are all documented here: https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Docs/Parameters.md ). The x265 encoder has an equivalent option (x265-params) as well.

Is there a way to do the equivalent with the OneVPL / av1_qsv encoder in ffmpeg?

Thanks!

@jian2x
Copy link
Author

jian2x commented Jan 18, 2023

Issue tracking link : intel/libvpl#87

@xhaihao
Copy link
Contributor

xhaihao commented Feb 6, 2023

@jian2x You should use AVFrame::side_data to pass your HDR metadata to av1_qsv encoder.

@wenbinc-Bin
Copy link
Contributor

You can also directly set the related parameter in commandline like this.
Sample command:
ffmpeg -v verbose -i input.264 -c:v av1_qsv -color_primaries bt2020 -color_trc bt2020-10 -colorspace bt2020nc -vframes 300 output.ivf
These parameters are in AVCodecContext structure. Qsv encoder can pass them to VPL.

@xuguangxin
Copy link
Contributor

@wenbinc-Bin can we close this?

@wenbinc-Bin
Copy link
Contributor

Yes, I think we can close this ticket.

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

4 participants