VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. 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.
    Quote Quote  
  2. 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.
    Quote Quote  
  3. Originally Posted by sneaker View Post
    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 said
    shell? Are you working on the terminal or via a batch file?
    Quote Quote  
  4. Post the complete command-line and log.
    Quote Quote  
  5. Originally Posted by sneaker View Post
    Post the complete command-line and log.
    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
    Quote Quote  
  6. 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"
    I.e. try changing to:
    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"
    Quote Quote  
  7. Originally Posted by sneaker View Post
    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"
    I.e. try changing to:
    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
    Quote Quote  
  8. Originally Posted by natty View Post
    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
    As author of this script i can say that i use

    Code:
    @set filename=%1
    NOT

    Code:
    @set filename=%~1
    as workaround for commandline limitations for weird filenames (mostly with characters like SPACE) - it works for most but still not for all names.
    Quote Quote  
  9. Code:
    @set filename="%~1"
    or
    Code:
    @set "filename=%~1"
    might just work fine, that second example I'm not sure, it was a while already ...
    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.
    Quote Quote  
  10. Originally Posted by pandy View Post
    Originally Posted by natty View Post
    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
    As author of this script i can say that i use

    Code:
    @set filename=%1
    NOT

    Code:
    @set filename=%~1
    as workaround for commandline limitations for weird filenames (mostly with characters like SPACE) - it works for most but still not for all names.
    Hi yes pandy it is your script, but I didn't want to bother you as you very busy on your house, but thank you its most appreciated
    Quote Quote  



Similar Threads