- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
How do I get the oneVPL encoder to use CBR mode for the AV1 codec? Setting Rate Control to MFX_RATECONTROL _CBR does not give results and with any dark scene, the bitrate drops below TargetBitrate, after which it soars to values that are significantly higher than TargetBitrate. A similar problem is observed with HEVC, but the bitrate drop is not as strong.
When checking with MediaInfo files encoded with AV1 and HEVC codecs, there is no information about Constant bitrate, and for an AVC codec with the same encoding parameters, the information is displayed.
Lien copié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi,
Thank you for posting in Intel communities.
To assist you better, we need the below details. Kindly share the same.
- OS and Hardware details of the machine in which you are trying
- oneVPL version which you are using
- Exact steps to reproduce your issue
- Sample reproducer to reproduce the issue
- Screenshots and other configurations, if any
Regards,
Remya Premdas
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Windows 10, dGPU Intel Arc A380
oneVPL 2.9
I install MFX_RATECONTROL_CBR in mfx.RateControlMethod
Setting the target bitrate in mfx.TargetKbps
The code is part of the plugin for OBS Studio, if it is possible to check the operability in such conditions, then a sample for verification can be downloaded from the link https://github.com/ma3uk/obs-qsv-onevpl/releases
The source code for these steps is located at the link
https://github.com/ma3uk/obs-qsv-onevpl/blob/main/source/QSV_Encoder_Internal_new.cpp#L332
Screenshots of MediaInfo recorded videos using AV1, HEVC, AVC.
The parameters for recording video of all codecs are set the same.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi,
MSDK/oneVPL API uses unions to groups settings applicable for different bitrate modes. For example see https://github.com/oneapi-src/oneVPL/blob/master/api/vpl/mfxstructures.h#L735, TargetKbps, QPP and ICQQuality are in the same union. So, one thing which could go wrong would be to mix up settings applicable to different BRC modes which can lead to basically unpredictable results.
Are you changing any setting? Please verify the same. Otherwise, let us know.
Also, can you please share a sample reproducer(the input file you are using)?
Regards,
Remya Premdas
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
I looked at the Nvidia Nvenc implementation and they have the FillerDataInsertion parameter so that the bitrate is always at a given level, there is a 3 filler_payload flag in mfxPayload, can I use it for AV1? If I can, could you show me how to do it with code examples or similar.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi,
We do not have access to the google drive link to download the video. If the file size is less, please attach it here. Otherwise, I have shared the detailed steps separately in a private message on how to transfer the files. Please follow the steps and share the file with us.
Regards,
Remya Premdas
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
I attached to the message an archive with 2 video samples for recording, when recording which the problem is clearly visible when changing the scene.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
I also attach a file after the encoding process, in it I specifically paused the video to get a static picture. Looking at the video bitrate indicators, you can see that when paused, the bitrate dropped to 311 kbit/s, and after the pause was lifted, it jumped to 10000 kbit/s
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi,
Thanks, We have received the video file. We are checking internally with our team. Meanwhile, could you please share with us all the encode parameters you have set(not only bitrate control mode)?
Regards,
Remya Premdas
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Of course, here is a list of parameters
.mfx.CodecId = MFX_CODEC_AV1;
.mfx.TargetUsage = MFX_TARGETUSAGE_1;
.mfx.CodecProfile = MFX_PROFILE_AV1_MAIN ;
.mfx.GopOptFlag = MFX_GOP_CLOSED;
.mfx.GopRefDist = 8;
.mfx.IdrInterval = 0;
.mfx.NumSlice = 1;
CO.FieldOutput = MFX_CODINGOPTION_ON;
CO.VuiVclHrdParameters = MFX_CODINGOPTION_ON;
CO.VuiNalHrdParameters = MFX_CODINGOPTION_ON;
CO.NalHrdConformance = MFX_CODINGOPTION_ON;
CO2.FixedFrameRate = MFX_CODINGOPTION_ON;
CO2.SkipFrame = MFX_SKIPFRAME_NO_SKIP;
CO2.BitrateLimit = MFX_CODINGOPTION_OFF;
CO3.BitstreamRestriction = MFX_CODINGOPTION_ON;
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi,
Thanks for your response. We are checking internally with our team. We will get back to you with an update.
Regards,
Remya Premdas
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi,
Could you please share with us if you have referred any document or guide for setting these parameters.
Regards,
Remya Premdas
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Based only on the official documentation at oneVPL — oneAPI Specification 1.2-rev-1 documentation
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi,
Thanks for sharing. We are working on this. We will get back to you with an update.
Regards,
Remya Premdas
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Within HRD constraints, it may have smaller frame size in dark scenes and use up more bits for next frames but as long as it stays within HRD constraints, it should be OK. is your goal to achieve frame size close to target bitrate as much as possible? This will not be good in terms of compression efficiency.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Yes, the task is to ensure that the bitrate is as stable as possible, without drawdowns on dark scenes and on black screens, for example in some games where the download of locations takes place on a black screen. This is necessary for streaming the stream to streaming services, such as Youtube, as well as for streaming the stream using WebRTC.
For example, when encoding the AVC codec, there are no such problems, the bitrate drawdown occurs, but it is insignificant and most often does not exceed 2000 kbit/s, for example, with a stream with a bitrate of 8000, the drawdown on the black screen is 6000-7000 followed by a surge to 9500-10000, but with AV1 on the black screen, the bitrate can drop to 47 kbit/s followed by a surge up to 16000-18000.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
I also noticed that the AVC codec with ratecontrol LA_HRD behaves the same as AV1 with CBR - the bitrate on dark and static scenes can also drop significantly to 47 kbit/sec.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi,
Sorry for the delay. Our team is still working on this. We will get back to you with an update.
Regards,
Remya Premdas

- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable