[Cin] 10bit VAAPI encoding test thread continued
Terje J. Hanssen
terjejhanssen at gmail.com
Thu Nov 7 20:31:51 CET 2024
Den 07.11.2024 18:01, skrev Andrew Randrianasulu:
>
>
> чт, 7 нояб. 2024 г., 19:58 Terje J. Hanssen <terjejhanssen at gmail.com>:
>
>
>
>
> Den 07.11.2024 02:29, skrev Andrew Randrianasulu:
>>
>>
>> ср, 6 нояб. 2024 г., 23:56 Terje J. Hanssen
>> <terjejhanssen at gmail.com>:
>>
>>
>>
>>
>> Den 06.11.2024 19:11, skrev Andrew Randrianasulu:
>>>
>>>
>>> ср, 6 нояб. 2024 г., 20:37 Terje J. Hanssen
>>> <terjejhanssen at gmail.com>:
>>>
>>>
>>>
>>>
>>> Den 06.11.2024 15:17, skrev Andrew Randrianasulu:
>>>>
>>>>
>>>> ср, 6 нояб. 2024 г., 17:13 Terje J. Hanssen
>>>> <terjejhanssen at gmail.com>:
>>>>
>>>>
>>>>
>>>>
>>>> Den 06.11.2024 14:41, skrev Andrew Randrianasulu:
>>>>>
>>>>>
>>>>> ср, 6 нояб. 2024 г., 15:18 Terje J. Hanssen
>>>>> <terjejhanssen at gmail.com>:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Den 05.11.2024 16:19, skrev Andrew Randrianasulu:
>>>>>>
>>>>>>
>>>>>> вт, 5 нояб. 2024 г., 18:16 Terje J. Hanssen
>>>>>> <terjejhanssen at gmail.com>:
>>>>>>
>>>>>> Continued and extracted from previous
>>>>>> threads_
>>>>>> https://lists.cinelerra-gg.org/pipermail/cin/2024-October/008967.html
>>>>>>
>>>>>> Den 27.10.2024 21:11, skrev Terje J. Hanssen:
>>>>>>> ........snip
>>>>>>>
>>>>>>> For me it looks like nothing has changed:
>>>>>>>
>>>>>>> localhost:/Cin # git am
>>>>>>> 0001-Experimental-try-10bit-vaapi-encoding.patch
>>>>>>> fatal: previous rebase directory
>>>>>>> .git/rebase-apply still exists but mbox
>>>>>>> given.
>>>>>>>
>>>>>>>
>>>>>>> remove it again?
>>>>>>>
>>>>>>>
>>>>>>> By the way,testing
>>>>>>>
>>>>>>> bin/cin
>>>>>>> compression: hevc_vaapi.mp4
>>>>>>> Pixels: vaapi (no other options)
>>>>>>> cin_hw_dev=vaapi
>>>>>>>
>>>>>>> Renders
>>>>>>>
>>>>>>> Color space : YUV
>>>>>>> Chroma subsampling : 4:2:0
>>>>>>> Bit depth : 8 bits
>>>>>>>
>>>>>>>
>>>>>>> The same with
>>>>>>> CIN_10BIT_ENC=1 bin/cin
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> yeah, it does not exist in normal cin,
>>>>>>> only after you add patch.
>>>>>>>
>>>>>>>
>>>>>>> may be just take a break from all this,
>>>>>>> I do not think we will solve this
>>>>>>> problem in few remaining days until end
>>>>>>> of October. So ... do not rush
>>>>>>>
>>>>>>> Ok for me.
>>>>>>>
>>>>>>
>>>>>> Den 04.11.2024 21:49, skrev Andrew
>>>>>> Randrianasulu:
>>>>>>>
>>>>>>> Terje, I think if you are ok with this
>>>>>>> idea we can return to testing
>>>>>>> 10bit-vaapi patch ...
>>>>>>> Hopefully in its final form it will just
>>>>>>> allow same format= string in encoding
>>>>>>> profiles as supported by per-file
>>>>>>> decoding opts files now ,,,
>>>>>>>
>>>>>> I'm not sure I understood the last line
>>>>>> yet, but I should be ready to continue
>>>>>> vaapi-testing to-morrow.
>>>>>>
>>>>>> ====================
>>>>>>
>>>>>> Yeah, here we are.
>>>>>> The problem as I understood lastly, was
>>>>>> to apply the 10bit-vaapi-encoding.patch?
>>>>>>
>>>>>>
>>>>>> yes ...
>>>>>>
>>>>>>
>>>>>> basically git's internal help messages
>>>>>> usually helpful, so try to follow them?
>>>>>
>>>>>
>>>>> I thougt we just tried to do that by recapping
>>>>> the steps before:
>>>>>
>>>>>> Sorry, but now I get
>>>>>>
>>>>>> localhost:/Cin # rm -r ../.git/rebase-apply
>>>>>>
>>>>>> localhost:/Cin # git am 10bit.diff
>>>>>> Patch format detection failed.
>>>>>>
>>>>>> I was wondering if the patch needs .patch at
>>>>>> the end like the previous patches?
>>>>>>
>>>>>> sorry, it was git diff, not git add/git
>>>>>> commit/git format-patch.
>>>>>>
>>>>>> may be apply it with just cat | patch -p1 or
>>>>>> something
>>>>>>
>>>>>> or try attached
>>>>>>
>>>>>> Hm?
>>>>>>
>>>>>> localhost:/Cin # git am
>>>>>> 0001-Experimental-try-10bit-vaapi-encoding.patch
>>>>>> Applying: Experimental: try 10bit vaapi encoding
>>>>>> error: cinelerra-5.1/cinelerra/ffmpeg.C: does
>>>>>> not match index
>>>>>> Patch failed at 0001 Experimental: try 10bit
>>>>>> vaapi encoding
>>>>>> hint: Use 'git am --show-current-patch=diff'
>>>>>> to see the failed patch
>>>>>> hint: When you have resolved this problem,
>>>>>> run "git am --continue".
>>>>>> hint: If you prefer to skip this patch, run
>>>>>> "git am --skip" instead.
>>>>>> hint: To restore the original branch and stop
>>>>>> patching, run "git am --abort".
>>>>>> hint: Disable this message with "git config
>>>>>> advice.mergeConflict false"
>>>>>>
>>>>>> you probably have previous patch applied
>>>>>>
>>>>>> try git reset --hard before git am.
>>>>>>
>>>>>> localhost:/Cin # git reset --hard
>>>>>> HEAD is now at e5a5a6da Add onevpl support to
>>>>>> build system
>>>>>>
>>>>>> The "onevpl.patch" was applied, yes.
>>>>>> Should I apply it again, before
>>>>>> "0001-Experimental-try-10bit-vaapi-encoding.patch"
>>>>>> again?
>>>>>>
>>>>>>
>>>>>>
>>>>>> no
>>>>>>
>>>>>
>>>>> So if I don't get a patch applied, I can't see
>>>>> I have something more to test (?)
>>>>>
>>>>>
>>>>> sorry, I mean you of course should try to git am
>>>>> 0001-Experimental-try-10bit-vaapi-encoding.patch
>>>>>
>>>>> again, hopefully this time it will not complain
>>>>> about index?
>>>>>
>>>>> new git log hopefully should list it after
>>>>> application as newest, topmost patch.
>>>>
>>>>
>>>> localhost:/ # cd /Cin
>>>> localhost:/Cin # ls -l /Cin
>>>> lrwxrwxrwx 1 root root 29 Oct 22 20:23 /Cin ->
>>>> /home/cinelerra/cinelerra-5.1
>>>>
>>>>
>>>> localhost:/Cin # git reset --hard
>>>> HEAD is now at e5a5a6da Add onevpl support to build
>>>> system
>>>>
>>>> localhost:/Cin # git am
>>>> 0001-Experimental-try-10bit-vaapi-encoding.patch
>>>> fatal: previous rebase directory .git/rebase-apply
>>>> still exists but mbox given.
>>>>
>>>> localhost:/Cin # git am
>>>> 0001-Experimental-try-10bit-vaapi-encoding.patch
>>>> fatal: previous rebase directory .git/rebase-apply
>>>> still exists but mbox given.
>>>>
>>>>
>>>> remove
>>>>
>>>> .git/rebase-apply
>>>
>>> Oh, I forgot and missed that step.
>>>
>>> localhost:/home # find . -name "rebase-apply"
>>> ./cinelerra/.git/rebase-apply
>>> localhost:/home # rm -r ./cinelerra/.git/rebase-apply
>>>
>>>
>>>
>>>>
>>>>
>>>> as instructed ?
>>>
>>> localhost:/Cin # git reset --hard
>>> HEAD is now at e5a5a6da Add onevpl support to build system
>>>
>>> localhost:/Cin # git am
>>> 0001-Experimental-try-10bit-vaapi-encoding.patch
>>> Applying: Experimental: try 10bit vaapi encoding
>>>
>>> Looks better ......?
>>>
>>>
>>> localhost:/Cin # git log | more
>>> commit 68eb98be2183738684f1f4da2729d1ff9989ad16
>>> Author: Andrew Randrianasulu <randrianasulu at gmail.com>
>>> <mailto:randrianasulu at gmail.com>
>>> Date: Sun Oct 27 19:43:06 2024 +0300
>>>
>>> Experimental: try 10bit vaapi encoding
>>>
>>> commit e5a5a6da907dbcd40d8612bdbfeea1a2a0ae6cc8
>>> Author: Andrew Randrianasulu <randrianasulu at gmail.com>
>>> <mailto:randrianasulu at gmail.com>
>>> Date: Fri Oct 18 10:07:33 2024 +0300
>>>
>>> Add onevpl support to build system
>>>
>>> commit 8681d13675f32e870ab3632eaf89105415fb3961
>>> Author: Andrew Randrianasulu <randrianasulu at gmail.com>
>>> <mailto:randrianasulu at gmail.com>
>>> Date: Wed Oct 23 16:36:19 2024 +0300
>>>
>>> Add DESCRIPTION
>>>
>>> commit 90138debee46e0b91adeb5d8a400158b131b0d61
>>> Author: Andrew Randrianasulu <randrianasulu at gmail.com>
>>> <mailto:randrianasulu at gmail.com>
>>> Date: Wed Oct 23 16:29:58 2024 +0300
>>>
>>> Add BUGS
>>>
>>> commit 318c884532617e32904d6f4ec05a2b73832f418e
>>> Author: Andrew Randrianasulu <randrianasulu at gmail.com>
>>> <mailto:randrianasulu at gmail.com>
>>> Date: Wed Oct 23 16:22:58 2024 +0300
>>>
>>> Update README build instructions
>>>
>>> commit 16ef7f3d7af3edb454b19288f084f86b02631c86
>>> Author: Andrew Randrianasulu <randrianasulu at gmail.com>
>>> <mailto:randrianasulu at gmail.com>
>>> Date: Fri Sep 27 13:56:15 2024 +0300
>>>
>>>
>>>
>>> so, now rebuild it ...
>>
>>
>> I have to get confirmed and possibly modified the steps below
>> to use this time.
>>
>> A couple a weeks ago when I rebuilt Cingg-with-system-FFmpeg
>> 7.1 I used the following steps:
>>
>> localhost:/Cin #
>>
>> # export CFLAGS=-I/usr/include/ffmpeg
>>
>> # ./configure --with-single-user --disable-static-build
>> --without-thirdparty --without-libdpx
>>
>> But when I now check with
>>
>> # head config.log
>>
>> This file contains any messages produced by compilers while
>> running configure, to aid debugging if configure makes a
>> mistake.
>>
>> It was created by cinelerra configure 5.1, which was
>> generated by GNU Autoconf 2.72. Invocation command line was
>>
>> $ ./configure --with-single-user --with-onevpl
>>
>> I don't know if this current config.log --with-onevpl was
>> added by the later/recent onevpl patch?
>> And should --with-onevpl be added to the long configure line
>> above for the upcoming rebuilt?
>>
>>
>> I think this time we try to make build with internal ffmpeg 7.0
>> because 7.1 introduced some changes ...
>>
>> so, please keep short ./configure line as currently in config.log
>>
>> looking at your another email: yeah, default static build does
>> not do svt-av1 by default, but we can put this aside for now ...
>>
>>
>> # make
>>
>> # make install
>>
>> # cp -R bin_use_system_ffmpeg-702/ffmpeg/video/* bin/ffmpeg/video
>>
>>
>>> and retry with newly-added env. variable set to 1 before
>>> launching bin/cin
>>
>> Syntax, please?
>>
>>
>> export CIN_10BIT_ENC bin/cin
>
> The export part on a single line didn't work for me:
>
> localhost:/Cin # export CIN_10BIT_ENC bin/cin
> -bash: export: `bin/cin': not a valid identifier
>
> Works on two separate lines:
>
> localhost:/Cin # export CIN_10BIT_ENC
> localhost:/Cin # bin/cin
> Cinelerra Infinity - built: Nov 7 2024 16:27:40
>
>
>
> sorry I mean set like this
> export CIN_10BIT_ENC=1
>
>
Now hevc_vaapi was able to render to yuv420p10le, that is 10-bit 420p,
by selecting pixels p010le.
Also rendering with pixels y210 resulted in yuv420p10le, that is not
10-bit 422p as for hevc_qsv below.
I would assume this is caused due to the incomplete hevc_vapi.mp4 preset
as shown below?
ffprobe -hide_banner cfhd01_hevc_vaapi_pix_p010le.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'cfhd01_hevc_vaapi_pix_p010le.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf61.1.100
Duration: 00:01:11.20, start: 0.000000, bitrate: 11082 kb/s
Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568),
yuv420p10le(tv, bt709/unknown/unknown, top coded first (swapped)),
1920x1080 [SAR 1:1 DAR 16:9], 11080 kb/s, 25 fps, 25 tbr, 12800 tbn
(default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
ffprobe -hide_banner cfhd01_hevc_vaapi_pix_y210.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'cfhd01_hevc_vaapi_pix_y210.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf61.1.100
Duration: 00:01:11.20, start: 0.000000, bitrate: 11082 kb/s
Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568),
yuv420p10le(tv, bt709/unknown/unknown, top coded first (swapped)),
1920x1080 [SAR 1:1 DAR 16:9], 11080 kb/s, 25 fps, 25 tbr, 12800 tbn
(default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
>
> -----
>
> No hevc_vaapi 10bit worked:
>
> localhost:/Cin/ffmpeg/video # cat hevc_vaapi.mp4
> mp4 hevc_vaapi
> # cin_hw_dev=vaapi
>
> I tested hevc_vaapi.m4 and tried to write p010 both in the pixels
> field and as format=p010 in the widget,
> but only 8bit 420p each time.
>
> -------------------------------
>
> hevc_qsv 10 bit worked with p010 and with y210
>
> localhost:/Cin/ffmpeg/video # cat hevc_qsv.mp4
> # only usable with ext. ffmpeg, another pixfmt is yuyv422
> mp4 hevc_qsv
> # profile=main
> # cin_pix_fmt=nv12
>
>
> ffprobe -hide_banner cfhd01_hevc_qsv_pix_p010le.mp4
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
> 'cfhd01_hevc_qsv_pix_p010le.mp4':
> Metadata:
> major_brand : isom
> minor_version : 512
> compatible_brands: isomiso2mp41
> encoder : Lavf61.1.100
> Duration: 00:01:11.20, start: 0.000000, bitrate: 28276 kb/s
> Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 /
> 0x31766568), yuv420p10le(tv, bt709/unknown/unknown, top coded
> first (swapped)), 1920x1080 [SAR 1:1 DAR 16:9], 28273 kb/s, 25
> fps, 25 tbr, 12800 tbn (default)
> Metadata:
> handler_name : VideoHandler
> vendor_id : [0][0][0][0]
>
>
> ffprobe -hide_banner cfhd01_hevc_qsv_pix_y210le.mp4
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
> 'cfhd01_hevc_qsv_pix_y210le.mp4':
> Metadata:
> major_brand : isom
> minor_version : 512
> compatible_brands: isomiso2mp41
> encoder : Lavf61.1.100
> Duration: 00:01:11.20, start: 0.000000, bitrate: 32074 kb/s
> Stream #0:0[0x1](und): Video: hevc (Rext) (hev1 / 0x31766568),
> yuv422p10le(tv, bt709/unknown/unknown, top coded first (swapped)),
> 1920x1080 [SAR 1:1 DAR 16:9], 32071 kb/s, 25 fps, 25 tbr, 12800
> tbn (default)
> Metadata:
> handler_name : VideoHandler
> vendor_id : [0][0][0][0]
>
>>
>>>
>>> you also can set bin/ffmpeg/encode.opts loglevel to debug,
>>> but render exactly one frame so log will be smaller.
>>
>> How to render render exactly one frame ?
>>
>>
>> In render dialog window there is selection of render range with
>> 4 choices ... 1 frame mp4/webm should be perfectly legal :)
>>
>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>>
>>>>
>>>>
>>>> "git log" where?
>>>>
>>>>
>>>>
>>>> in cinelerra-5.1 directory, or some down the hierarchy ...
>>>>
>>>> this is command, part of git suite of commands.
>>>>
>>>> displays log of commits in git repo. (for me it uses
>>>> l"less" as pager, so you can scroll around and search)
>>>>
>>>>
>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20241107/950291ae/attachment-0001.htm>
More information about the Cin
mailing list