I have a script below which was done for me to blur subtitles, using ffmpeg. is there a way to make the blurred subtitles more fine. like smoother. if so what is needed in this script or can be added
Code:
@setlocal
@echo off
@echo "delogo parameters script"
@set xx="Unknown"
@set yy="Unknown"
@set ww="Unknown"
@set hh="Unknown"
@rem folder where ffmpeg.exe is located
@set FF=C:\ffmpeg-3.4-win64-static\bin
@set PATH=%FF%;%PATH%
@set filename=%~1
@rem video quality settings
@set vq=25
@rem audio bitrate
@set ab=192
:new
@cls
@echo .
@echo .
@echo Old delogo=x=%xx%:y=%yy%:w=%ww%:h=%hh%
@echo .
@echo .
@rem delogo filter settings
@set /p xx="Enter X - the top left corner coordinate of the subtitle: "
@set /p yy="Enter Y - the top left corner coordinate of the subtitle: "
@set /p ww="Enter W - the width of the subtitle to clear: "
@set /p hh="Enter H - the height of the subtitle to clear: "
@cls
@echo .
@echo .
@echo delogo=x=%xx%:y=%yy%:w=%ww%:h=%hh%
@echo .
@echo .
@echo "Are you OK with above delogo filter parameters"
@choice /c:yn /M "Press Y for Yes to preview, N for No and return to start."
@if errorlevel 2 goto new
@if errorlevel 1 goto start
:start
@ffplay.exe -hide_banner -v 32 -stats -autoexit -i %filename% -an -vf "setpts=PTS/5,delogo=x=%xx%:y=%yy%:w=%ww%:h=%hh%:show=1"
@echo .
@echo .
@echo "Start ffmpeg with delogo filter parameters?"
@echo .
@echo .
@choice /c:yn /M "Press Y for Yes to continue, N for No and return to start."
@if errorlevel 2 goto new
@if errorlevel 1 goto selenc
:selenc
@echo .
@echo .
@echo "Please select encoder - Slow but higher qaulity press Yes or Fast but lower quality No"
@echo .
@echo .
@choice /c:sf /M "Press S for SLOW or F for FAST encoder"
@if errorlevel 2 goto ffast
@if errorlevel 1 goto sslow
:sslow
@cls
@echo .
@echo "ffmpeg libx264 begin encode with delogo=x=%xx%:y=%yy%:w=%ww%:h=%hh% parameters"
@echo .
@SET x264opts="crf=%vq%:level=4.0:qpmin=8:vbv_maxrate=20000:vbv_bufsize=10000:ref=3:bframes=3:rc-lookahead=32:cabac=1:interlaced=0:no_psnr=1:no_ssim=1:bluray_compat=1:open-gop=0:pic_struct=1:aud=1:nal_hrd=vbr:force_cfr=1:overscan=show:colorprim=bt709:transfer=bt709:colormatrix=bt709"
@set aproc="pan=stereo|FL < FL+1.414FC+0.5BL+0.5SL+0.25LFE|FR < FR+1.414FC+0.5BR+0.5SR+0.25LFE,dynaudnorm=p=1/sqrt(2):m=100:s=20"
@set vproc="pp=ac,delogo=x=%xx%:y=%yy%:w=%ww%:h=%hh%,scale=iw:ih:sws_flags=spline+accurate_rnd+full_chroma_int+full_chroma_inp:interl=-1:out_range=auto:out_color_matrix=bt709,format=pix_fmts=yuv420p"
@ffmpeg.exe -hide_banner -v 32 -stats -y -i "%filename%" -vf %vproc% -c:v libx264 -preset faster -tune film -profile:v high -level:v 4.0 -x264opts %x264opts% -x264-params %x264opts% -af %aproc% -c:a ac3 -b:a %ab%k -f matroska "%~n1_delogodynaudio.mkv"
goto end
:ffast
@cls
@echo .
@echo "ffmpeg NVEnc begin encode with delogo=x=%xx%:y=%yy%:w=%ww%:h=%hh% parameters"
@echo .
@set aproc="pan=stereo|FL < FL+1.414FC+0.5BL+0.5SL+0.25LFE|FR < FR+1.414FC+0.5BR+0.5SR+0.25LFE,dynaudnorm=p=1/sqrt(2):m=100:s=20"
@set vproc="pp=ac,delogo=x=%xx%:y=%yy%:w=%ww%:h=%hh%,scale=iw:ih:sws_flags=spline+accurate_rnd+full_chroma_int+full_chroma_inp:interl=-1:out_range=auto:out_color_matrix=bt709,format=pix_fmts=yuv420p"
@ffmpeg.exe -hide_banner -v 32 -stats -y -i "%filename%" -vf %vproc% -c:v h264_nvenc -level:v 4.0 -preset:v hq -profile:v high -cq %vq% -qmin:v 8 -qmax:v 29 -bufsize:v 10000k -maxrate:v 20000k -g 250 -bf 3 -refs:v 3 -rc:v vbr_hq -rc-lookahead 32 -b_adapt 1 -temporal-aq 1 -spatial-aq 1 -i_qfactor 0.75 -b_qfactor 1.1 -coder:v cabac -bluray-compat 1 -aud 1 -aq-strength 8 -af %aproc% -c:a ac3 -b:a %ab%k "%~n1_delogdaudnv.mkv"
goto end
:end
@echo terminating script
@endlocal
@timeout 30
@exit /b