Opened 4 years ago
Closed 3 years ago
#8831 closed defect (fixed)
When using the overlay_cuda filter, I get the warning "Error while add the frame to buffer source(Internal bug, should not have happened) and encoding never starts"
Reported by: | Dennis E. Mungai | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | overlay_cuda |
Cc: | yyyaroslav@gmail.com, dmngaie@gmail.com | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
I get the warning above from ffmpeg whenever the overlay_cuda
filter is in use:
Error while add the frame to buffer source(Internal bug, should not have happened)
How to reproduce:
Here's the command I used:
ffmpeg \ -init_hw_device cuda=cuda:0 -filter_hw_device cuda \ -loglevel info \ -fflags +genpts -fix_sub_duration \ -threads 1 -extra_hw_frames 3 -avoid_negative_ts disabled -async 1 \ -f mpegts -fix_teletext_pts 1 -scan_all_pmts 1 -merge_pmt_versions 1 \ -i 'output.ts' \ -filter_complex \ "[0:v:0]format=yuv420p,hwupload[main]; \ [0:s:3]format=yuva420p,hwupload[subs]; \ [main][subs]overlay_cuda[v]; \ [v]split=2[a][b]; \ [a]scale_npp=1280:720:interp_algo=super[c]; \ [b]scale_npp=720:576:interp_algo=super[d]" \ -bsf:a aac_adtstoasc -c:a aac -ac 2 -ar 48000 -b:a 128k \ -b:v:0 2250k -c:v:0 h264_nvenc -preset:v:0 llhq -profile:v:0 high -rc:v:0 vbr_hq -level:v:0 4.2 -r:v:0 25 -g:v:0 100 -bf:v:0 3 -strict_gop:v:0 1 \ -b:v:1 1750k -c:v:1 h264_nvenc -preset:v:1 llhq -profile:v:1 high -rc:v:0 vbr_hq -level:v:1 4.2 -r:v:1 25 -g:v:1 100 -bf:v:1 3 -strict_gop:v:1 1 \ -flags +global_header+cgop \ -map "[c]" -map "[d]" -map a:2 -c:s dvdsub \ -f tee \ "[select=\'v:0,a\':f=mpegts]'test0.ts'| \ [select=\'v:1,a\':f=mpegts]'test1.ts'"
I'm trying to overlay a subtitle stream over the main video with overlay_cuda.
And here are the attributes of the file I'm encoding:
ffprobe -i output.ts Input #0, mpegts, from 'output.ts': Duration: 00:02:00.14, start: 1.400000, bitrate: 14627 kb/s Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc Stream #0:1[0x101](cze): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s Stream #0:2[0x102](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 448 kb/s Stream #0:3[0x103](hun): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s Stream #0:4[0x104](tur): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s Stream #0:5[0x105](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s Stream #0:6[0x106](gre): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s Stream #0:7[0x107](swe): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:8[0x108](mkd): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:9[0x109](gre): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:10[0x10a](rum): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:11[0x10b](hrv): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:12[0x10c](slv): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:13[0x10d](dan): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:14[0x10e](nor): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:15[0x10f](srp): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:16[0x110](cze): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Console output:
ffmpeg version N-98588-gcbb6ba2e86 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 8 (Ubuntu 8.4.0-1ubuntu1~18.04) configuration: --pkg-config-flags=--static --enable-static --disable-shared --prefix=/home/brainiarc7 --bindir=/home/brainiarc7/bin --extra-cflags=-I/home/brainiarc7/include --extra-ldflags=-L/home/brainiarc7/lib --enable-cuda-nvcc --enable-cuvid --enable-libnpp --extra-cflags=-I/usr/local/cuda/include/ --extra-ldflags=-L/usr/local/cuda/lib64/ --enable-nvenc --enable-libass --disable-debug --enable-libvorbis --enable-libvpx --enable-libdrm --enable-opencl --enable-libxml2 --enable-gpl --cpu=native --enable-opengl --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-openssl --enable-librtmp --enable-libpulse --enable-libzvbi --enable-librav1e --enable-libvmaf --enable-libsrt --enable-avisynth --enable-version3 --enable-pic --nvccflags='-gencode arch=compute_75,code=sm_75 -O2' --extra-libs='-lpthread -lm -lz -ldl' --enable-nonfree libavutil 56. 57.100 / 56. 57.100 libavcodec 58. 97.102 / 58. 97.102 libavformat 58. 49.100 / 58. 49.100 libavdevice 58. 11.101 / 58. 11.101 libavfilter 7. 87.100 / 7. 87.100 libswscale 5. 8.100 / 5. 8.100 libswresample 3. 8.100 / 3. 8.100 libpostproc 55. 8.100 / 55. 8.100 [mpegts @ 0x55fa36a621c0] start time for stream 7 is not set in estimate_timings_from_pts [mpegts @ 0x55fa36a621c0] start time for stream 8 is not set in estimate_timings_from_pts [mpegts @ 0x55fa36a621c0] start time for stream 10 is not set in estimate_timings_from_pts [mpegts @ 0x55fa36a621c0] start time for stream 11 is not set in estimate_timings_from_pts [mpegts @ 0x55fa36a621c0] start time for stream 12 is not set in estimate_timings_from_pts [mpegts @ 0x55fa36a621c0] start time for stream 13 is not set in estimate_timings_from_pts [mpegts @ 0x55fa36a621c0] start time for stream 14 is not set in estimate_timings_from_pts [mpegts @ 0x55fa36a621c0] start time for stream 15 is not set in estimate_timings_from_pts [mpegts @ 0x55fa36a621c0] start time for stream 16 is not set in estimate_timings_from_pts Input #0, mpegts, from 'output.ts': Duration: 00:02:00.14, start: 1.400000, bitrate: 14627 kb/s Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc Stream #0:1[0x101](cze): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s Stream #0:2[0x102](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 448 kb/s Stream #0:3[0x103](hun): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s Stream #0:4[0x104](tur): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s Stream #0:5[0x105](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s Stream #0:6[0x106](gre): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s Stream #0:7[0x107](swe): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:8[0x108](mkd): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:9[0x109](gre): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:10[0x10a](rum): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:11[0x10b](hrv): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:12[0x10c](slv): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:13[0x10d](dan): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:14[0x10e](nor): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:15[0x10f](srp): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:16[0x110](cze): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream mapping: Stream #0:0 (h264) -> format (graph 0) Stream #0:10 (dvbsub) -> format (graph 0) scale_npp (graph 0) -> Stream #0:0 (h264_nvenc) scale_npp (graph 0) -> Stream #0:1 (h264_nvenc) Stream #0:3 -> #0:2 (mp2 (native) -> aac (native)) Press [q] to stop, [?] for help -async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.100000:first_pts=0. [mpegts @ 0x55fa36a621c0] sub2video: using 1920x1080 canvas Output #0, tee, to '[select=\'v:0,a\':f=mpegts]'test0.ts'| [select=\'v:1,a\':f=mpegts]'test1.ts'': Metadata: encoder : Lavf58.49.100 Stream #0:0: Video: h264 (h264_nvenc) (High), cuda, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 2250 kb/s, 25 fps, 25 tbn, 25 tbc Metadata: encoder : Lavc58.97.102 h264_nvenc Side data: cpb: bitrate max/min/avg: 0/0/2250000 buffer size: 4500000 vbv_delay: N/A Stream #0:1: Video: h264 (h264_nvenc) (High), cuda, 720x576 [SAR 64:45 DAR 16:9], q=-1--1, 1750 kb/s, 25 fps, 25 tbn, 25 tbc Metadata: encoder : Lavc58.97.102 h264_nvenc Side data: cpb: bitrate max/min/avg: 0/0/1750000 buffer size: 3500000 vbv_delay: N/A Stream #0:2(hun): Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s Metadata: encoder : Lavc58.97.102 aac Error while add the frame to buffer source(Internal bug, should not have happened). frame= 0 fps=0.0 q=0.0 Lq=0.0 size=N/A time=00:00:01.23 bitrate=N/A speed=0.08x
The buildconf in use:
configuration: --pkg-config-flags=--static --enable-static --disable-shared --prefix=/home/brainiarc7 --bindir=/home/brainiarc7/bin --extra-cflags=-I/home/brainiarc7/include --extra-ldflags=-L/home/brainiarc7/lib --enable-cuda-nvcc --enable-cuvid --enable-libnpp --extra-cflags=-I/usr/local/cuda/include/ --extra-ldflags=-L/usr/local/cuda/lib64/ --enable-nvenc --enable-libass --disable-debug --enable-libvorbis --enable-libvpx --enable-libdrm --enable-opencl --enable-libxml2 --enable-gpl --cpu=native --enable-opengl --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-openssl --enable-librtmp --enable-libpulse --enable-libzvbi --enable-librav1e --enable-libvmaf --enable-libsrt --enable-avisynth --enable-version3 --enable-pic --nvccflags='-gencode arch=compute_75,code=sm_75 -O2' --extra-libs='-lpthread -lm -lz -ldl' --enable-nonfree
Change History (2)
comment:1 by , 4 years ago
Cc: | added |
---|---|
Version: | unspecified → git-master |
comment:2 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Confirmed as fixed since commit 5d52c4cbba8daee4c6f752087c1a01ddc9c43eac
Note:
See TracTickets
for help on using tickets.
An update:
With either
NVCDEC
orCUVID
, as demonstrated with the command-lines:(a). NVDEC:
(b). CUVID:
I now get a somewhat more cryptic error message:
"Failed to inject frame into filter network: Internal bug, should not have happened".
Snippet of the log with the message when Ctrl+C is pressed to kill the process: