dyne / frei0r

A large collection of free and portable video plugins
https://frei0r.dyne.org/
GNU General Public License v2.0
419 stars 91 forks source link

Is GPU support not user-friendly enough #195

Closed iMactool closed 3 weeks ago

iMactool commented 4 weeks ago

ffmpeg -y -fflags +genpts \ -i 41.mp4 \ -i 61.jpg \ -filter_complex "[1:v]scale=1080:1920[v_bg]; [0:v]scale=-2:'min(1920,ih*1080/iw)':force_original_aspect_ratio=decrease,setsar=1:1[vid]; \ [v_bg][vid]overlay=(W-w)/2:(H-h)/2[v_bgov]; \ [v_bgov]frei0r=filter_name=coloradj_RGB:filter_params=0.9|0.9|1.2[effects];[0:a]volume=0[a]" \ -map [effects] -map [a] -t 13.74 \ -c:v libx264 -pix_fmt yuv420p -b:a 192k -ar 48000 -ac 2 -video_track_timescale 90000 17ac.mp4

and

ffmpeg -y -hwaccel cuda -hwaccel_output_format cuda -fflags +genpts \ -i 41.mp4 \ -i 61.jpg \ -filter_complex "[1:v]scale=1080:1920[v_bg]; \ [0:v]scale=-2:'min(1920,ih*1080/iw)':force_original_aspect_ratio=decrease,setsar=1:1[vid]; \ [v_bg][vid]overlay=(W-w)/2:(H-h)/2[v_bgov]; \ [v_bgov]frei0r=filter_name=coloradj_RGB:filter_params=0.9|0.9|1.2[effects];[0:a]volume=0[a]" \ -map [effects] -map [a] -t 13.74 \ -c:v h264_nvenc -pix_fmt yuv420p -b:a 192k -ar 48000 -ac 2 -video_track_timescale 90000 c17ac.mp4

Why can the first rule be executed correctly, while the second rule prompts an error when executed correctly

Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:1' and the filter 'auto_scale_0' [fc#0 @ 0x556ef8cac480] Error reinitializing filters! Failed to inject frame into filter network: Function not implemented Error while filtering: Function not implemented [out#0/mp4 @ 0x556efaab0cc0] Nothing was written into output file, because at least one of its streams received no packets.

jaromil commented 4 weeks ago

@iMactool I don't know how CUDA hw accel works in ffmpeg but suspect it needs filters that are specifically compatible with that mode of execution. Frei0r filters aren't.