[Cin] SVT-AV1 encoding quite fast on x86_64

Terje J. Hanssen terjejhanssen at gmail.com
Thu Dec 14 12:25:51 CET 2023


First, a summary from another current post and thread:
https://lists.cinelerra-gg.org/pipermail/cin/2023-December/007430.html

> I will add the re-encoded sample *SD DV *file using ffmpeg SVT-AV1, as 
> I was positive surprised how much faster (preset 10 about 25 sec) it 
> was than rendering AV1 with CinGG (libaom?) .  I've tested three 
> presets: 8, 10 and 12. "Useable visible quality" for all.
>
>     ffmpeg -i dv01_07.dv -c:v libsvtav1 -preset 8 -crf 35 -c:a 
> libvorbis dv01_07_svt-av1_pr8.webm
>     frame= 2832 fps= 66 q=35.0 Lsize=   28836kB time=00:01:53.26 
> bitrate=2085.6kbits/s speed=2.65x
>
>     ffmpeg -i dv01_07.dv -c:v libsvtav1 -preset 10 -crf 35 -c:a 
> libvorbis dv01_07_svt-av1_pr10.webm
>     frame= 2832 *fps=112* q=35.0 Lsize=   34419kB time=00:01:53.26 
> bitrate=2489.4kbits/s speed=4.47x
>
>     ffmpeg -i dv01_07.dv -c:v libsvtav1 -preset 12 -crf 35 -c:a 
> libvorbis dv01_07_svt-av1_pr12.webm
>     frame= 2832 fps=262 q=35.0 Lsize=   35913kB time=00:01:53.26 
> bitrate=2597.5kbits/s speed=10.5x


The speed of SVT-AV1 encoding seems for me to be quite useable, at least 
for personal use.

Here I add my latest test results for a *HDV (fps=69)* and a *FHD 
(fps=51)* video clip.

    2.0G hdv01_04.m2t
    383M hdv01_04_m2t_svt-av1_pr10.webm

    1.7G    hd01.mov
    20M hd01_mov_svt-av1_pr10.webm


*HDV* (yuv420p)
-------

    *ffprobe -hide_banner hdv01_04.m2t*
    [mpeg2video @ 0x560c32966340] Invalid frame dimensions 0x0.
         Last message repeated 7 times
    [mpegts @ 0x560c32960c00] PES packet size mismatch
    [mpegts @ 0x560c32960c00] Packet corrupt (stream = 1, dts = 295380000).
    [mpegts @ 0x560c32960c00] Could not find codec parameters for stream
    2 (Unknown: none ([160][0][0][0] / 0x00A0)): unknown codec
    Consider increasing the value for the 'analyzeduration' (0) and
    'probesize' (5000000) options
    [mpegts @ 0x560c32960c00] Could not find codec parameters for stream
    3 (Unknown: none ([161][0][0][0] / 0x00A1)): unknown codec
    Consider increasing the value for the 'analyzeduration' (0) and
    'probesize' (5000000) options
    Input #0, mpegts, from 'hdv01_04.m2t':
       Duration: 00:10:57.34, start: 2624.856000, bitrate: 26134 kb/s
       Program 100
       Stream #0:0[0x810]: Video: mpeg2video (Main) ([2][0][0][0] /
    0x0002), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR
    16:9], 25000 kb/s, 25 fps, 25 tbr, 90k tbn
         Side data:
           cpb: bitrate max/min/avg: 25000000/0/0 buffer size: 7340032
    vbv_delay: N/A
       Stream #0:1[0x814]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
    stereo, fltp, 384 kb/s
       Stream #0:2[0x815]: Unknown: none ([160][0][0][0] / 0x00A0)
       Stream #0:3[0x811]: Unknown: none ([161][0][0][0] / 0x00A1)
    Unsupported codec with id 0 for input stream 2
    Unsupported codec with id 0 for input stream 3
    --------------

    *ffmpeg -i hdv01_04.m2t -c:v libsvtav1 -preset 10 -crf 35 -c:a
    libvorbis hdv01_04_m2t_svt-av1_pr10.webm*
    frame=16420 *fps= 69* q=34.0 Lsize=  391289kB time=00:10:57.36
    bitrate=4876.2kbits/s speed=2.77x


    *ffprobe -hide_banner hdv01_04_m2t_svt-av1_pr10.webm*
    [libdav1d @ 0x562b42305540] libdav1d 1.3.0
    Input #0, matroska,webm, from 'hdv01_04_m2t_svt-av1_pr10.webm':
       Metadata:
         ENCODER         : Lavf60.3.100
       Duration: 00:10:57.40, start: 0.000000, bitrate: 4875 kb/s
       Stream #0:0: Video: av1 (Main), yuv420p(tv, bt709), 1440x1080,
    SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 1k tbn
         Metadata:
           ENCODER         : Lavc60.3.100 libsvtav1
           DURATION        : 00:10:57.403000000
       Stream #0:1: Audio: vorbis, 48000 Hz, stereo, fltp
         Metadata:
           ENCODER         : Lavc60.3.100 libvorbis
           DURATION        : 00:10:57.171000000
    [libdav1d @ 0x562b42361540] libdav1d 1.3.0

*FHD* *(*yuv422p10le*)*
-----

    *ffprobe hd01.mov*
    .....
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hd01.mov':
       Metadata:
         creation_time   : 2016-02-23T23:49:21.000000Z
       Duration: 00:01:11.28, start: 0.000000, bitrate: 200496 kb/s
       Stream #0:0[0x1](eng): Video: prores (HQ) (apch / 0x68637061),
    *yuv422p10le(bt709*, top coded first (swapped)), 1920x1080, 182130
    kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 2500 tbn (default)
         Metadata:
           creation_time   : 2016-02-23T23:49:21.000000Z
           handler_name    : Apple Video Media Handler
           vendor_id       : appl
           encoder         : Apple ProRes 422 (HQ)
       Stream #0:1[0x2](eng): *Audio*: pcm_s24le (lpcm / 0x6D63706C),
    48000 Hz, 16 channels, s32 (24 bit), 18432 kb/s (default)
         Metadata:
           creation_time   : 2016-02-23T23:49:21.000000Z
           handler_name    : Apple Sound Media Handler
           vendor_id       : [0][0][0][0]

    *
    ffmpeg -i hd01.mov -c:v libsvtav1 -preset 10 -crf 35 -c:a libvorbis
    hd01_mov_svt-av1_pr10.webm*
    frame= 1781 *fps= 51* q=35.0 Lsize= 19732kB time=00:01:11.26
    bitrate=2268.3kbits/s speed=2.03x


    *ffprobe -hide_banner hdv01_04_m2t_svt-av1_pr10.webm*
    [libdav1d @ 0x562b42305540] libdav1d 1.3.0
    Input #0, matroska,webm, from 'hdv01_04_m2t_svt-av1_pr10.webm':
       Metadata:
         ENCODER         : Lavf60.3.100
       Duration: 00:10:57.40, start: 0.000000, bitrate: 4875 kb/s
       Stream #0:0: Video: av1 (Main), yuv420p(tv, bt709), 1440x1080,
    SAR 4:3 DAR 16:9, 25 fps, 25 tbr, 1k tbn
         Metadata:
           ENCODER         : Lavc60.3.100 libsvtav1
           DURATION        : 00:10:57.403000000
       Stream #0:1: Audio: vorbis, 48000 Hz, stereo, fltp
         Metadata:
           ENCODER         : Lavc60.3.100 libvorbis
           DURATION        : 00:10:57.171000000


An issue is that the audio was lost during the conversion from .mov to 
.webm, so I attach the full ffmpeg output below.
(possibly a mis-match regarding the audio stream #numbers ?)

    *ffmpeg -i hd01.mov -c:v libsvtav1 -preset 10 -crf 35 -c:a libvorbis
    hd01_mov_svt-av1_pr10.webm*
    ...
    Guessed Channel Layout for Input Stream #0.1 : hexadecagonal
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hd01.mov':
       Metadata:
         creation_time   : 2016-02-23T23:49:21.000000Z
       Duration: 00:01:11.28, start: 0.000000, bitrate: 200496 kb/s
       Stream #0:0[0x1](eng): Video: prores (HQ) (apch / 0x68637061),
    yuv422p10le(bt709, top coded first (swapped)), 1920x1080, 182130
    kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 2500 tbn (default)
         Metadata:
           creation_time   : 2016-02-23T23:49:21.000000Z
           handler_name    : Apple Video Media Handler
           vendor_id       : appl
           encoder         : Apple ProRes 422 (HQ)
       Stream #0:1[0x2](eng): Audio: pcm_s24le (lpcm / 0x6D63706C),
    48000 Hz, 16 channels, s32 (24 bit), 18432 kb/s (default)
         Metadata:
           creation_time   : 2016-02-23T23:49:21.000000Z
           handler_name    : Apple Sound Media Handler
           vendor_id       : [0][0][0][0]
    Stream mapping:
       Stream #0:0 -> #0:0 (prores (native) -> av1 (libsvtav1))
       Stream #0:1 -> #0:1 (pcm_s24le (native) -> vorbis (libvorbis))
    Press [q] to stop, [?] for help
    Svt[info]: -------------------------------------------
    Svt[info]: SVT [version]:    SVT-AV1 Encoder Lib v1.7.0
    Svt[info]: SVT [build]  :    GCC 13.2.1 20230912 [revision
    b96e66fd4ef3e36983969fb8cdd1956f551a074b]  64 bit
    Svt[info]: LIB Build date: Nov  3 2023 00:00:00
    Svt[info]: -------------------------------------------
    Svt[info]: Number of logical cores available: 8
    Svt[info]: Number of PPCS 59
    Svt[info]: [asm level on system : up to avx2]
    Svt[info]: [asm level selected : up to avx2]
    Svt[info]: -------------------------------------------
    Svt[info]: SVT [config]: main profile tier (auto)    level (auto)
    Svt[info]: SVT [config]: width / height / fps numerator / fps
    denominator         : 1920 / 1080 / 25 / 1
    Svt[info]: SVT [config]: bit-depth / color format                
         : 10 / YUV420
    Svt[info]: SVT [config]: preset / tune / pred struct                
         : 10 / PSNR / random access
    Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type
                 : 161 / 16 / key frame
    Svt[info]: SVT [config]: BRC mode / rate factor                    
    : CRF / 35
    Svt[info]: -------------------------------------------
    Output #0, webm, to 'hd01_mov_svt-av1_pr10.webm':
       Metadata:
         encoder         : Lavf60.3.100
       Stream #0:0(eng): Video: av1, yuv420p10le(tv, bt709, top coded
    first (swapped)), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 1k
    tbn (default)
         Metadata:
           creation_time   : 2016-02-23T23:49:21.000000Z
           handler_name    : Apple Video Media Handler
           vendor_id       : appl
           encoder         : Lavc60.3.100 libsvtav1
       Stream #0:1(eng): Audio: vorbis, 48000 Hz, hexadecagonal, fltp
    (default)
         Metadata:
           creation_time   : 2016-02-23T23:49:21.000000Z
           handler_name    : Apple Sound Media Handler
           vendor_id       : [0][0][0][0]
           encoder         : Lavc60.3.100 libvorbis
    frame= 1781 fps= 51 q=35.0 Lsize=   19732kB time=00:01:11.26
    bitrate=2268.3kbits/s speed=2.03x
    video:18635kB audio:1059kB subtitle:0kB other streams:0kB global
    headers:3kB muxing overhead: 0.193378%

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20231214/6ce5ba56/attachment.htm>


More information about the Cin mailing list