[Cin] FFmpeg supported QSV pixel formats and profiles

Terje J. Hanssen terjejhanssen at gmail.com
Sat Oct 12 22:59:57 CEST 2024




Den 12.10.2024 22:48, skrev Terje J. Hanssen:
>
>
>
> Den 12.10.2024 21:48, skrev Andrew Randrianasulu:
>>
>>
>> сб, 12 окт. 2024 г., 22:45 Andrew Randrianasulu 
>> <randrianasulu at gmail.com>:
>>
>>
>>
>>     сб, 12 окт. 2024 г., 22:36 Terje J. Hanssen
>>     <terjejhanssen at gmail.com>:
>>
>>
>>
>>
>>         Den 12.10.2024 21:26, skrev Andrew Randrianasulu:
>>>
>>>
>>>         сб, 12 окт. 2024 г., 22:19 Terje J. Hanssen
>>>         <terjejhanssen at gmail.com>:
>>>
>>>
>>>
>>>
>>>             Den 12.10.2024 19:56, skrev Andrew Randrianasulu:
>>>>
>>>>
>>>>             сб, 12 окт. 2024 г., 20:45 Terje J. Hanssen
>>>>             <terjejhanssen at gmail.com>:
>>>>
>>>>
>>>>
>>>>
>>>>                 Den 12.10.2024 18:43, skrev Andrew Randrianasulu:
>>>>>
>>>>>
>>>>>                 сб, 12 окт. 2024 г., 16:59 Terje J. Hanssen
>>>>>                 <terjejhanssen at gmail.com>:
>>>>>
>>>>>
>>>>>
>>>>>                     Den 12.10.2024 15:09, skrev Terje J. Hanssen:
>>>>>>
>>>>>>
>>>>>>                     Den 12.10.2024 14:39, skrev Andrew Randrianasulu:
>>>>>>>
>>>>>>>
>>>>>>>                     сб, 12 окт. 2024 г., 13:23 Terje J. Hanssen
>>>>>>>                     via Cin <cin at lists.cinelerra-gg.org>:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>                         Den 12.10.2024 12:08, skrev Terje J.
>>>>>>>                         Hanssen:
>>>>>>>>                          An overview over the system FFmpeg 7.x
>>>>>>>>                         supported QSV pixel formats and profiles:
>>>>>>>>
>>>>>>>>
>>>>>>>>                         ffmpeg -hide_banner -h encoder=hevc_qsv
>>>>>>>>                         | egrep 'Supported|profile|main'
>>>>>>>>                             Supported hardware devices: qsv qsv qsv
>>>>>>>>                             Supported pixel formats: nv12
>>>>>>>>                         p010le p012le yuyv422 y210le qsv bgra
>>>>>>>>                         x2rgb10le vuyx xv30le
>>>>>>>>                         -profile <int>        E..V....... (from
>>>>>>>>                         0 to INT_MAX) (default unknown)
>>>>>>>>                         main 1 E..V.......
>>>>>>>>                         main10 2 E..V.......
>>>>>>>>                         mainsp 3 E..V.......
>>>>>>>>                         main 0 E..V.......
>>>>>>>>
>>>>>>>>
>>>>>>>>                         ffmpeg -hide_banner -h encoder=h264_qsv
>>>>>>>>                         | egrep 'Supported|profile|main'
>>>>>>>>                             Supported hardware devices: qsv qsv qsv
>>>>>>>>                             Supported pixel formats: nv12 qsv
>>>>>>>>                         -profile <int>        E..V....... (from
>>>>>>>>                         0 to INT_MAX) (default unknown)
>>>>>>>>                         main 77 E..V.......
>>>>>>>
>>>>>>>
>>>>>>>                     I think we can concentrate on av1 for now.
>>>>>>>
>>>>>>>                     does it fail if you add "-profile main" to
>>>>>>>                     ffmpeg command line for dv av1 encode?
>>>>>>>
>>>>>>>                     dv due to it being software codec, so ffmpeg
>>>>>>>                     forced to push and convert frames from
>>>>>>>                     system memory, as opposed to hdv (hw) = >
>>>>>>>                     av1 on-gpu transcode)
>>>>>>>
>>>>>>
>>>>>>                     No, it doesn't fail:
>>>>>
>>>>>                     but claims:
>>>>>                     "Please use -profile:a or -profile:v, -profile
>>>>>                     is ambiguous"
>>>>>
>>>>>
>>>>>
>>>>>                 ah, I think it mostly relevant to ffmpeg as cli
>>>>>                 application.
>>>>>
>>>>>                 Now, moving to cingg, does adding
>>>>>
>>>>>                 preset 4
>>>>>                 b 1570k
>>>>>
>>>>>                 into profile file
>>>>>
>>>>>                 fix anything?
>>>>>
>>>>>                 you can change loglevel to debug in
>>>>>                 bin/ffmpeg/encode.opts too, it will produce bugger
>>>>>                 log, hopefully with more detailed error msg.
>>>>>
>>>>>
>>>>
>>>>                 Sorry, the same error as before:
>>>>
>>>>                 localhost:/home/cinelerra/cinelerra-5.1/bin/ffmpeg
>>>>                 # cat encode.opts
>>>>                 # apply at init encode
>>>>                 #loglevel=error
>>>>                 loglevel=debug
>>>>                 threads=auto
>>>>                 side_data_only_packets=1
>>>>
>>>>                 # cd /home/cinelerra/cinelerra-5.1
>>>>
>>>>                 bin/cin
>>>>
>>>>                 Load recent: dv01_07.dv
>>>>                 Render to: /Videoklipp/QSV/dv01_07_av1_qsv.mp4
>>>>                 FFMPEG mp4
>>>>                 Video wrench: Video Preset
>>>>                 compression: av1_qsv.mp4
>>>>                 Pixels: nv12
>>>>                 preset 4
>>>>                 b 1570k
>>>>
>>>>                 Cinelerra Message log:
>>>>                 int FFMPEG::init_encoder(const char*):
>>>>                 mismatch audio/video file format:
>>>>                 /Videoklipp/QSV/dv01_07_av1_qsv.mp4
>>>>                 Cinelerra Error (widgets)
>>>>                 Couldn't open /Videoklipp/QSV/dv01 07 av1 qsv.mp4
>>>>                 Error rendering data
>>>>
>>>>                 Render::render_single: Session finished.
>>>>
>>>>
>>>>             what kind of audio compression you use?
>>>
>>>             Audio preset was set to h264.mp4
>>>             tried also h265.mp4 without any change
>>>             there is no aac available for av1_qsv
>>>>
>>>>             may be set video profile to something else, then set in
>>>>             gui both av1_qsv.mp4 and relevant audio like aac?
>>>
>>         Ok, I misunderstood when I tried something quite else below,
>>         software av1_svt.webm below.
>>         Should aac audio be available for av1_qsv.mp4, I couldn't see it?
>>
>>
>>
>>     it hides behind h264.mp4 audio profile ....
>>
>>
>>     but can you check two more things with cmd line ffmpeg?
>>
>>
>>     first change .webm part of working command line to .mp4
>>
>>     try it and report if and how it fail
>>
>>     and then to mkv
>>
>>     also report if it work or not.
>>
>>     so we will try more common (for now ) container formats for av1,
>>     may be 7.0 simply can't make AV1 IN mp4 container ....?
>>
>
> mp4 and mkv works like webm from ffmpeg command line:
>
> du -sh dv01_07_av1_qsv_pr4_bv1570k.*
> 24M    dv01_07_av1_qsv_pr4_bv1570k.mkv
> 24M    dv01_07_av1_qsv_pr4_bv1570k.mp4
> 24M    dv01_07_av1_qsv_pr4_bv1570k.webm
>
>
Verified video and audio used with ffprobe :

ffprobe -hide_banner dv01_07_av1_qsv_pr4_bv1570k.mkv
Input #0, matroska,webm, from 'dv01_07_av1_qsv_pr4_bv1570k.mkv':
   Metadata:
     TIMECODE        : 01:09:35:09
     ENCODER         : Lavf61.1.100
   Duration: 00:01:53.29, start: -0.007000, bitrate: 1724 kb/s
   Stream #0:0: Video: av1 (libdav1d) (Main), yuv420p(tv, bottom coded 
first (swapped)), 720x576, SAR 16:15 DAR 4:3, 25 fps, 25 tbr, 1k tbn
       Metadata:
         ENCODER         : Lavc61.3.100 av1_qsv
         DURATION        : 00:01:53.280000000
   Stream #0:1: Audio: opus, 48000 Hz, stereo, fltp
       Metadata:
         ENCODER         : Lavc61.3.100 libopus
         DURATION        : 00:01:53.288000000
---------

ffprobe -hide_banner dv01_07_av1_qsv_pr4_bv1570k.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'dv01_07_av1_qsv_pr4_bv1570k.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomav01iso2mp41
     encoder         : Lavf61.1.100
   Duration: 00:01:53.28, start: 0.000000, bitrate: 1768 kb/s
   Stream #0:0[0x1](und): Video: av1 (libdav1d) (Main) (av01 / 
0x31307661), yuv420p(tv, bottom coded first (swapped)), 720x576, 1634 
kb/s, SAR 16:15 DAR 4:3, 25 fps, 25 tbr, 12800 tbn (default)
       Metadata:
         handler_name    : VideoHandler
         vendor_id       : [0][0][0][0]
         encoder         : Lavc61.3.100 av1_qsv
         timecode        : 01:09:35:09
   Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 
stereo, fltp, 128 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
         vendor_id       : [0][0][0][0]
   Stream #0:2[0x3](eng): Data: none (tmcd / 0x64636D74)
       Metadata:
         handler_name    : TimeCodeHandler
         timecode        : 01:09:35:09
Unsupported codec with id 0 for input stream 2
---------

ffprobe -hide_banner dv01_07_av1_qsv_pr4_bv1570k.webm
Input #0, matroska,webm, from 'dv01_07_av1_qsv_pr4_bv1570k.webm':
   Metadata:
     TIMECODE        : 01:09:35:09
     ENCODER         : Lavf61.1.100
   Duration: 00:01:53.29, start: -0.007000, bitrate: 1724 kb/s
   Stream #0:0: Video: av1 (libdav1d) (Main), yuv420p(tv), 720x576, SAR 
16:15 DAR 4:3, 25 fps, 25 tbr, 1k tbn
       Metadata:
         ENCODER         : Lavc61.3.100 av1_qsv
         DURATION        : 00:01:53.280000000
   Stream #0:1: Audio: opus, 48000 Hz, stereo, fltp
       Metadata:
         ENCODER         : Lavc61.3.100 libopus
         DURATION        : 00:01:53.288000000









>
>>     sorry for such long road ...
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20241012/46896e90/attachment-0001.htm>


More information about the Cin mailing list