[FFmpeg-trac] #7392(ffmpeg:new): Filter "sharpen" on Vaapi encoding

FFmpeg trac at avcodec.org
Sun Sep 2 14:09:58 EEST 2018

#7392: Filter "sharpen" on Vaapi encoding
             Reporter:  jesusda      |                     Type:  task
               Status:  new          |                 Priority:  normal
            Component:  ffmpeg       |                  Version:
             Keywords:  vaapi,       |  unspecified
  sharpen                            |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
 Summary of the bug:

 I want to apply a sharpen (or unsharp) filter to a video encoding using
 vaapi, but I tried a lot of parameters without any success.

 How to reproduce:

 This is my ffmpeg command to convert a video to x264 with vaapi


 ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi
 -hwaccel_output_format vaapi -i test.mp4 -acodec libmp3lame -ar 44100 -ab
 128k -ac 2 -vf 'format=nv12|vaapi,hwupload,scale_vaapi=w=640:h=360'
 -threads 0  -r 30 -c:v h264_vaapi -profile:v high -level:v 3 -qp 15   -y


 It works fine, but with these other lines I can convert a video to x264
 with a much better quality (thanks, in part, to a sharpen filter):


 ffmpeg -i "test.mp4" -an -pass 1 -vcodec libx264 -r 30 -preset slow -s
 640x360 -b:v 750k -bt:v 850k -vf unsharp=5:5:1.0:5:5:1.0 -threads 0

 ffmpeg -i "test.mp4" -acodec libmp3lame -ar 44100 -ab 128k -ac 2 -pass 2
 -vcodec libx264 -r 30 -preset slow -s 640x360 -b:v "750k -bt:v 850k -vf
 unsharp=5:5:1.0:5:5:1.0 -threads 0  -y "test.mkv"


 The difference between the 2 ways (GPU vs CPU) is really huge. The second
 way generates much better visual quality videos than the first one.

 It is possible to do 2pass conversion with vaapi?
 It is possible to apply a sharpen filter with vaappi?

 Thanks a lot.

Ticket URL: <https://trac.ffmpeg.org/ticket/7392>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list