Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.

Hardware accelerated encoding

mustafa_cabir_b_
Beginner
226 Views

When I use quicksync to encode to an h.264 file, I need DTS and PTS values. But I use hardware encoding ,PTS is proper but DTS is always 0 after encoding.

My configuration for encoding is shown below: 

m_encVideoParams.mfx.CodecProfile        = MFX_PROFILE_AVC_HIGH;
m_encVideoParams.mfx.CodecId            = MFX_CODEC_AVC;
m_encVideoParams.mfx.TargetUsage                = MFX_TARGETUSAGE_BEST_QUALITY;
m_encVideoParams.mfx.TargetKbps                 = 2000;
m_encVideoParams.mfx.MaxKbps            = 4000;

m_encVideoParams.mfx.RateControlMethod          = MFX_RATECONTROL_VBR;

m_encVideoParams.mfx.FrameInfo.CropW            = h264OptParams -> width;
m_encVideoParams.mfx.FrameInfo.CropH            = h264OptParams -> height;
m_encVideoParams.mfx.FrameInfo.Width        = MSDK_ALIGN16( h264OptParams -> width );

m_encVideoParams.mfx.GopPicSize            =52;
m_encVideoParams.mfx.IdrInterval        = 2;
m_encVideoParams.mfx.GopRefDist            = 3;
m_encVideoParams.mfx.GopOptFlag            = MFX_GOP_STRICT;
m_encVideoParams.mfx.BufferSizeInKB        = 0; 
m_encVideoParams.mfx.FrameInfo.FrameRateExtN    = 25;
m_encVideoParams.mfx.FrameInfo.FrameRateExtD    = 1;

m_encVideoParams.mfx.FrameInfo.PicStruct    = MFX_PICSTRUCT_PROGRESSIVE;

m_encVideoParams.mfx.FrameInfo.Height        = MSDK_ALIGN16( h264OptParams -> height );

m_encVideoParams.mfx.FrameInfo.FourCC           = MFX_FOURCC_NV12;
m_encVideoParams.mfx.FrameInfo.ChromaFormat     = MFX_CHROMAFORMAT_YUV420;
m_encVideoParams.mfx.FrameInfo.BitDepthLuma    = 8;
m_encVideoParams.mfx.FrameInfo.BitDepthChroma    = 8;
m_encVideoParams.AsyncDepth            = 4;

m_encVideoParams.mfx.FrameInfo.CropX            = 0;
m_encVideoParams.mfx.FrameInfo.CropY            = 0;
m_encVideoParams.mfx.EncodedOrder        = 0;

m_encVideoParams.IOPattern            = MFX_IOPATTERN_IN_SYSTEM_MEMORY;

0 Kudos
0 Replies
Reply