[Cin] FFmpeg supported QSV pixel formats and profiles
Andrew Randrianasulu
randrianasulu at gmail.com
Sat Oct 12 21:54:31 CEST 2024
сб, 12 окт. 2024 г., 22:42 Terje J. Hanssen <terjejhanssen at gmail.com>:
>
>
>
> Den 12.10.2024 21:36, skrev Terje J. Hanssen:
>
>
>
>
> 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?
>
>
> 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
>>
>
>
> to be honest this log does not show SAME error about mismatching format,
> so it probably was only first half.
>
> can you try to cut av1_qsv.mp4 back to just first non-comment line?
>
>
> I don't understand:
> Can you explain "cut av1_qsv.mp4 back to just first non-comment line" ....?
>
>
> I came to wonder where are the equivalents to the ffmpeg command line
> "-hwaccel_output_format qsv -qsv_device /dev/dri/renderD128" defined in
> CinGG?
>
I think you can change device for vaapi, but I have not tested this code
for qsv. It seems to puck correct device by default here ... so no need to
complicate our investigation with this for now.
hwaccel_output_format *probably* only needed for hw transcoding, like mpeg2
hdv to av1.
What happen if you remove those two from dv to av1_qsv command line?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20241012/86cefd0a/attachment-0001.htm>
More information about the Cin
mailing list