<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">пн, 13 февр. 2023 г., 19:21 Andrea paz <<a href="mailto:gamberucci.andrea@gmail.com" target="_blank" rel="noreferrer">gamberucci.andrea@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I tried using your command line (with one of my mp4 files) and<br>
everything seems to work (with another mp4 I had filters error):<br>
<br>
$ ffmpeg -init_hw_device opencl=gpu -filter_hw_device gpu -i<br>
~/mixkit-worried-and-sad-woman-outdoors-8739.mp4 -vf "hwupload,<br>
boxblur_opencl,hwdownload,format=yuv420p" -f null /dev/null<br>
ffmpeg version n5.1.2 Copyright (c) 2000-2022 the FFmpeg developers<br>
built with gcc 12.2.0 (GCC)<br>
configuration: --prefix=/usr --disable-debug --disable-static<br>
--disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm<br>
--enable-lto --enable-fontconfig --enable-gmp --enable-gnutls<br>
--enable-gpl --enable-ladspa --enable-libaom --enable-libass<br>
--enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm<br>
--enable-libfreetype --enable-libfribidi --enable-libgsm<br>
--enable-libiec61883 --enable-libjack --enable-libmfx<br>
--enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb<br>
--enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus<br>
--enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr<br>
--enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1<br>
--enable-libtheora --enable-libv4l2 --enable-libvidstab<br>
--enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp<br>
--enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2<br>
--enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc<br>
--enable-opencl --enable-opengl --enable-shared --enable-version3<br>
--enable-vulkan<br>
libavutil 57. 28.100 / 57. 28.100<br>
libavcodec 59. 37.100 / 59. 37.100<br>
libavformat 59. 27.100 / 59. 27.100<br>
libavdevice 59. 7.100 / 59. 7.100<br>
libavfilter 8. 44.100 / 8. 44.100<br>
libswscale 6. 7.100 / 6. 7.100<br>
libswresample 4. 7.100 / 4. 7.100<br>
libpostproc 56. 6.100 / 56. 6.100<br>
[AVHWDeviceContext @ 0x55ca3888f340] QSV to OpenCL mapping not usable.<br>
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from<br>
'/home/paz/mixkit-worried-and-sad-woman-outdoors-8739.mp4':<br>
Metadata:<br>
major_brand : M4V<br>
minor_version : 1<br>
compatible_brands: isomavc1mp42<br>
creation_time : 2020-06-21T18:53:40.000000Z<br>
Duration: 00:00:15.00, start: 0.000000, bitrate: 24801 kb/s<br>
Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661),<br>
yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 24798<br>
kb/s, 24 fps, 24 tbr, 24k tbn (default)<br>
Metadata:<br>
creation_time : 2020-06-21T18:53:40.000000Z<br>
handler_name : ETI ISO Video Media Handler<br>
vendor_id : [0][0][0][0]<br>
encoder : Elemental H.264<br>
Stream mapping:<br>
Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))<br>
Press [q] to stop, [?] for help<br>
Output #0, null, to '/dev/null':<br>
Metadata:<br>
major_brand : M4V<br>
minor_version : 1<br>
compatible_brands: isomavc1mp42<br>
encoder : Lavf59.27.100<br>
Stream #0:0(und): Video: wrapped_avframe, yuv420p(tv, bt709,<br>
progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 24 fps,<br>
24 tbn (default)<br>
Metadata:<br>
creation_time : 2020-06-21T18:53:40.000000Z<br>
handler_name : ETI ISO Video Media Handler<br>
vendor_id : [0][0][0][0]<br>
encoder : Lavc59.37.100 wrapped_avframe<br>
frame= 360 fps=0.0 q=-0.0 Lsize=N/A time=00:00:15.00 bitrate=N/A speed=15.4x<br>
video:166kB audio:0kB subtitle:0kB other streams:0kB global<br>
headers:0kB muxing overhead: unknown<br>
<br>
<br>
Or, creating a new mkv file:<br>
<br>
$ ffmpeg -init_hw_device opencl=gpu -filter_hw_device gpu -i<br>
~/mixkit-worried-and-sad-woman-outdoors-8739.mp4 -vf "hwupload,<br>
boxblur_opencl,hwdownload,format=yuv420p" output.mkv<br>
ffmpeg version n5.1.2 Copyright (c) 2000-2022 the FFmpeg developers<br>
built with gcc 12.2.0 (GCC)<br>
configuration: --prefix=/usr --disable-debug --disable-static<br>
--disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm<br>
--enable-lto --enable-fontconfig --enable-gmp --enable-gnutls<br>
--enable-gpl --enable-ladspa --enable-libaom --enable-libass<br>
--enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm<br>
--enable-libfreetype --enable-libfribidi --enable-libgsm<br>
--enable-libiec61883 --enable-libjack --enable-libmfx<br>
--enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb<br>
--enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus<br>
--enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr<br>
--enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1<br>
--enable-libtheora --enable-libv4l2 --enable-libvidstab<br>
--enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp<br>
--enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2<br>
--enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc<br>
--enable-opencl --enable-opengl --enable-shared --enable-version3<br>
--enable-vulkan<br>
libavutil 57. 28.100 / 57. 28.100<br>
libavcodec 59. 37.100 / 59. 37.100<br>
libavformat 59. 27.100 / 59. 27.100<br>
libavdevice 59. 7.100 / 59. 7.100<br>
libavfilter 8. 44.100 / 8. 44.100<br>
libswscale 6. 7.100 / 6. 7.100<br>
libswresample 4. 7.100 / 4. 7.100<br>
libpostproc 56. 6.100 / 56. 6.100<br>
[AVHWDeviceContext @ 0x55ad13a57300] QSV to OpenCL mapping not usable.<br>
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from<br>
'/home/paz/mixkit-worried-and-sad-woman-outdoors-8739.mp4':<br>
Metadata:<br>
major_brand : M4V<br>
minor_version : 1<br>
compatible_brands: isomavc1mp42<br>
creation_time : 2020-06-21T18:53:40.000000Z<br>
Duration: 00:00:15.00, start: 0.000000, bitrate: 24801 kb/s<br>
Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661),<br>
yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 24798<br>
kb/s, 24 fps, 24 tbr, 24k tbn (default)<br>
Metadata:<br>
creation_time : 2020-06-21T18:53:40.000000Z<br>
handler_name : ETI ISO Video Media Handler<br>
vendor_id : [0][0][0][0]<br>
encoder : Elemental H.264<br>
Stream mapping:<br>
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))<br>
Press [q] to stop, [?] for help<br>
[libx264 @ 0x55ad13c1a140] using SAR=1/1<br>
[libx264 @ 0x55ad13c1a140] using cpu capabilities: MMX2 SSE2Fast SSSE3<br>
SSE4.2 AVX FMA3 BMI2 AVX2<br>
[libx264 @ 0x55ad13c1a140] profile High, level 4.0, 4:2:0, 8-bit<br>
[libx264 @ 0x55ad13c1a140] 264 - core 164 r3095 baee400 - H.264/MPEG-4<br>
AVC codec - Copyleft 2003-2022 - <a href="http://www.videolan.org/x264.html" rel="noreferrer noreferrer noreferrer" target="_blank">http://www.videolan.org/x264.html</a> -<br>
options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7<br>
psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1<br>
8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2<br>
threads=24 lookahead_threads=4 sliced_threads=0 nr=0 decimate=1<br>
interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2<br>
b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250<br>
keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf<br>
mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40<br>
aq=1:1.00<br>
Output #0, matroska, to 'output.mkv':<br>
Metadata:<br>
major_brand : M4V<br>
minor_version : 1<br>
compatible_brands: isomavc1mp42<br>
encoder : Lavf59.27.100<br>
Stream #0:0(und): Video: h264 (H264 / 0x34363248), yuv420p(tv,<br>
bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 24 fps, 1k<br>
tbn (default)<br>
Metadata:<br>
creation_time : 2020-06-21T18:53:40.000000Z<br>
handler_name : ETI ISO Video Media Handler<br>
vendor_id : [0][0][0][0]<br>
encoder : Lavc59.37.100 libx264<br>
Side data:<br>
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A<br>
frame= 360 fps= 98 q=-1.0 Lsize= 3012kB time=00:00:14.87<br>
bitrate=1658.5kbits/s speed=4.04x<br>
video:3008kB audio:0kB subtitle:0kB other streams:0kB global<br>
headers:0kB muxing overhead: 0.111606%<br>
[libx264 @ 0x55ad13c1a140] frame I:2 Avg QP:18.75 size: 32568<br>
[libx264 @ 0x55ad13c1a140] frame P:90 Avg QP:20.16 size: 16107<br>
[libx264 @ 0x55ad13c1a140] frame B:268 Avg QP:21.18 size: 5840<br>
[libx264 @ 0x55ad13c1a140] consecutive B-frames: 0.6% 0.6% 0.0% 98.9%<br>
[libx264 @ 0x55ad13c1a140] mb I I16..4: 23.2% 72.9% 3.9%<br>
[libx264 @ 0x55ad13c1a140] mb P I16..4: 8.9% 15.5% 0.1% P16..4:<br>
38.1% 4.7% 1.4% 0.0% 0.0% skip:31.4%<br>
[libx264 @ 0x55ad13c1a140] mb B I16..4: 0.7% 0.8% 0.0% B16..8:<br>
31.8% 1.6% 0.1% direct: 1.2% skip:63.9% L0:46.6% L1:52.3% BI:<br>
1.0%<br>
[libx264 @ 0x55ad13c1a140] 8x8 transform intra:62.4% inter:98.3%<br>
[libx264 @ 0x55ad13c1a140] coded y,uvDC,uvAC intra: 17.8% 35.6% 1.7%<br>
inter: 4.5% 9.6% 0.0%<br>
[libx264 @ 0x55ad13c1a140] i16 v,h,dc,p: 27% 27% 10% 36%<br>
[libx264 @ 0x55ad13c1a140] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 16% 43%<br>
2% 4% 5% 4% 3% 2%<br>
[libx264 @ 0x55ad13c1a140] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 20% 16%<br>
4% 11% 7% 5% 3% 1%<br>
[libx264 @ 0x55ad13c1a140] i8c dc,h,v,p: 65% 16% 16% 3%<br>
[libx264 @ 0x55ad13c1a140] Weighted P-Frames: Y:0.0% UV:0.0%<br>
[libx264 @ 0x55ad13c1a140] ref P L0: 68.4% 4.6% 19.6% 7.4%<br>
[libx264 @ 0x55ad13c1a140] ref B L0: 88.4% 9.5% 2.1%<br>
[libx264 @ 0x55ad13c1a140] ref B L1: 95.1% 4.9%<br>
[libx264 @ 0x55ad13c1a140] kb/s:1642.56<br>
<br>
<br>
The resulting video shows the blur, so it is fine.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Ah, cool! Can you post clinfo output too?</div><div dir="auto"><br></div><div dir="auto"><a href="http://underpop.online.fr/f/ffmpeg/help/tonemap_005fopencl.htm.gz">http://underpop.online.fr/f/ffmpeg/help/tonemap_005fopencl.htm.gz</a><br></div><div dir="auto"><br></div><div dir="auto">I tried to get more complex tonemapping example but it was erroring out due to syntax errors :(</div><div dir="auto"><br></div><div dir="auto">If you get this one to work it will be awesome! And double-awesome if you can put such long hw filter string in opts file for cinelerra-gg to pick. It might error out due to missing filtering device init but I hope this can be relatively easily fixed by even me.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>