OpenVisualCloud / SVT-HEVC

SVT HEVC encoder. Scalable Video Technology (SVT) is a software-based video coding technology that is highly optimized for Intel® Xeon® processors. Using the open source SVT-HEVC encoder, it is possible to spread video encoding processing across multiple Intel® Xeon® processors to achieve a real advantage of processing efficiency.
Other
507 stars 169 forks source link

expose intra-refresh parameters in FFmpeg plugin #584

Closed alatteri closed 3 years ago

alatteri commented 3 years ago

Hello. I am requesting that the intra-refresh parameters to be exposed in the FFmpeg plugin.

Thanks.

tianjunwork commented 3 years ago

Hi @alatteri , I am not sure about intra-refresh. Which interface are you referring to? https://github.com/OpenVisualCloud/SVT-HEVC/blob/master/Docs/svt-hevc_encoder_user_guide.md

intraPeriodLength is exposed @ https://github.com/OpenVisualCloud/SVT-HEVC/blob/master/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch#L266 intraRefreshType is @ https://github.com/OpenVisualCloud/SVT-HEVC/blob/master/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch#L289 Let me know if you need other help.

alatteri commented 3 years ago

Hello @tianjunwork

I am using UltraGrid which uses libavcodec as its encoding base. When listing the options for SVT HEVC, intra-refresh is not exposed.

If I trying adding intra-period=23 to the encoding parameters , the following error is produced [lavc] Error: Unable to set 'intra-period' to '23'. Check command-line options.

Options for libsvt_hevc:
    - asm_type - Assembly instruction set type [0: C Only, 1: Auto]
    - aud - Include Access Unit Delimiter
    - bl_mode - Random Access Prediction Structure type setting
    - forced-idr - If forcing keyframes, force them as IDR frames.
    - hielevel - Hierarchical prediction levels setting
        * flat
        * 1 level
        * 2 level
        * 3 level
    - la_depth - Look ahead distance [0, 256]
    - level - Set level (level_idc)
    - preset - Encoding preset [0, 12]
    - profile - Profile setting, Main Still Picture Profile not supported
    - qp - QP value for intra frames
    - rc - Bit rate control mode
        * cqp
        * vbr
    - sc_detection - Scene change detection
    - thread_count - Number of threads [0: Auto, 96: Min]
    - tier - Set tier (general_tier_flag)
        * main
        * high
    - tune - Quality tuning mode
        * sq - Visually optimized mode
        * oq - PSNR / SSIM optimized mode
        * vmaf - VMAF optimized mode
    - hdr - High dynamic range input (HDR10)
    - umv - Enables or disables unrestricted motion vectors
    - tile_row_cnt - tile count in the row
    - tile_col_cnt - tile count in the column
    - tile_slice_mode - per slice per tile, only valid for multi-tile
    - pred_struct - The prediction structure
    - vid_info - Enables or disables sending a vui structure in the HEVC Elementary bitstream.
tianjunwork commented 3 years ago

Hi @alatteri, if you are using svt-hevc library through ffmpeg, use -g to set the keyframe interval.

alatteri commented 3 years ago

Hi @tianjunwork

I am trying to use intra-refresh with SVT-HEVC, not vp9.

tianjunwork commented 3 years ago

Sorry, I was processing some svt-vp9 issue just now. Last comment is fixed.

alatteri commented 3 years ago

Why are the intra-refresh parameters not exposed via libavcodec?

tianjunwork commented 3 years ago

Hi @alatteri , ffmpeg already provides -g parameter for setting the gop size. Lots of other encoders also use it, e.g. x264, libvpx-vp9. The intraPeriodLength(svt-hevc) is calculated from -g value. @ https://github.com/OpenVisualCloud/SVT-HEVC/blob/master/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch#L266