【问题标题】:How to use the HM-11 for YUV to HEVC encoding?如何使用 HM-11 进行 YUV 到 HEVC 编码?
【发布时间】:2016-10-04 10:28:28
【问题描述】:

大家好,我正在使用 HM-11 在 HEVC 流中编码 YUV 视频,但我遇到了 3 个问题:

  1. 当我将帧大小设置为 720x1280 时,ffmpeg 的 ffplay 显示没有太模糊的视频。有一段时间使用 cif 格式 (352x288) 我可以查看它。我还需要设置什么才能查看它。

  2. 我收到了这个警告:

    HM software: Encoder Version [11.0][Windows][VS 1600][32 bit]
    ******************************************************************
    ** WARNING: --SEIDecodedPictureHash is now disabled by default. **
    **          Automatic verification of decoded pictures by a     **
    **          decoder requires this option to be enabled.         **
    ******************************************************************
    
    Error: found fewer Reference Picture Sets than GOPSize
    Error: Invalid GOP structure given
    

    这是什么意思,我该如何避免这个警告?

  3. 最后一个是上面关于GOP大小的,我该如何改变它?

【问题讨论】:

  • 你用的是什么配置文件?

标签: video encode hevc


【解决方案1】:

您的配置文件似乎设置不正确。

我们以cfg/目录下HM提供的encoder_randomaccess_main.cfg为例。

第一行是关于文件 I/O

#======== File I/O =====================
BitstreamFile                 : str.bin
ReconFile                     : rec.yuv

我通常将其替换为:

#======== File I/O ===============
InputFile                     : your_video.yuv
InputBitDepth                 : 8           # Input bitdepth
FrameRate                     : 24          # Frame Rate per second
FrameSkip                     : 0           # Number of frames to be skipped in input
SourceWidth                   : 416         # Input  frame width
SourceHeight                  : 240         # Input  frame height
FramesToBeEncoded              : 100         # Number of frames to be coded

BitstreamFile                 : your_video.bin
ReconFile                     : rec.yuv
  1. 这里SourceWidthSourceHeight要根据你输入的视频来设置。

  2. 编码器似乎发现您的配置文件中给出的 GOP 结构无效。这可能有不同的原因。在coding structure 部分下的配置文件中给出的 GOP 结构确实无效。或者这可能与您遇到的第一个问题(其他错误的配置参数)有关。

  3. 您可以在coding structure 部分下的配置文件中更改GOP 结构。在这里,我建议您阅读 doc/ 目录中 HM 中给出的文档。 software_manual.pdf 中对 GOP 结构有很好的解释。

例如,这里是默认文件encoder_randomaccess_main.cfg

中给出的GOP结构
#======== Coding Structure =============
IntraPeriod                   : 32          # Period of I-Frame ( -1 = only first)
DecodingRefreshType           : 1           # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
GOPSize                       : 8           # GOP Size (number of B slice = GOPSize-1)
#        Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures     predict deltaRPS #ref_idcs reference idcs 
Frame1:  B    8   1        0.442    0            0              0           2                3         -8 -12 -16             0
Frame2:  B    4   2        0.3536   0            0              1           2                3         -4  -8   4             1       4        4         1 1 0 1
Frame3:  B    2   3        0.3536   0            0              2           2                4         -2  -6   2 6           1       2        4         1 1 1 1
Frame4:  B    1   4        0.68     0            0              3           2                4         -1   1   3 7           1       1        5         1 0 1 1 1
Frame5:  B    3   4        0.68     0            0              3           2                4         -1  -3   1 5           1      -2        5         1 1 1 1 0
Frame6:  B    6   3        0.3536   0            0              2           2                3         -2  -6   2             1      -3        5         0 1 1 1 0
Frame7:  B    5   4        0.68     0            0              3           2                4         -1  -5   1 3           1       1        4         1 1 1 1
Frame8:  B    7   4        0.68     0            0              3           2                4         -1  -3  -7 1           1      -2        5         1 1 1 1 0

【讨论】:

  • 非常感谢 damjeux 的回答。后来我自己明白这是我使用的输入 yuv 视频的问题,它是一个 cif。现在我有另一个问题,在配置文件中最适合 hevc 编码的是什么,因为这是我需要使用的。
  • 这取决于您的目标应用程序。如果您的目标是“实时”流媒体(例如视频会议),那么低延迟最有意义。如果您的目标是网站上的视频点播,那么随机访问更有意义。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多