Im trying to blur a hardcoded subtitle on a movie, but keep getting this error each time and cant understand what it means, or how to fix it
Code:Argument '(2019)' provided as input filename, but 'C:\ffmpeg-3.4-win64-static\bin\Joker' was already specified.
+ Reply to Thread
Results 1 to 10 of 10
-
-
Post the complete command-line and log. What OS/shell? Are you working on the terminal or via a batch file?
To me it points to some error with e.g. forgotten (or too many) quotes around a filename that has spaces or some error due to not escaped characters. -
Hi firstly many thanks for replying back to me, its most appreciated. But the movie says joker (2019) so I removed the (2019) but still get same error just cant understand why I get that
this is what dimensions I have
delogo=x=332:y=506:w=606:h=130
.
.
"Are you OK with above delogo filter parameters"
Press Y for Yes to preview, N for No and return to start. [Y,N]?Y
Argument '.mkv' provided as input filename, but 'C:\ffmpeg-3.4-win64-static\bin\Joker' was already specified.
.
.
"Start ffmpeg with delogo filter parameters?"
.
.
Press Y for Yes to continue, N for No and return to start. [Y,N]?
I am on windows 10 I dont understand the rest you saidshell? Are you working on the terminal or via a batch file? -
Do you mean the complete script
@setlocal
@echo off
@echo "delogo parameters script with report active"
@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=2 0000:vbv_bufsize=10000:ref=3:bframes=3:rc-lookahead=32:cabac=1:interlaced=0:no_psnr=1:no_ssi m=1:bluray_compat=1:open-gop=0:pic_struct=1:aud=1:nal_hrd=vbr:force_cfr=1:o verscan=show:colorprim=bt709:transfer=bt709:colorm atrix=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%,sc ale=iw:ih:sws_flags=spline+accurate_rnd+full_chrom a_int+full_chroma_inp:interl=-1:out_range=auto:out_color_matrix=bt709,format=pix _fmts=yuv420p"
@ffmpeg.exe -hide_banner -report -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%,sc ale=iw:ih:sws_flags=spline+accurate_rnd+full_chrom a_int+full_chroma_inp:interl=-1:out_range=auto:out_color_matrix=bt709,format=pix _fmts=yuv420p"
@ffmpeg.exe -hide_banner -report -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 -
I'm not sure (you didn't post the complete log) but maybe the missing quotes around %filename% in this line are the problem:
Code:@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"
Code:@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"
-
Hi I didnt post log as it was far too big, But I can see you have edited that line to have quotes "" around "%filename%" I just tried movie again, and no error plus it showed a green oblong around subs, so it seems you have fixed problem many thanks for that. But I just find it very strange why on some movies it dont do it
-
-
Code:
@set filename="%~1"
Code:@set "filename=%~1"
If I remember correctly, if there is %1 in batch script, quotes are added if necessary - if there are gaps in the string.
To manually override that quote adding feature, because sometimes it might actually break the code, you use "%~1" for path strings
Because %~1 turns that automatic quote adding feature off.
Using batch scrips I always controlled that manually, just to be sure. So I used %~1 or %~2 etc, and added quotes if that variable was a path string or if it mattered in the code. -
Similar Threads
-
FFmpeg setdar error
By Megafox in forum Newbie / General discussionsReplies: 3Last Post: 11th Feb 2018, 09:10 -
Just another ffmpeg fontconfig error
By ks.zealot in forum Video ConversionReplies: 6Last Post: 30th Apr 2017, 10:59 -
ffmpeg error setting profile
By yukukuhi in forum Video ConversionReplies: 24Last Post: 9th Jul 2016, 23:51 -
need help with ffmpeg error message
By mulliganman in forum Video Streaming DownloadingReplies: 0Last Post: 9th Feb 2016, 16:33 -
FFmpeg resize and crop error
By z-machine95 in forum Video ConversionReplies: 4Last Post: 23rd May 2015, 18:57