SVT-HEVC icon indicating copy to clipboard operation
SVT-HEVC copied to clipboard

No parameter for interlaced HEVC encoding on ffmpeg plugin

Open edisongjs opened this issue 6 years ago • 7 comments

Hi,

I do not see a parameter to make an interlaced HEVC encoding (1080i29.97). For example, I could generate interlaced HEVC encoding with x265 with below command. What would be a command for SVT? SVT sample application has a parameter ("-interlaced-video") to signal interlaced video though.

Parameter for x265: -x265-params interlace=1

SVT FFMPEG help message (built on top of ffmpeg 4.1)

/tools/ffmpeg_4.1_svt-hevc -h encoder=libsvt_hevc

ffmpeg version n4.1-64-gbcfd82b Copyright (c) 2000-2019 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609 configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --pkg-config='pkg-config --static' --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --enable-gpl --enable-nonfree --enable-libsvthevc libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 Encoder libsvt_hevc [SVT-HEVC(Scalable Video Technology for HEVC) encoder]: General capabilities: delay threads Threading capabilities: auto Supported pixel formats: yuv420p yuv420p10le libsvt_hevc AVOptions: -vui E..V..... Enable vui info (default true) -aud E..V..... Include AUD (default false) -hielevel E..V..... Hierarchical prediction levels setting (from 1 to 4) (default 4level) flat E..V..... 2level E..V..... 3level E..V..... 4level E..V..... -la_depth E..V..... Look ahead distance [0, 256] (from -1 to 256) (default -1) -preset E..V..... Encoding preset [0, 12] (e,g, for subjective quality tuning mode and >=4k resolution), [0, 10] (for >= 1080p resolution), [0, 9] (for all resolution and modes) (from 0 to 12) (default 9) -profile E..V..... Profile setting, Main Still Picture Profile not supported (from 1 to 2) (default main10) main E..V..... main10 E..V..... -tier E..V..... Set tier (general_tier_flag) (from 0 to 1) (default main) main E..V..... high E..V..... -level E..V..... Set level (level_idc) (from 0 to 255) (default 0) 1 E..V..... 2 E..V..... 2.1 E..V..... 3 E..V..... 3.1 E..V..... 4 E..V..... 4.1 E..V..... 5 E..V..... 5.1 E..V..... 5.2 E..V..... 6 E..V..... 6.1 E..V..... 6.2 E..V..... -rc E..V..... Bit rate control mode (from 0 to 1) (default cqp) cqp E..V..... vbr E..V..... -qp E..V..... QP value for intra frames (from 0 to 51) (default 32) -sc_detection E..V..... Scene change detection (default false) -tune E..V..... Quality tuning mode (from 0 to 1) (default objective) subjective E..V..... Subjective quality mode objective E..V..... Objective quality mode for PSNR / SSIM / VMAF benchmarking -bl_mode E..V..... Random Access Prediction Structure type setting (default false) -forced-idr E..V..... If forcing keyframes, force them as IDR frames. (default false)

edisongjs avatar Mar 06 '19 17:03 edisongjs

@jsunintel Please help with the request here. Thanks.

tianjunwork avatar Mar 06 '19 17:03 tianjunwork

I have checked SVT HEVC, and although it has the interface, it doesn't support interlace in lib. With it being 0 or 1, the coded data are the same. Only the related flags are different in the bitstream: "general_progressive_source_flag" & "general_interlaced_source_flag".

@hassount please correct me if I got it wrong.

jsunintel avatar Mar 14 '19 00:03 jsunintel

@jsunintel Yes, you are correct. The logic of formatting of input data is at application level, not svt lib. Do you think the ffmpeg plugin can process interlaced data?

tianjunwork avatar Mar 18 '19 16:03 tianjunwork

@jsunintel Yes, you are correct. The logic of formatting of input data is at application level, not svt lib. Do you think the ffmpeg plugin can process interlaced data?

Let me have a check.

jsunintel avatar Mar 19 '19 05:03 jsunintel

I doubt HEVC interlacing is supported in anything besides https://sourceforge.net/p/mjpeg/mailman/message/9927377/ and LG, Panasonic TVs. Even mediainfo has this issue: https://github.com/MediaArea/MediaInfoLib/issues/1092 Iasue in ffmpeg https://trac.ffmpeg.org/ticket/5514

ValZapod avatar Aug 01 '20 06:08 ValZapod

Music Box Russia channel over satellite transmits in HEVC 1920x1080 25fps interlaced - and after recording VLC recognizes file as 50 fps, and resolution 1920x540 - half a height. But on satellite tuner the player works ok - it plays the file as 1920x1080 25fps... When we can expect support for HEVC/H265 interlaced?

xsistema avatar Nov 28 '20 13:11 xsistema

Hi @xsistema, could you test below command line SvtHevcEncApp -i interlaced.yuv -w 1920 -h 540 -interlaced-video 1 -b out.bin to see if it works? If so, we will work on exposing the -interlaced-video interface through ffmpeg.

tianjunwork avatar Nov 28 '20 21:11 tianjunwork