[FFmpeg-trac] #9184(avfilter:open): pngdec output frame that has double image

FFmpeg trac at avcodec.org
Thu Aug 5 12:34:53 EEST 2021


#9184: pngdec output frame that has double image
-------------------------------------+-------------------------------------
             Reporter:  akoryagin    |                    Owner:  (none)
                 Type:  defect       |                   Status:  open
             Priority:  important    |                Component:  avfilter
              Version:  unspecified  |               Resolution:
             Keywords:  artefact on  |               Blocked By:
  the video                          |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by wenbin,chen):

 Hi Pljushevij
 CPU High because it use cpu to decode. Here is the command using qsv to
 decode.(I add "-c:v hevc_qsv" option)

 {{{
 ffmpeg -init_hw_device qsv=hw:/dev/dri/renderD128 -filter_hw_device hw -re
 -f concat -safe 0 -c:v hevc_qsv -i "files.txt" -loop 1 -i "logo.png"
 -filter_complex
 "[1]lut=a=val*0.5,hwupload=extra_hw_frames=10,format=qsv[a];[0:v]hwupload=extra_hw_frames=10,scale_qsv=1920:-1[bg];[bg][a]overlay_qsv=x=(W-w-1):y=(H-h-1):shortest=1,hwdownload,format=nv12,pad=1920:1080
 :(ow-iw)/2:(oh-ih)/2" -map 0:v:0 -map 0:a:0 -c:v hevc_qsv -preset veryfast
 -b:v 7M -maxrate 7M -c:a eac3 -sn -f hls -hls_list_size 5 -hls_flags
 delete_segments -y stream.m3u8
 }}}

 There are upload and download parts which still reduces the efficiency. If
 we remove pad filter we can remove hwdownload filter too. This makes
 encoder to encode directly in device memory.

 As for upload part, we need to submit patch to improve it. overlay_qsv
 need two input frames to be in the same device context, but ffmpeg-qsv
 cannot specify device context for each decoder, so I use hwupload to make
 sure they are in the same device context.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9184#comment:29>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list