Re: [FFmpeg-user] OVERLAY_CUDA and PGS Subtitle burn
On Tue, 23 Nov 2021 at 13:46, Dennis Mungai wrote: > On Thu, 1 Oct 2020 at 03:57, Panda Sing Cool > wrote: > >> Hi Community, >> >> Updated to the Cuda 11.1 (latest) and NVD drivers 455.23.04 (latest >> beta), >> FFmpeg Git and nv-codec-headers from today. Same result. no subtitles. >> So i will take a break on this option, maybe some bugs somewhere , which >> will have to wait until a dev has a look on this :) >> >> Is it something I can highlight on the Dev FFmpeg list, or the dev list is >> only reserved/exclusive for the dev ? >> >> So, i'm using now the traditional overlay filter, which give me the result >> i'm looking for: >> >> /ffmpeg -y -init_hw_device cuda=cuda -hwaccel cuda -i input.mkv >> -filter_complex >> "[0:v][0:s]overlay[vid];[vid]hwupload,scale_cuda=w=-1:h=720[vid]" -map >> "[vid]" -c:v h264_nvenc test.mkv >> >> i'm running around 400 fps (x16) on this command on my gear. Not sure if >> this is considered slow or fast, but for my own requirements it's nice >> already. >> >> Question related to this part only: >>-filter_complex >> "[0:v][0:s]overlay[vid];[vid]hwupload,scale_cuda=w=-1:h=720[vid]" : >> >> - based on this simple command, any tips/tricks to increase the FPS or >> it's considered already optimal. >> >> >> Many thanks. >> >> >> >> On Wed, 23 Sep 2020 at 08:08, Panda Sing Cool >> wrote: >> >> > Hi Dennis, >> > >> > thanks for the link. I have rebuild ffmpeg with all the latest version >> of >> > any source i can find, update to the latest cuda 11 patch 3 and NV >> > headers... >> > Also included the latest vulkan sdk and support for ffmpeg. >> > >> > overlay_cuda and overlay_opencl, same issue: video appear but not >> subtitle. >> > overlay_vulkan -> direct crash dump from ffmpeg. >> > >> > :( >> > >> > Any change from your side ? >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > On Fri, 18 Sep 2020 at 22:46, Dennis Mungai wrote: >> > >> >> On Thu, 17 Sep 2020 at 03:29, Panda Sing Cool > > >> >> wrote: >> >> >> >> > Hi, >> >> > >> >> > Changed the input format: >> >> > Video -> yuv420p >> >> > Sub -> yuv*a*420p (to include Alpha Channel) >> >> > >> >> > Now the video is showing, but still no subtitles. >> >> > Still get the error message: >> >> > *Error while add the frame to buffer source(Internal bug, should not >> >> have >> >> > happened).* >> >> > >> >> > >> >> > ./ffmpeg -threads 1 -loglevel info -nostdin -y -fflags >> +genpts-fastseek >> >> \ >> >> >-ss 00:00:00 -t 00:00:15 \ >> >> >-extra_hw_frames 3 -vsync 0 -async 0 -filter_threads 1 >> >> > -filter_complex_threads 1 \ >> >> >-init_hw_device cuda=cuda -hwaccel cuda -filter_hw_device cuda >> >> > -hwaccel_output_format cuda \ >> >> >-i input.mkv \ >> >> > >> >> > >> >> > >> >> > >> >> > * -filter_complex \ >> >> > "[0:v]scale_npp=w=-1:h=720:interp_algo=lanczos:format=yuv420p[vid]; \ >> >> >[0:s]format=yuva420p,hwupload[sub]; \ >> >> [vid][sub]overlay_cuda[v]" >> >> > \*-map "[v]" -map 0:a \ >> >> >-force_key_frames "expr:gte(t,n_forced*5)" \ >> >> >-c:v h264_nvenc -preset:v slow -profile:v high -level:v 51 \ >> >> >-rc:v cbr_hq -rc-lookahead:v 32 -refs:v 16 -cq:v 16 -bf:v 3 -b:v >> >> 2000K >> >> > -minrate:v 2000K -maxrate:v 2000k -bufsize:v 8M -coder:v cabac >> >> > -b_ref_mode:v middle \ >> >> >-c:a libfdk_aac -ac 2 -ar 48000 -b:a 128k \ >> >> >output.mkv >> >> > >> >> > >> >> > >> >> > >> >> > On Thu, 17 Sep 2020 at 07:08, Panda Sing Cool < >> pandacools...@gmail.com> >> >> > wrote: >> >> > >> >> > > Hi everyone, >> >> > > >> >> > > i'm trying to use the OVERLAY_CUDA function to burn PGS titles >> over a >> >> > > video and the result is not working. >> >> > > i might misunderstand the usage of this function, so some help is >> >> > welcome. >> >> > > >> >> > > The result of this command is a black screen with audio, using >> >> 'standard' >> >> > > overlay filter is working fine, but slow ... >> >> > > >> >> > > Notice this message at the end of the log file (ffmpeg version >> >> > > N-99194-g142ae27b1d ( compiled myself from git) ): >> >> > > *Error while add the frame to buffer source(Internal bug, should >> not >> >> have >> >> > > happened).* >> >> > > >> >> > > Thanks for any help. >> >> > > >> >> > > >> >> > > >> >> > >> >> >> *** >> >> > > >> >> > >./ffmpeg -threads 1 -loglevel info -nostdin -y -fflags >> >> > +genpts-fastseek >> >> > > \ >> >> > >-ss 00:00:00 -t 00:01:00 \ >> >> > >-extra_hw_frames 3 -vsync 0 -async 0 -filter_threads 1 >> >> > > -filter_complex_threads 1 \ >> >> > >-init_hw_device cuda=cuda -hwaccel cuda -filter_hw_device cuda >> >> > > -hwaccel_output_format cuda \ >> >> > >-i input.mkv \ >> >> > >-filter_complex \ >> >> > > >> >> > > >> >> > > * >> "[0:v]scale_npp=w=-1:h=720:interp_algo=lanczos:format=nv12[vid]; \ >> >> > > [0:s]format=nv12,hwupload_cuda[sub]; \ >> [vid][sub]overlay_cuda[v]"
Re: [FFmpeg-user] OVERLAY_CUDA and PGS Subtitle burn
On Thu, 1 Oct 2020 at 03:57, Panda Sing Cool wrote: > Hi Community, > > Updated to the Cuda 11.1 (latest) and NVD drivers 455.23.04 (latest beta), > FFmpeg Git and nv-codec-headers from today. Same result. no subtitles. > So i will take a break on this option, maybe some bugs somewhere , which > will have to wait until a dev has a look on this :) > > Is it something I can highlight on the Dev FFmpeg list, or the dev list is > only reserved/exclusive for the dev ? > > So, i'm using now the traditional overlay filter, which give me the result > i'm looking for: > > /ffmpeg -y -init_hw_device cuda=cuda -hwaccel cuda -i input.mkv > -filter_complex > "[0:v][0:s]overlay[vid];[vid]hwupload,scale_cuda=w=-1:h=720[vid]" -map > "[vid]" -c:v h264_nvenc test.mkv > > i'm running around 400 fps (x16) on this command on my gear. Not sure if > this is considered slow or fast, but for my own requirements it's nice > already. > > Question related to this part only: >-filter_complex > "[0:v][0:s]overlay[vid];[vid]hwupload,scale_cuda=w=-1:h=720[vid]" : > > - based on this simple command, any tips/tricks to increase the FPS or > it's considered already optimal. > > > Many thanks. > > > > On Wed, 23 Sep 2020 at 08:08, Panda Sing Cool > wrote: > > > Hi Dennis, > > > > thanks for the link. I have rebuild ffmpeg with all the latest version of > > any source i can find, update to the latest cuda 11 patch 3 and NV > > headers... > > Also included the latest vulkan sdk and support for ffmpeg. > > > > overlay_cuda and overlay_opencl, same issue: video appear but not > subtitle. > > overlay_vulkan -> direct crash dump from ffmpeg. > > > > :( > > > > Any change from your side ? > > > > > > > > > > > > > > > > > > > > > > On Fri, 18 Sep 2020 at 22:46, Dennis Mungai wrote: > > > >> On Thu, 17 Sep 2020 at 03:29, Panda Sing Cool > >> wrote: > >> > >> > Hi, > >> > > >> > Changed the input format: > >> > Video -> yuv420p > >> > Sub -> yuv*a*420p (to include Alpha Channel) > >> > > >> > Now the video is showing, but still no subtitles. > >> > Still get the error message: > >> > *Error while add the frame to buffer source(Internal bug, should not > >> have > >> > happened).* > >> > > >> > > >> > ./ffmpeg -threads 1 -loglevel info -nostdin -y -fflags > +genpts-fastseek > >> \ > >> >-ss 00:00:00 -t 00:00:15 \ > >> >-extra_hw_frames 3 -vsync 0 -async 0 -filter_threads 1 > >> > -filter_complex_threads 1 \ > >> >-init_hw_device cuda=cuda -hwaccel cuda -filter_hw_device cuda > >> > -hwaccel_output_format cuda \ > >> >-i input.mkv \ > >> > > >> > > >> > > >> > > >> > * -filter_complex \ > >> > "[0:v]scale_npp=w=-1:h=720:interp_algo=lanczos:format=yuv420p[vid]; \ > >> >[0:s]format=yuva420p,hwupload[sub]; \ > >> [vid][sub]overlay_cuda[v]" > >> > \*-map "[v]" -map 0:a \ > >> >-force_key_frames "expr:gte(t,n_forced*5)" \ > >> >-c:v h264_nvenc -preset:v slow -profile:v high -level:v 51 \ > >> >-rc:v cbr_hq -rc-lookahead:v 32 -refs:v 16 -cq:v 16 -bf:v 3 -b:v > >> 2000K > >> > -minrate:v 2000K -maxrate:v 2000k -bufsize:v 8M -coder:v cabac > >> > -b_ref_mode:v middle \ > >> >-c:a libfdk_aac -ac 2 -ar 48000 -b:a 128k \ > >> >output.mkv > >> > > >> > > >> > > >> > > >> > On Thu, 17 Sep 2020 at 07:08, Panda Sing Cool < > pandacools...@gmail.com> > >> > wrote: > >> > > >> > > Hi everyone, > >> > > > >> > > i'm trying to use the OVERLAY_CUDA function to burn PGS titles over > a > >> > > video and the result is not working. > >> > > i might misunderstand the usage of this function, so some help is > >> > welcome. > >> > > > >> > > The result of this command is a black screen with audio, using > >> 'standard' > >> > > overlay filter is working fine, but slow ... > >> > > > >> > > Notice this message at the end of the log file (ffmpeg version > >> > > N-99194-g142ae27b1d ( compiled myself from git) ): > >> > > *Error while add the frame to buffer source(Internal bug, should not > >> have > >> > > happened).* > >> > > > >> > > Thanks for any help. > >> > > > >> > > > >> > > > >> > > >> > *** > >> > > > >> > >./ffmpeg -threads 1 -loglevel info -nostdin -y -fflags > >> > +genpts-fastseek > >> > > \ > >> > >-ss 00:00:00 -t 00:01:00 \ > >> > >-extra_hw_frames 3 -vsync 0 -async 0 -filter_threads 1 > >> > > -filter_complex_threads 1 \ > >> > >-init_hw_device cuda=cuda -hwaccel cuda -filter_hw_device cuda > >> > > -hwaccel_output_format cuda \ > >> > >-i input.mkv \ > >> > >-filter_complex \ > >> > > > >> > > > >> > > * > "[0:v]scale_npp=w=-1:h=720:interp_algo=lanczos:format=nv12[vid]; \ > >> > > [0:s]format=nv12,hwupload_cuda[sub]; \[vid][sub]overlay_cuda[v]" > >> \* > >> > > -map "[v]" -map 0:a \ > >> > >-force_key_frames "expr:gte(t,n_forced*5)" \ > >> > >-c:v h264_nvenc -preset:v slow -profile:v high -level:v 51 \ > >> > >-rc:v cbr_hq -rc-lookahead:v 32 -refs:
Re: [FFmpeg-user] OVERLAY_CUDA and PGS Subtitle burn
Hi Community, Updated to the Cuda 11.1 (latest) and NVD drivers 455.23.04 (latest beta), FFmpeg Git and nv-codec-headers from today. Same result. no subtitles. So i will take a break on this option, maybe some bugs somewhere , which will have to wait until a dev has a look on this :) Is it something I can highlight on the Dev FFmpeg list, or the dev list is only reserved/exclusive for the dev ? So, i'm using now the traditional overlay filter, which give me the result i'm looking for: /ffmpeg -y -init_hw_device cuda=cuda -hwaccel cuda -i input.mkv -filter_complex "[0:v][0:s]overlay[vid];[vid]hwupload,scale_cuda=w=-1:h=720[vid]" -map "[vid]" -c:v h264_nvenc test.mkv i'm running around 400 fps (x16) on this command on my gear. Not sure if this is considered slow or fast, but for my own requirements it's nice already. Question related to this part only: -filter_complex "[0:v][0:s]overlay[vid];[vid]hwupload,scale_cuda=w=-1:h=720[vid]" : - based on this simple command, any tips/tricks to increase the FPS or it's considered already optimal. Many thanks. On Wed, 23 Sep 2020 at 08:08, Panda Sing Cool wrote: > Hi Dennis, > > thanks for the link. I have rebuild ffmpeg with all the latest version of > any source i can find, update to the latest cuda 11 patch 3 and NV > headers... > Also included the latest vulkan sdk and support for ffmpeg. > > overlay_cuda and overlay_opencl, same issue: video appear but not subtitle. > overlay_vulkan -> direct crash dump from ffmpeg. > > :( > > Any change from your side ? > > > > > > > > > > > On Fri, 18 Sep 2020 at 22:46, Dennis Mungai wrote: > >> On Thu, 17 Sep 2020 at 03:29, Panda Sing Cool >> wrote: >> >> > Hi, >> > >> > Changed the input format: >> > Video -> yuv420p >> > Sub -> yuv*a*420p (to include Alpha Channel) >> > >> > Now the video is showing, but still no subtitles. >> > Still get the error message: >> > *Error while add the frame to buffer source(Internal bug, should not >> have >> > happened).* >> > >> > >> > ./ffmpeg -threads 1 -loglevel info -nostdin -y -fflags +genpts-fastseek >> \ >> >-ss 00:00:00 -t 00:00:15 \ >> >-extra_hw_frames 3 -vsync 0 -async 0 -filter_threads 1 >> > -filter_complex_threads 1 \ >> >-init_hw_device cuda=cuda -hwaccel cuda -filter_hw_device cuda >> > -hwaccel_output_format cuda \ >> >-i input.mkv \ >> > >> > >> > >> > >> > * -filter_complex \ >> > "[0:v]scale_npp=w=-1:h=720:interp_algo=lanczos:format=yuv420p[vid]; \ >> >[0:s]format=yuva420p,hwupload[sub]; \ >> [vid][sub]overlay_cuda[v]" >> > \*-map "[v]" -map 0:a \ >> >-force_key_frames "expr:gte(t,n_forced*5)" \ >> >-c:v h264_nvenc -preset:v slow -profile:v high -level:v 51 \ >> >-rc:v cbr_hq -rc-lookahead:v 32 -refs:v 16 -cq:v 16 -bf:v 3 -b:v >> 2000K >> > -minrate:v 2000K -maxrate:v 2000k -bufsize:v 8M -coder:v cabac >> > -b_ref_mode:v middle \ >> >-c:a libfdk_aac -ac 2 -ar 48000 -b:a 128k \ >> >output.mkv >> > >> > >> > >> > >> > On Thu, 17 Sep 2020 at 07:08, Panda Sing Cool >> > wrote: >> > >> > > Hi everyone, >> > > >> > > i'm trying to use the OVERLAY_CUDA function to burn PGS titles over a >> > > video and the result is not working. >> > > i might misunderstand the usage of this function, so some help is >> > welcome. >> > > >> > > The result of this command is a black screen with audio, using >> 'standard' >> > > overlay filter is working fine, but slow ... >> > > >> > > Notice this message at the end of the log file (ffmpeg version >> > > N-99194-g142ae27b1d ( compiled myself from git) ): >> > > *Error while add the frame to buffer source(Internal bug, should not >> have >> > > happened).* >> > > >> > > Thanks for any help. >> > > >> > > >> > > >> > >> *** >> > > >> > >./ffmpeg -threads 1 -loglevel info -nostdin -y -fflags >> > +genpts-fastseek >> > > \ >> > >-ss 00:00:00 -t 00:01:00 \ >> > >-extra_hw_frames 3 -vsync 0 -async 0 -filter_threads 1 >> > > -filter_complex_threads 1 \ >> > >-init_hw_device cuda=cuda -hwaccel cuda -filter_hw_device cuda >> > > -hwaccel_output_format cuda \ >> > >-i input.mkv \ >> > >-filter_complex \ >> > > >> > > >> > > * "[0:v]scale_npp=w=-1:h=720:interp_algo=lanczos:format=nv12[vid]; \ >> > > [0:s]format=nv12,hwupload_cuda[sub]; \[vid][sub]overlay_cuda[v]" >> \* >> > > -map "[v]" -map 0:a \ >> > >-force_key_frames "expr:gte(t,n_forced*5)" \ >> > >-c:v h264_nvenc -preset:v slow -profile:v high -level:v 51 \ >> > >-rc:v cbr_hq -rc-lookahead:v 32 -refs:v 16 -cq:v 16 -bf:v 3 -b:v >> 2000K >> > > -minrate:v 2000K -maxrate:v 2000k -bufsize:v 8M -coder:v cabac >> > > -b_ref_mode:v middle \ >> > >-c:a libfdk_aac -ac 2 -ar 48000 -b:a 128k \ >> > >output.mkv >> > > >> > > >> > > * LOG >> > > >> > > f*fmpeg version N-99194-g142ae27b1d *Copyright (c) 2000-2020 the >> FFmpeg >> > > developers >> > > built with gcc 10 (GC
Re: [FFmpeg-user] OVERLAY_CUDA and PGS Subtitle burn
Hi Dennis, thanks for the link. I have rebuild ffmpeg with all the latest version of any source i can find, update to the latest cuda 11 patch 3 and NV headers... Also included the latest vulkan sdk and support for ffmpeg. overlay_cuda and overlay_opencl, same issue: video appear but not subtitle. overlay_vulkan -> direct crash dump from ffmpeg. :( Any change from your side ? On Fri, 18 Sep 2020 at 22:46, Dennis Mungai wrote: > On Thu, 17 Sep 2020 at 03:29, Panda Sing Cool > wrote: > > > Hi, > > > > Changed the input format: > > Video -> yuv420p > > Sub -> yuv*a*420p (to include Alpha Channel) > > > > Now the video is showing, but still no subtitles. > > Still get the error message: > > *Error while add the frame to buffer source(Internal bug, should not have > > happened).* > > > > > > ./ffmpeg -threads 1 -loglevel info -nostdin -y -fflags +genpts-fastseek \ > >-ss 00:00:00 -t 00:00:15 \ > >-extra_hw_frames 3 -vsync 0 -async 0 -filter_threads 1 > > -filter_complex_threads 1 \ > >-init_hw_device cuda=cuda -hwaccel cuda -filter_hw_device cuda > > -hwaccel_output_format cuda \ > >-i input.mkv \ > > > > > > > > > > * -filter_complex \ > > "[0:v]scale_npp=w=-1:h=720:interp_algo=lanczos:format=yuv420p[vid]; \ > >[0:s]format=yuva420p,hwupload[sub]; \ > [vid][sub]overlay_cuda[v]" > > \*-map "[v]" -map 0:a \ > >-force_key_frames "expr:gte(t,n_forced*5)" \ > >-c:v h264_nvenc -preset:v slow -profile:v high -level:v 51 \ > >-rc:v cbr_hq -rc-lookahead:v 32 -refs:v 16 -cq:v 16 -bf:v 3 -b:v 2000K > > -minrate:v 2000K -maxrate:v 2000k -bufsize:v 8M -coder:v cabac > > -b_ref_mode:v middle \ > >-c:a libfdk_aac -ac 2 -ar 48000 -b:a 128k \ > >output.mkv > > > > > > > > > > On Thu, 17 Sep 2020 at 07:08, Panda Sing Cool > > wrote: > > > > > Hi everyone, > > > > > > i'm trying to use the OVERLAY_CUDA function to burn PGS titles over a > > > video and the result is not working. > > > i might misunderstand the usage of this function, so some help is > > welcome. > > > > > > The result of this command is a black screen with audio, using > 'standard' > > > overlay filter is working fine, but slow ... > > > > > > Notice this message at the end of the log file (ffmpeg version > > > N-99194-g142ae27b1d ( compiled myself from git) ): > > > *Error while add the frame to buffer source(Internal bug, should not > have > > > happened).* > > > > > > Thanks for any help. > > > > > > > > > > > > *** > > > > > >./ffmpeg -threads 1 -loglevel info -nostdin -y -fflags > > +genpts-fastseek > > > \ > > >-ss 00:00:00 -t 00:01:00 \ > > >-extra_hw_frames 3 -vsync 0 -async 0 -filter_threads 1 > > > -filter_complex_threads 1 \ > > >-init_hw_device cuda=cuda -hwaccel cuda -filter_hw_device cuda > > > -hwaccel_output_format cuda \ > > >-i input.mkv \ > > >-filter_complex \ > > > > > > > > > * "[0:v]scale_npp=w=-1:h=720:interp_algo=lanczos:format=nv12[vid]; \ > > > [0:s]format=nv12,hwupload_cuda[sub]; \[vid][sub]overlay_cuda[v]" \* > > > -map "[v]" -map 0:a \ > > >-force_key_frames "expr:gte(t,n_forced*5)" \ > > >-c:v h264_nvenc -preset:v slow -profile:v high -level:v 51 \ > > >-rc:v cbr_hq -rc-lookahead:v 32 -refs:v 16 -cq:v 16 -bf:v 3 -b:v > 2000K > > > -minrate:v 2000K -maxrate:v 2000k -bufsize:v 8M -coder:v cabac > > > -b_ref_mode:v middle \ > > >-c:a libfdk_aac -ac 2 -ar 48000 -b:a 128k \ > > >output.mkv > > > > > > > > > * LOG > > > > > > f*fmpeg version N-99194-g142ae27b1d *Copyright (c) 2000-2020 the FFmpeg > > > developers > > > built with gcc 10 (GCC) > > > configuration: --prefix=/home/users/work/ffmpeg_build > > > --pkg-config-flags=--static --extra-libs=-lpthread --extra-libs=-lm > > > --bindir=/home/users/work/ffmpeg_build/bin --enable-gpl > > --enable-libfdk_aac > > > --enable-libfreetype --enable-libmp3lame --enable-libopus > --enable-libvpx > > > --enable-libx264 --enable-libx265 --enable-vulkan --enable-nonfree > > > --enable-libnpp --enable-nvenc --enable-cuvid --enable-libass > > > --enable-libfontconfig --enable-libfreetype --enable-libfribidi > > > --enable-cuda > > > libavutil 56. 59.100 / 56. 59.100 > > > libavcodec 58.106.100 / 58.106.100 > > > libavformat58. 56.100 / 58. 56.100 > > > libavdevice58. 11.102 / 58. 11.102 > > > libavfilter 7. 87.100 / 7. 87.100 > > > libswscale 5. 8.100 / 5. 8.100 > > > libswresample 3. 8.100 / 3. 8.100 > > > libpostproc55. 8.100 / 55. 8.100 > > > Input #0, matroska,webm, from 'input.mkv': > > > Metadata: > > > encoder : libebml v1.3.10 + libmatroska v1.5.2 > > > creation_time : 2020-08-13T06:58:46.00Z > > > Duration: 00:57:53.06, start: 0.00, bitrate: 12993 kb/s > > > Chapter #0:0: start 0.00, end 508.424583 > > > Metadata: > > > title : Chapter 01 > >
Re: [FFmpeg-user] OVERLAY_CUDA and PGS Subtitle burn
On Thu, 17 Sep 2020 at 03:29, Panda Sing Cool wrote: > Hi, > > Changed the input format: > Video -> yuv420p > Sub -> yuv*a*420p (to include Alpha Channel) > > Now the video is showing, but still no subtitles. > Still get the error message: > *Error while add the frame to buffer source(Internal bug, should not have > happened).* > > > ./ffmpeg -threads 1 -loglevel info -nostdin -y -fflags +genpts-fastseek \ >-ss 00:00:00 -t 00:00:15 \ >-extra_hw_frames 3 -vsync 0 -async 0 -filter_threads 1 > -filter_complex_threads 1 \ >-init_hw_device cuda=cuda -hwaccel cuda -filter_hw_device cuda > -hwaccel_output_format cuda \ >-i input.mkv \ > > > > > * -filter_complex \ > "[0:v]scale_npp=w=-1:h=720:interp_algo=lanczos:format=yuv420p[vid]; \ >[0:s]format=yuva420p,hwupload[sub]; \ [vid][sub]overlay_cuda[v]" > \*-map "[v]" -map 0:a \ >-force_key_frames "expr:gte(t,n_forced*5)" \ >-c:v h264_nvenc -preset:v slow -profile:v high -level:v 51 \ >-rc:v cbr_hq -rc-lookahead:v 32 -refs:v 16 -cq:v 16 -bf:v 3 -b:v 2000K > -minrate:v 2000K -maxrate:v 2000k -bufsize:v 8M -coder:v cabac > -b_ref_mode:v middle \ >-c:a libfdk_aac -ac 2 -ar 48000 -b:a 128k \ >output.mkv > > > > > On Thu, 17 Sep 2020 at 07:08, Panda Sing Cool > wrote: > > > Hi everyone, > > > > i'm trying to use the OVERLAY_CUDA function to burn PGS titles over a > > video and the result is not working. > > i might misunderstand the usage of this function, so some help is > welcome. > > > > The result of this command is a black screen with audio, using 'standard' > > overlay filter is working fine, but slow ... > > > > Notice this message at the end of the log file (ffmpeg version > > N-99194-g142ae27b1d ( compiled myself from git) ): > > *Error while add the frame to buffer source(Internal bug, should not have > > happened).* > > > > Thanks for any help. > > > > > > > *** > > > >./ffmpeg -threads 1 -loglevel info -nostdin -y -fflags > +genpts-fastseek > > \ > >-ss 00:00:00 -t 00:01:00 \ > >-extra_hw_frames 3 -vsync 0 -async 0 -filter_threads 1 > > -filter_complex_threads 1 \ > >-init_hw_device cuda=cuda -hwaccel cuda -filter_hw_device cuda > > -hwaccel_output_format cuda \ > >-i input.mkv \ > >-filter_complex \ > > > > > > * "[0:v]scale_npp=w=-1:h=720:interp_algo=lanczos:format=nv12[vid]; \ > > [0:s]format=nv12,hwupload_cuda[sub]; \[vid][sub]overlay_cuda[v]" \* > > -map "[v]" -map 0:a \ > >-force_key_frames "expr:gte(t,n_forced*5)" \ > >-c:v h264_nvenc -preset:v slow -profile:v high -level:v 51 \ > >-rc:v cbr_hq -rc-lookahead:v 32 -refs:v 16 -cq:v 16 -bf:v 3 -b:v 2000K > > -minrate:v 2000K -maxrate:v 2000k -bufsize:v 8M -coder:v cabac > > -b_ref_mode:v middle \ > >-c:a libfdk_aac -ac 2 -ar 48000 -b:a 128k \ > >output.mkv > > > > > > * LOG > > > > f*fmpeg version N-99194-g142ae27b1d *Copyright (c) 2000-2020 the FFmpeg > > developers > > built with gcc 10 (GCC) > > configuration: --prefix=/home/users/work/ffmpeg_build > > --pkg-config-flags=--static --extra-libs=-lpthread --extra-libs=-lm > > --bindir=/home/users/work/ffmpeg_build/bin --enable-gpl > --enable-libfdk_aac > > --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvpx > > --enable-libx264 --enable-libx265 --enable-vulkan --enable-nonfree > > --enable-libnpp --enable-nvenc --enable-cuvid --enable-libass > > --enable-libfontconfig --enable-libfreetype --enable-libfribidi > > --enable-cuda > > libavutil 56. 59.100 / 56. 59.100 > > libavcodec 58.106.100 / 58.106.100 > > libavformat58. 56.100 / 58. 56.100 > > libavdevice58. 11.102 / 58. 11.102 > > libavfilter 7. 87.100 / 7. 87.100 > > libswscale 5. 8.100 / 5. 8.100 > > libswresample 3. 8.100 / 3. 8.100 > > libpostproc55. 8.100 / 55. 8.100 > > Input #0, matroska,webm, from 'input.mkv': > > Metadata: > > encoder : libebml v1.3.10 + libmatroska v1.5.2 > > creation_time : 2020-08-13T06:58:46.00Z > > Duration: 00:57:53.06, start: 0.00, bitrate: 12993 kb/s > > Chapter #0:0: start 0.00, end 508.424583 > > Metadata: > > title : Chapter 01 > > Chapter #0:1: start 508.424583, end 1037.202833 > > Metadata: > > title : Chapter 02 > > Chapter #0:2: start 1037.202833, end 1510.175333 > > Metadata: > > title : Chapter 03 > > Chapter #0:3: start 1510.175333, end 2231.896333 > > Metadata: > > title : Chapter 04 > > Chapter #0:4: start 2231.896333, end 2908.530625 > > Metadata: > > title : Chapter 05 > > Chapter #0:5: start 2908.530625, end 3473.052917 > > Metadata: > > title : Chapter 06 > > Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, SAR > > 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k t
Re: [FFmpeg-user] OVERLAY_CUDA and PGS Subtitle burn
Hi, Changed the input format: Video -> yuv420p Sub -> yuv*a*420p (to include Alpha Channel) Now the video is showing, but still no subtitles. Still get the error message: *Error while add the frame to buffer source(Internal bug, should not have happened).* ./ffmpeg -threads 1 -loglevel info -nostdin -y -fflags +genpts-fastseek \ -ss 00:00:00 -t 00:00:15 \ -extra_hw_frames 3 -vsync 0 -async 0 -filter_threads 1 -filter_complex_threads 1 \ -init_hw_device cuda=cuda -hwaccel cuda -filter_hw_device cuda -hwaccel_output_format cuda \ -i input.mkv \ * -filter_complex \ "[0:v]scale_npp=w=-1:h=720:interp_algo=lanczos:format=yuv420p[vid]; \ [0:s]format=yuva420p,hwupload[sub]; \ [vid][sub]overlay_cuda[v]" \*-map "[v]" -map 0:a \ -force_key_frames "expr:gte(t,n_forced*5)" \ -c:v h264_nvenc -preset:v slow -profile:v high -level:v 51 \ -rc:v cbr_hq -rc-lookahead:v 32 -refs:v 16 -cq:v 16 -bf:v 3 -b:v 2000K -minrate:v 2000K -maxrate:v 2000k -bufsize:v 8M -coder:v cabac -b_ref_mode:v middle \ -c:a libfdk_aac -ac 2 -ar 48000 -b:a 128k \ output.mkv On Thu, 17 Sep 2020 at 07:08, Panda Sing Cool wrote: > Hi everyone, > > i'm trying to use the OVERLAY_CUDA function to burn PGS titles over a > video and the result is not working. > i might misunderstand the usage of this function, so some help is welcome. > > The result of this command is a black screen with audio, using 'standard' > overlay filter is working fine, but slow ... > > Notice this message at the end of the log file (ffmpeg version > N-99194-g142ae27b1d ( compiled myself from git) ): > *Error while add the frame to buffer source(Internal bug, should not have > happened).* > > Thanks for any help. > > > *** > >./ffmpeg -threads 1 -loglevel info -nostdin -y -fflags +genpts-fastseek > \ >-ss 00:00:00 -t 00:01:00 \ >-extra_hw_frames 3 -vsync 0 -async 0 -filter_threads 1 > -filter_complex_threads 1 \ >-init_hw_device cuda=cuda -hwaccel cuda -filter_hw_device cuda > -hwaccel_output_format cuda \ >-i input.mkv \ >-filter_complex \ > > > * "[0:v]scale_npp=w=-1:h=720:interp_algo=lanczos:format=nv12[vid]; \ > [0:s]format=nv12,hwupload_cuda[sub]; \[vid][sub]overlay_cuda[v]" \* > -map "[v]" -map 0:a \ >-force_key_frames "expr:gte(t,n_forced*5)" \ >-c:v h264_nvenc -preset:v slow -profile:v high -level:v 51 \ >-rc:v cbr_hq -rc-lookahead:v 32 -refs:v 16 -cq:v 16 -bf:v 3 -b:v 2000K > -minrate:v 2000K -maxrate:v 2000k -bufsize:v 8M -coder:v cabac > -b_ref_mode:v middle \ >-c:a libfdk_aac -ac 2 -ar 48000 -b:a 128k \ >output.mkv > > > * LOG > > f*fmpeg version N-99194-g142ae27b1d *Copyright (c) 2000-2020 the FFmpeg > developers > built with gcc 10 (GCC) > configuration: --prefix=/home/users/work/ffmpeg_build > --pkg-config-flags=--static --extra-libs=-lpthread --extra-libs=-lm > --bindir=/home/users/work/ffmpeg_build/bin --enable-gpl --enable-libfdk_aac > --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvpx > --enable-libx264 --enable-libx265 --enable-vulkan --enable-nonfree > --enable-libnpp --enable-nvenc --enable-cuvid --enable-libass > --enable-libfontconfig --enable-libfreetype --enable-libfribidi > --enable-cuda > libavutil 56. 59.100 / 56. 59.100 > libavcodec 58.106.100 / 58.106.100 > libavformat58. 56.100 / 58. 56.100 > libavdevice58. 11.102 / 58. 11.102 > libavfilter 7. 87.100 / 7. 87.100 > libswscale 5. 8.100 / 5. 8.100 > libswresample 3. 8.100 / 3. 8.100 > libpostproc55. 8.100 / 55. 8.100 > Input #0, matroska,webm, from 'input.mkv': > Metadata: > encoder : libebml v1.3.10 + libmatroska v1.5.2 > creation_time : 2020-08-13T06:58:46.00Z > Duration: 00:57:53.06, start: 0.00, bitrate: 12993 kb/s > Chapter #0:0: start 0.00, end 508.424583 > Metadata: > title : Chapter 01 > Chapter #0:1: start 508.424583, end 1037.202833 > Metadata: > title : Chapter 02 > Chapter #0:2: start 1037.202833, end 1510.175333 > Metadata: > title : Chapter 03 > Chapter #0:3: start 1510.175333, end 2231.896333 > Metadata: > title : Chapter 04 > Chapter #0:4: start 2231.896333, end 2908.530625 > Metadata: > title : Chapter 05 > Chapter #0:5: start 2908.530625, end 3473.052917 > Metadata: > title : Chapter 06 > Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, SAR > 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default) > Metadata: > BPS-eng : 10946248 > DURATION-eng: 00:57:53.05300 > NUMBER_OF_FRAMES-eng: 83270 > NUMBER_OF_BYTES-eng: 4752112489 > _STATISTICS_WRITING_APP-eng: mkvmerge v46.0.0 ('No Deeper Escape') > 64-bit > _STATISTICS_WRITING_
Re: [FFmpeg-user] OVERLAY_CUDA and PGS Subtitle burn
Hi, This will not work. overlay_cuda accept only these format: ( https://patchwork.ffmpeg.org/project/ffmpeg/patch/20200318071955.2329-1-yyyaros...@gmail.com/ ) +static const enum AVPixelFormat supported_overlay_formats[] = {+ AV_PIX_FMT_NV12,+AV_PIX_FMT_YUV420P,+AV_PIX_FMT_YUVA420P,+ AV_PIX_FMT_NONE,+}; ./ffmpeg -i input.mkv -filter_complex '[0:v][0:s]overlay_cuda' outut.mkv ... Stream mapping: Stream #0:0 (h264) -> overlay_cuda:main (graph 0) Stream #0:2 (pgssub) -> overlay_cuda:overlay (graph 0) overlay_cuda (graph 0) -> Stream #0:0 (libx264) Stream #0:1 -> #0:1 (dts (dca) -> ac3 (native)) Press [q] to stop, [?] for help [matroska,webm @ 0x4a02540] sub2video: using 1920x1080 canvas *Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' and the filter 'auto_scaler_0'*Error reinitializing filters! Failed to inject frame into filter network: Function not implemented Error while processing the decoded data for stream #0:0 On Thu, 17 Sep 2020 at 07:14, Ted Park wrote: > Hi, > > > i'm trying to use the OVERLAY_CUDA function to burn PGS titles over a > video > > > > Try ffmpeg -I input.mkv -filter_complex ‘[0:v][0:s]overlay_cuda’ > > (Not completely sure it works with overlay cuda but that’s how you would do > it with overlay. > > > Regards, > > Ted Park > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] OVERLAY_CUDA and PGS Subtitle burn
Hi, > i'm trying to use the OVERLAY_CUDA function to burn PGS titles over a video > Try ffmpeg -I input.mkv -filter_complex ‘[0:v][0:s]overlay_cuda’ (Not completely sure it works with overlay cuda but that’s how you would do it with overlay. Regards, Ted Park ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] OVERLAY_CUDA and PGS Subtitle burn
Hi everyone, i'm trying to use the OVERLAY_CUDA function to burn PGS titles over a video and the result is not working. i might misunderstand the usage of this function, so some help is welcome. The result of this command is a black screen with audio, using 'standard' overlay filter is working fine, but slow ... Notice this message at the end of the log file (ffmpeg version N-99194-g142ae27b1d ( compiled myself from git) ): *Error while add the frame to buffer source(Internal bug, should not have happened).* Thanks for any help. *** ./ffmpeg -threads 1 -loglevel info -nostdin -y -fflags +genpts-fastseek \ -ss 00:00:00 -t 00:01:00 \ -extra_hw_frames 3 -vsync 0 -async 0 -filter_threads 1 -filter_complex_threads 1 \ -init_hw_device cuda=cuda -hwaccel cuda -filter_hw_device cuda -hwaccel_output_format cuda \ -i input.mkv \ -filter_complex \ * "[0:v]scale_npp=w=-1:h=720:interp_algo=lanczos:format=nv12[vid]; \ [0:s]format=nv12,hwupload_cuda[sub]; \[vid][sub]overlay_cuda[v]" \* -map "[v]" -map 0:a \ -force_key_frames "expr:gte(t,n_forced*5)" \ -c:v h264_nvenc -preset:v slow -profile:v high -level:v 51 \ -rc:v cbr_hq -rc-lookahead:v 32 -refs:v 16 -cq:v 16 -bf:v 3 -b:v 2000K -minrate:v 2000K -maxrate:v 2000k -bufsize:v 8M -coder:v cabac -b_ref_mode:v middle \ -c:a libfdk_aac -ac 2 -ar 48000 -b:a 128k \ output.mkv * LOG f*fmpeg version N-99194-g142ae27b1d *Copyright (c) 2000-2020 the FFmpeg developers built with gcc 10 (GCC) configuration: --prefix=/home/users/work/ffmpeg_build --pkg-config-flags=--static --extra-libs=-lpthread --extra-libs=-lm --bindir=/home/users/work/ffmpeg_build/bin --enable-gpl --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libx264 --enable-libx265 --enable-vulkan --enable-nonfree --enable-libnpp --enable-nvenc --enable-cuvid --enable-libass --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-cuda libavutil 56. 59.100 / 56. 59.100 libavcodec 58.106.100 / 58.106.100 libavformat58. 56.100 / 58. 56.100 libavdevice58. 11.102 / 58. 11.102 libavfilter 7. 87.100 / 7. 87.100 libswscale 5. 8.100 / 5. 8.100 libswresample 3. 8.100 / 3. 8.100 libpostproc55. 8.100 / 55. 8.100 Input #0, matroska,webm, from 'input.mkv': Metadata: encoder : libebml v1.3.10 + libmatroska v1.5.2 creation_time : 2020-08-13T06:58:46.00Z Duration: 00:57:53.06, start: 0.00, bitrate: 12993 kb/s Chapter #0:0: start 0.00, end 508.424583 Metadata: title : Chapter 01 Chapter #0:1: start 508.424583, end 1037.202833 Metadata: title : Chapter 02 Chapter #0:2: start 1037.202833, end 1510.175333 Metadata: title : Chapter 03 Chapter #0:3: start 1510.175333, end 2231.896333 Metadata: title : Chapter 04 Chapter #0:4: start 2231.896333, end 2908.530625 Metadata: title : Chapter 05 Chapter #0:5: start 2908.530625, end 3473.052917 Metadata: title : Chapter 06 Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default) Metadata: BPS-eng : 10946248 DURATION-eng: 00:57:53.05300 NUMBER_OF_FRAMES-eng: 83270 NUMBER_OF_BYTES-eng: 4752112489 _STATISTICS_WRITING_APP-eng: mkvmerge v46.0.0 ('No Deeper Escape') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2020-08-13 06:58:46 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s16p Metadata: BPS-eng : 2022940 DURATION-eng: 00:57:53.05600 NUMBER_OF_FRAMES-eng: 325599 NUMBER_OF_BYTES-eng: 878223124 _STATISTICS_WRITING_APP-eng: mkvmerge v46.0.0 ('No Deeper Escape') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2020-08-13 06:58:46 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:2(eng): Subtitle: hdmv_pgs_subtitle, 1920x1080 Metadata: BPS-eng : 44076 DURATION-eng: 00:56:53.66000 NUMBER_OF_FRAMES-eng: 1450 NUMBER_OF_BYTES-eng: 18807980 _STATISTICS_WRITING_APP-eng: mkvmerge v46.0.0 ('No Deeper Escape') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2020-08-13 06:58:46 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream mapping: Stream #0:0 (h264) -> scale_npp (graph 0) Stream #0:2 (pgssub) -> format (graph 0) overlay_cuda (graph 0) -> Stream #0:0 (h264_nvenc) Stream #0:1 -> #0:1 (dts (dca) -> aac (libfdk_aac)) [matroska,webm @ 0x3a39bc0] sub2video: using 1920x1080 canvas Output #0, matroska, to 'output.mkv': Metadata: encoder : Lavf58.5