вс, 15 сент. 2024 г., 15:30 Terje J. Hanssen <terjejhanssen@gmail.com>:

Den 15.09.2024 04:23, skrev Andrew Randrianasulu:


сб, 14 сент. 2024 г., 22:42 Terje J. Hanssen via Cin <cin@lists.cinelerra-gg.org>:
Two simple tests I got working Cinelerra Infinity - built: Sep  8 2024 10:37:25 (rpm installation)
on Leap 15.6 on i7-12700KF + Arc A750 gpu

As seen below, quite fast rendering:
  • 207 fps for hdv.m2t  (yuv420p) input -> yuvj420p
  • 125 fps for proreshq.mov  (yuv422p10le) -> yuvj420p (10-bit  to 8-bit color depth)

1)
hdv.m2t

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 (mp3float) ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 384 kb/s

-> hevc_vaapi.mp4

** rendered 5972 frames in 28.721 secs, 207.931 fps
audio0 pad 64 0 (64)

tream #0:0[0x1](und): Video: hevc (Main) (hev1 / 0x31766568), yuvj420p(pc, bt709/unknown/unknown, top coded first (swapped)), 1440x1080 [SAR 4:3 DAR 16:9], 11716 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 129 kb/s (default)


2)
hd.mov
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)

-> hevc_vaapi.mp4

** rendered 1781 frames in 14.188 secs, 125.529 fps
audio0 pad 128 0 (128)

Stream #0:0[0x1](und): Video: hevc (Main) (hev1 / 0x31766568), yuvj420p(pc, bt709/unknown/unknown, top coded first (swapped)), 1920x1080 [SAR 1:1 DAR 16:9], 11427 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 16 channels, fltp, 378 kb/s (default)



I think due to some strangeness with full (pc, jpeg) data levels currently under investigation  you better to retry with color range set to MPEG?


Yeah, thanks. I changed Settings>Prefs>Appearance Color Range to MPEG, and the ffprobe output color range looks more in accordance with the input: yuv420p(tv, bt709 ....)

2)
ffprobe -hide_banner hd01_hevc_vaapi.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'hd01_hevc_vaapi.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf61.1.100
  Duration: 00:01:11.28, start: 0.000000, bitrate: 11603 kb/s
  Stream #0:0[0x1](und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, bt709/unknown/unknown, top coded first (swapped)), 1920x1080 [SAR 1:1 DAR 16:9], 11225 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 16 channels, fltp, 378 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]



But still  yuv422p10le input is changed automatic to  yuv420p output.
Actually in Cingg there is only one single preset "hevc_vaapi.mp4" available to select.

yeah, if my understanding of our code is correct vaapi encoding (and may be decoding, too?) limited to yuv420p. I'll look at OBS source to see if this can be easily fixed, but again, I have in HW to test .....

For now for hevc10 hw encode I can only suggest to create fifo file with mkfifo and point ffmpeg/y4m renderer to it (select supported pixformat from dropbox there). From second terminal run system's ffmpeg set up for hevc10 encode (via any method available).

You can start with 1 sec long test sequences in y4m as normal files just for initial finding of right ffmpeg command line.

You also in theory can setup something like v408 mov (qt) with pcm audio and faststart flag, and use this as on the fly lossless transport between cingg and ffmpeg, but I personally not tested that.





By showing information from the VA-API driver:
  • VLD means the card is capable to decode this format
  • Enc means it can encode this format.
vainfo
Trying display: wayland
Trying display: x11
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.20.1)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.1.3 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   :    VAEntrypointVideoProc
      VAProfileNone                   :    VAEntrypointStats
      VAProfileMPEG2Simple            :    VAEntrypointVLD
      VAProfileMPEG2Main              :    VAEntrypointVLD
      VAProfileH264Main               :    VAEntrypointVLD
      VAProfileH264Main               :    VAEntrypointEncSliceLP
      VAProfileH264High               :    VAEntrypointVLD
      VAProfileH264High               :    VAEntrypointEncSliceLP
      VAProfileJPEGBaseline           :    VAEntrypointVLD
      VAProfileJPEGBaseline           :    VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline:    VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:    VAEntrypointEncSliceLP
      VAProfileHEVCMain               :    VAEntrypointVLD
      VAProfileHEVCMain               :    VAEntrypointEncSliceLP
      VAProfileHEVCMain10             :    VAEntrypointVLD
      VAProfileHEVCMain10             :    VAEntrypointEncSliceLP
      VAProfileVP9Profile0            :    VAEntrypointVLD
      VAProfileVP9Profile0            :    VAEntrypointEncSliceLP
      VAProfileVP9Profile1            :    VAEntrypointVLD
      VAProfileVP9Profile1            :    VAEntrypointEncSliceLP
      VAProfileVP9Profile2            :    VAEntrypointVLD
      VAProfileVP9Profile2            :    VAEntrypointEncSliceLP
      VAProfileVP9Profile3            :    VAEntrypointVLD
      VAProfileVP9Profile3            :    VAEntrypointEncSliceLP
      VAProfileHEVCMain12             :    VAEntrypointVLD
      VAProfileHEVCMain422_10         :    VAEntrypointVLD
      VAProfileHEVCMain422_10         :    VAEntrypointEncSliceLP
      VAProfileHEVCMain422_12         :    VAEntrypointVLD
      VAProfileHEVCMain444            :    VAEntrypointVLD
      VAProfileHEVCMain444            :    VAEntrypointEncSliceLP
      VAProfileHEVCMain444_10         :    VAEntrypointVLD
      VAProfileHEVCMain444_10         :    VAEntrypointEncSliceLP
      VAProfileHEVCMain444_12         :    VAEntrypointVLD
      VAProfileHEVCSccMain            :    VAEntrypointVLD
      VAProfileHEVCSccMain            :    VAEntrypointEncSliceLP
      VAProfileHEVCSccMain10          :    VAEntrypointVLD
      VAProfileHEVCSccMain10          :    VAEntrypointEncSliceLP
      VAProfileHEVCSccMain444         :    VAEntrypointVLD
      VAProfileHEVCSccMain444         :    VAEntrypointEncSliceLP
      VAProfileAV1Profile0            :    VAEntrypointVLD
      VAProfileAV1Profile0            :    VAEntrypointEncSliceLP
      VAProfileHEVCSccMain444_10      :    VAEntrypointVLD
      VAProfileHEVCSccMain444_10      :    VAEntrypointEncSliceLP

-----------------

I also did a short attempt with the Cingg Appimage, but as I think has been said before: HWA want work there.

Cinelerra Infinity - built: Aug 25 2024 13:42:19

[AVHWDeviceContext @ 0x7f3a982eebc0] libva: /usr/lib64/dri/iHD_drv_video.so has no function __vaDriverInit_1_0
[AVHWDeviceContext @ 0x7f3a982eebc0] libva: /usr/lib64/dri/i965_drv_video.so has no function __vaDriverInit_1_0
[AVHWDeviceContext @ 0x7f3a982eebc0] Failed to initialise VAAPI connection: -1 (unknown libva error).
Failed to create a HW device.
 err: Inn/ut-feil
[hevc_vaapi @ 0x7f3a9859df00] A hardware frames reference is required to associate the encoding device.
FFMPEG::open_encoder err: Ugyldig argument
int FFMPEG::open_encoder(const char*, const char*):
Åpne mislyktes hevc_vaapi:/home/terje/Applications/hdv09_04_hevc_vaapi+aac.mp4
Render::render_single: Session finished.