[Cin] FFmpeg supported QSV pixel formats and profiles
Terje J. Hanssen
terjejhanssen at gmail.com
Sat Oct 12 21:19:15 CEST 2024
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?
Rendered also to av1_svt.webm that worked as shown below. Then back
again to av1_qsv.mp4 from scratch, but got the same error.
Load recent: dv01_07.dv
Render to: /Videoklipp/QSV/dv01_07_av1_svt.webm
-----------
FFMPEG webm
Audio preset: opus.webm
Video Preset
compression: av1_svt.webm
Pixels: yuv420p
preset 4
b 1570k
----------
Svt[warn]: Failed to set thread priority: Invalid argument
[SWR @ 0x7f7b47452b00] Using fltp internally between filters
[libopus @ 0x7f7b473d2500] No bit rate set. Defaulting to 96000 bps.
FFStream::encode_frame: encode failed.
file: /Videoklipp/QSV/dv01_07_av1_svt.webm
err: Resource temporarily unavailable
FFStream::flush failed
:file:/Videoklipp/QSV/dv01_07_av1_svt.webm
err: Operation not permitted
FFStream::encode_frame: encode failed.
file: /Videoklipp/QSV/dv01_07_av1_svt.webm
err: Resource temporarily unavailable
FFStream::flush failed
:file:/Videoklipp/QSV/dv01_07_av1_svt.webm
err: Operation not permitted
Svt[error]: deinit called without sending EOS!
Render::render_single: Session finished.
** rendered 2832 frames in 109.469 secs, 25.870 fps
FFMPEG::open_decoder: some stream times estimated:
/Videoklipp/QSV/dv01_07_av1_svt.webm
FFMPEG::open_decoder: some stream times estimated:
/Videoklipp/QSV/dv01_07_av1_svt.webm
audio0 pad 32 -335 (367)
FFMPEG::open_decoder: some stream times estimated:
/Videoklipp/QSV/dv01_07_av1_svt.webm
FFMPEG::open_decoder: some stream times estimated:
/Videoklipp/QSV/dv01_07_av1_svt.webm
Total excess of backups: -50
Session time: 0:27:05
Cpu time: user: 0:10:21.894 sys: 0:00:10.195
>
>
>
>
>
>
>
>>
>>>
>>> ffmpeg -hide_banner -hwaccel_output_format qsv -qsv_device
>>> /dev/dri/renderD128 -i dv01_07.dv -c:v av1_qsv -preset 4
>>> -profile main -b:v 1570k dv01_07_av1_qsv_main_pr4_bv1570k.webm
>>> libva info: VA-API version 1.22.0
>>> libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
>>> libva info: Found init function __vaDriverInit_1_22
>>> libva info: va_openDriver() returns 0
>>> libva info: VA-API version 1.22.0
>>> libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
>>> libva info: Found init function __vaDriverInit_1_22
>>> libva info: va_openDriver() returns 0
>>> [dv @ 0x5606d5914c00] Estimating duration from bitrate, this
>>> may be inaccurate
>>> Input #0, dv, from 'dv01_07.dv':
>>> Metadata:
>>> timecode : 01:09:35:09
>>> Duration: 00:01:53.28, start: 0.000000, bitrate: 28800 kb/s
>>> Stream #0:0: Video: dvvideo, yuv420p, 720x576 [SAR 16:15
>>> DAR 4:3], 28800 kb/s, 60k fps, 25 tbr, 60k tbn
>>> Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536
>>> kb/s
>>> Please use -profile:a or -profile:v, -profile is ambiguous
>>> Stream mapping:
>>> Stream #0:0 -> #0:0 (dvvideo (native) -> av1 (av1_qsv))
>>> Stream #0:1 -> #0:1 (pcm_s16le (native) -> opus (libopus))
>>> Press [q] to stop, [?] for help
>>> [libopus @ 0x5606d5ac5100] No bit rate set. Defaulting to
>>> 96000 bps.
>>> Output #0, webm, to 'dv01_07_av1_qsv_main_pr4_bv1570k.webm':
>>> Metadata:
>>> timecode : 01:09:35:09
>>> encoder : Lavf61.1.100
>>> Stream #0:0: Video: av1, nv12(bottom coded first
>>> (swapped)), 720x576 [SAR 16:15 DAR 4:3], q=2-31, 1570 kb/s,
>>> 25 fps, 1k tbn
>>> Metadata:
>>> encoder : Lavc61.3.100 av1_qsv
>>> Stream #0:1: Audio: opus, 48000 Hz, stereo, s16, 96 kb/s
>>> Metadata:
>>> encoder : Lavc61.3.100 libopus
>>> [out#0/webm @ 0x5606d591cf40] video:22613KiB audio:1186KiB
>>> subtitle:0KiB other streams:0KiB global headers:0KiB muxing
>>> overhead: 0.223557%
>>> frame= 2832 fps=1764 q=-0.0 Lsize= 23852KiB time=00:01:53.24
>>> bitrate=1725.5kbits/s speed=70.5x
>>>
>>>>
>>>>
>>>>>
>>>>
>>>> hevc_qsv and h264_qsv encoders also have "high" profile:
>>>>
>>>>
>>>> ffmpeg -hide_banner -h encoder=hevc_qsv | egrep
>>>> 'Supported|profile|main|high'
>>>> 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.......
>>>> -tier <int> E..V....... Set the encoding tier (only
>>>> level >= 4 can support high tier) (from 0 to 256)
>>>> (default high)
>>>> main 0 E..V.......
>>>> high 256 E..V.......
>>>>
>>>>
>>>> ffmpeg -hide_banner -h encoder=h264_qsv | egrep
>>>> 'Supported|profile|main|high'
>>>> 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.......
>>>> high 100 E..V.......
>>>>
>>>>
>>>>
>>>>>
>>>>> ffmpeg -hide_banner -h encoder=av1_qsv | egrep
>>>>> 'Supported|profile|main'
>>>>> Supported hardware devices: qsv qsv qsv
>>>>> Supported pixel formats: nv12 p010le qsv
>>>>> -profile <int> E..V....... (from 0 to INT_MAX)
>>>>> (default unknown)
>>>>> main 1 E..V.......
>>>>>
>>>>>
>>>>> ffmpeg -hide_banner -h encoder=vp9_qsv | egrep
>>>>> 'Supported|profile|main'
>>>>> Supported hardware devices: qsv qsv qsv
>>>>> Supported pixel formats: nv12 p010le vuyx qsv xv30le
>>>>> -profile <int> E..V....... (from 0 to INT_MAX)
>>>>> (default unknown)
>>>>> profile0 1 E..V.......
>>>>> profile1 2 E..V.......
>>>>> profile2 3 E..V.......
>>>>> profile3 4 E..V.......
>>>>>
>>>>>
>>>>> ffmpeg -hide_banner -h encoder=vp9_qsv | egrep
>>>>> 'Supported|main'
>>>>> Supported hardware devices: qsv qsv qsv
>>>>> Supported pixel formats: nv12 p010le vuyx qsv xv30le
>>>>
>>>> --
>>>> Cin mailing list
>>>> Cin at lists.cinelerra-gg.org
>>>> https://lists.cinelerra-gg.org/mailman/listinfo/cin
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20241012/ea4dcbd6/attachment-0001.htm>
More information about the Cin
mailing list