rigaya / QSVEnc

QSVによる高速エンコードの性能実験
http://rigaya34589.blog135.fc2.com/blog-category-10.html
Other
322 stars 31 forks source link

Wrong frame rate (expected: ~24fps, actual: 25fps) when encoding AV1 with A380 @ version 7.21 #91

Closed zlm2012 closed 2 years ago

zlm2012 commented 2 years ago

I tried to encode with AV1 in amatsukaze for 24fps, but actually got 25fps, which causing the failure of AV sync.

calling parameters:

--colorprim bt709 --transfer bt709 --colormatrix bt709 --icq 18 -u 1 --level 5.2 --fixed-func -c av1 --output-depth 10 --ssim -o <omitted> --format raw --y4m -i -

encoder log:

cop.AUDelimiter value changed off -> auto by driver
cop.PicTimingSEI value changed off -> auto by driver
cop.SingleSeiNalUnit value changed off -> auto by driver
cop3.DirectBiasAdjustment value changed off -> auto by driver
cop3.GlobalMotionBiasAdjustment value changed off -> auto by driver
QSVEncC (x64) 7.21 (r2902) by rigaya, Sep 30 2022 12:30:17 (VC 1933/Win)
OS             Windows 11 x64 (22000) [UTF-8]
CPU Info       AMD Ryzen 7 5800X 8-Core Processor [4.70GHz] (8C/16T) <DG2>
GPU Info       Intel Arc A380  Graphics (128EU) 300-2450MHz (31.0.101.3430)
Media SDK      QuickSyncVideo (hardware encoder) FF, 2nd GPU, API v2.07
Async Depth    3 frames
Hyper Mode     off
Buffer Memory  d3d11, 23 work buffer
Input Info     y4m(yv12(10bit))->p010 [AVX2], 1440x1080, 24000/1001 fps
VPP            copyDtoD
               ssim (yv12(10bit))
AVSync         cfr
Output         AV1(yuv420 10bit) main @ Level 5.2
               1440x1080p 4:3 23.976fps (24000/1001fps)
Target usage   1 - best
Encode Mode    ICQ (Intelligent Const. Quality)
ICQ Quality    18
QP Limit       min: none, max: none
Trellis        Auto
Ref frames     4 frames
GopRefDist     8, B-pyramid: on
Max GOP Length 240 frames
VUI            matrix:bt709,colorprim:bt709,transfer:bt709
ssim/psnr: SSIM YUV: 0.982347 (17.531707), 0.992789 (21.420194), 0.994180 (22.350704), All: 0.986059 (18.557134), (Frames: 5034)

encoded 5034 frames, 135.69 fps, 1065.74 kbps, 26.67 MB
encode time 0:00:37, CPU: 7.9, GPU: 57.3, VD: 118.8
frame type IDR   21
frame type I     42,  total size   3.10 MB
frame type P    630,  total size  11.92 MB
frame type B   4383,  total size  13.21 MB

ffprobe result:

Input #0, obu, from 'v0-0-0-main.raw':
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: av1 (Main), yuv420p10le(tv, bt709), 1440x1080 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 1200k tbn
rigaya commented 2 years ago

It seems like the output is raw AV1 (obu), which does not have timestamp information in it.

Please try mp4/mkv output to preserve timestamp (and framerate) information.

rigaya commented 2 years ago

I’ll close this issue as the question has been answered.