VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by disabling your ad blocker or buy PlayOn and record Netflix! :)
+ Reply to Thread
Results 1 to 26 of 26
Thread
  1. Member loa909's Avatar
    Join Date
    Mar 2007
    Location
    United Kingdom
    Search Comp PM
    someone on here once gave me a script by ffmpeg to make movie formats louder like .avi, .mkv, mp4 it was like this below. but dont seem to work no more when i drop a movie onto the audio.bat file

    the folder was called ffmpeg-20160412-git-196cfc2-win64-static

    inside are these folders




    and inside the bin folder are these



    and this is what audio.bat says


    Code:
     @ffmpeg -i %1 -c:v copy -c:a ac3 -b:a 192k -af "aformat=sample_fmts=fltp,highpass=f=5,dynaudnorm=m=100.0:f=500:p=0.5:b=0:s=5.0,aresample=resampler=soxr:osr=48000:dither_method=0" "%~n1_dyn%~x1"


    could anyone here help me on this please it would be most appreciated
    Last edited by loa909; 18th Nov 2017 at 10:06.
    Quote Quote  
  2. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Add the command "pause" to your batch file so you can read any errors that are thrown.

    Code:
    @ffmpeg -i %1 -c:v copy -c:a ac3 -b:a 192k -af "aformat=sample_fmts=fltp,highpass=f=5,dynaudnorm=m=100.0:f=500:p=0.5:b=0:s=5.0,aresample=resampler=soxr:osr=48000:dither_method=0" "%~n1_dyn%~x1"
    pause
    Quote Quote  
  3. Member loa909's Avatar
    Join Date
    Mar 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by JVRaines View Post
    Add the command "pause" to your batch file so you can read any errors that are thrown.

    Code:
    @ffmpeg -i %1 -c:v copy -c:a ac3 -b:a 192k -af "aformat=sample_fmts=fltp,highpass=f=5,dynaudnorm=m=100.0:f=500:p=0.5:b=0:s=5.0,aresample=resampler=soxr:osr=48000:dither_method=0" "%~n1_dyn%~x1"
    pause
    ok I did that and it says this in dos window

    'ffmpeg' is not recognized as an internal or external command,
    operable program or batch file.
    Quote Quote  
  4. At first locate where ffmpeg.exe is present
    second add location of ffmpeg.exe to path
    Code:
    SET PATH=%PATH%;C:\folderwhereffmpeg.exeislocated
    batch file can be like this:
    Code:
    @setlocal
    @set PATH=%PATH%;C:\folderwhereffmpeg.exeislocated
    @set filename=%1
    @@ffmpeg.exe -i "%filename%" -c:v copy -c:a ac3 -b:a 192k -af "aformat=sample_fmts=fltp,pan=stereo|FL < FL+1.414FC+0.5BL+0.5SL+0.25LFE+0.125BR|FR < FR+1.414FC+0.5BR+0.5SR+0.25LFE+0.125BL,highpass=f=5,dynaudnorm=p=1/sqrt(2):m=100:s=20,aresample=resampler=soxr:osr=48000:dither_method=0" "%~n1_dyn%~x1"
    @endlocal
    @pause
    This should be robust and always working script (in fact i didn't found non-working file except those with very weird names). All you need to do is provide correct folder where ffmpeg.exe is located.
    (based on bitrate i assumed that this will be 2 channel (stereo) AC-3 - that's why downmixing is present).
    Quote Quote  
  5. Member loa909's Avatar
    Join Date
    Mar 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by pandy View Post
    At first locate where ffmpeg.exe is present
    second add location of ffmpeg.exe to path
    Code:
    SET PATH=%PATH%;C:\folderwhereffmpeg.exeislocated
    batch file can be like this:
    Code:
    @setlocal
    @set PATH=%PATH%;C:\folderwhereffmpeg.exeislocated
    @set filename=%1
    @@ffmpeg.exe -i "%filename%" -c:v copy -c:a ac3 -b:a 192k -af "aformat=sample_fmts=fltp,pan=stereo|FL < FL+1.414FC+0.5BL+0.5SL+0.25LFE+0.125BR|FR < FR+1.414FC+0.5BR+0.5SR+0.25LFE+0.125BL,highpass=f=5,dynaudnorm=p=1/sqrt(2):m=100:s=20,aresample=resampler=soxr:osr=48000:dither_method=0" "%~n1_dyn%~x1"
    @endlocal
    @pause
    This should be robust and always working script (in fact i didn't found non-working file except those with very weird names). All you need to do is provide correct folder where ffmpeg.exe is located.
    (based on bitrate i assumed that this will be 2 channel (stereo) AC-3 - that's why downmixing is present).


    Thank you so much pandy its working again now I added your file and named it audio.bat this is what I have now

    Code:
      @setlocal
    @set PATH=%PATH%;c:\ffmpeg-20160412-git-196cfc2-win64-static\bin\
    @set filename=%1
    @@ffmpeg.exe -i "%filename%" -c:v copy -c:a ac3 -b:a 192k -af "aformat=sample_fmts=fltp,pan=stereo|FL < FL+1.414FC+0.5BL+0.5SL+0.25LFE+0.125BR|FR < FR+1.414FC+0.5BR+0.5SR+0.25LFE+0.125BL,highpass=f=5,dynaudnorm=p=1/sqrt(2):m=100:s=20,aresample=resampler=soxr:osr=48000:dither_method=0" "%~n1_dyn%~x1"
    @endlocal
    @pause

    will this accept .avi and also mkv too. I dont know too much on this ffmpeg thing. But I do also have one for removing logos

    Code:
     "C:\ffmpeg-3.4-win64-static\bin\ffmpeg" -i %1  -vf delogo=x=70:y=292:w=146:h=46 -c:a aac -b:a 192k %1.delogo.mkv

    and for ffplay

    Code:
     "C:\ffmpeg-3.4-win64-static\bin\ffplay" -i %1  -vf delogo=x=70:y=292:w=146:h=46:show=1 
    
     pause
    Quote Quote  
  6. If you add -vn to script then it will accept every file known to ffmpeg - video will be ignored and audio processed as specified within audio filter (you may add -vn -sn -dn this will remove all video, subtitle and data from stream and as such audio only file will be created).

    IMHO to simplify syntax you may replace :
    Code:
     "C:\ffmpeg-3.4-win64-static\bin\ffplay"
    by combination:

    Code:
    @setlocal
    @set ffply= "C:\ffmpeg-3.4-win64-static\bin\ffplay.exe"
    @%ffply% -i "%1"  -vf "delogo=x=70:y=292:w=146:h=46:show=1" 
    @endlocal
    @pause
    @setlocal and @endlocal allow to avoid "polluting" your OS environment by keeping all variables locally not globally - useful when some variables are used to cheat batch limitation (but in fact this is very bad programming habit however difficult to avoid sometimes - for example normally you can't pass arguments or variables between different applications and you need to use temporary files).
    Quote Quote  
  7. Member loa909's Avatar
    Join Date
    Mar 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by pandy View Post
    If you add -vn to script then it will accept every file known to ffmpeg - video will be ignored and audio processed as specified within audio filter (you may add -vn -sn -dn this will remove all video, subtitle and data from stream and as such audio only file will be created).

    IMHO to simplify syntax you may replace :
    Code:
     "C:\ffmpeg-3.4-win64-static\bin\ffplay"
    by combination:

    Code:
    @setlocal
    @set ffply= "C:\ffmpeg-3.4-win64-static\bin\ffplay.exe"
    @%ffply% -i "%1"  -vf "delogo=x=70:y=292:w=146:h=46:show=1" 
    @endlocal
    @pause
    @setlocal and @endlocal allow to avoid "polluting" your OS environment by keeping all variables locally not globally - useful when some variables are used to cheat batch limitation (but in fact this is very bad programming habit however difficult to avoid sometimes - for example normally you can't pass arguments or variables between different applications and you need to use temporary files).
    thank you once again pandy is the logo.bat file ok too now

    Code:
      "C:\ffmpeg-3.4-win64-static\bin\ffmpeg" -i %1  -vf delogo=x=70:y=292:w=146:h=46 -c:a aac -b:a 192k %1.delogo.mkv
    Quote Quote  
  8. Originally Posted by loa909 View Post
    thank you once again pandy is the logo.bat file ok too now

    Code:
      "C:\ffmpeg-3.4-win64-static\bin\ffmpeg" -i %1  -vf delogo=x=70:y=292:w=146:h=46 -c:a aac -b:a 192k %1.delogo.mkv
    Glad to help.
    For delogo seem you forgotten to specify video codec (as you processing video then it must be decompressed, video filtering applied and later compressed to something useful) - so you need to add all this video codec related mambo jumbo...

    btw i would add extension exe to ffmpeg to avoid relying on command interpreter (so use ffmpeg.exe - this is only 4 characters more).
    Quote Quote  
  9. Member loa909's Avatar
    Join Date
    Mar 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by pandy View Post
    Originally Posted by loa909 View Post
    thank you once again pandy is the logo.bat file ok too now

    Code:
      "C:\ffmpeg-3.4-win64-static\bin\ffmpeg" -i %1  -vf delogo=x=70:y=292:w=146:h=46 -c:a aac -b:a 192k %1.delogo.mkv
    Glad to help.
    For delogo seem you forgotten to specify video codec (as you processing video then it must be decompressed, video filtering applied and later compressed to something useful) - so you need to add all this video codec related mambo jumbo...

    btw i would add extension exe to ffmpeg to avoid relying on command interpreter (so use ffmpeg.exe - this is only 4 characters more).
    I don't understand what you mean by video codec
    As it could be any movie which needs logo removing from. Not just 1 type. I don't have one atm.

    Also I don't understand what you mean by add extension exe to ffmpeg
    Quote Quote  
  10. Originally Posted by loa909 View Post
    I don't understand what you mean by video codec
    As it could be any movie which needs logo removing from. Not just 1 type. I don't have one atm.

    Also I don't understand what you mean by add extension exe to ffmpeg
    Video codec or perhaps more accurate - video compression - same approach like for normalization of audio - at some point you need to tell ffmpeg what kind codec must be used for processed data. In case audio you use ac3 codec with bitrate 192kbps, similar if you process video data at some point you need to specify video codec (compression) for example you can compress video with h.264 video codec (libx264).

    Bellow typical example for ffmpeg where audio and video is processed - your delogo filter should be placed as variable vproc.


    Code:
    @setlocal
    @set vq=24
    @set aq=5
    
    @SET x264opts="crf=%vq%:level=4.0:qpmin=12:vbv_maxrate=19999:vbv_bufsize=9999:ref=3:bframes=3:rc-lookahead=30: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:fullrange=off:overscan=show:colorprim=bt709:transfer=bt709:colormatrix=bt709"
    
    @set aproc="pan=stereo|FL < FL+1.414FC+0.5BL+0.5SL+0.25LFE+0.125BR|FR < FR+1.414FC+0.5BR+0.5SR+0.25LFE+0.125BL,firequalizer=gain='if(gte(f,35),0,-INF)+if(lte(f,14000),0,-INF)',dynaudnorm=p=1/sqrt(2):m=100:s=20,firequalizer=gain='if(gte(f,35),0,-INF)+if(lte(f,14000),0,-INF)',aresample=resampler=soxr:osr=48000:cutoff=0.990:dither_method=0"
    
    @set vproc="pp=ac,pp=ac,pp=ac,hqdn3d=2,gradfun,scale=iw:ih:sws_flags=spline+accurate_rnd+full_chroma_int+full_chroma_inp:interl=-1:out_color_matrix=bt709,format=pix_fmts=yuv420p"
    
    @ffmpeg.exe -hide_banner -v 32 -stats -y -color_range 2 -i "%1" -sn -dn -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 libmp3lame -q:a %aq% -f matroska "%~n1.mkv"
    @endlocal
    by extension i understand name after . (dot) - so ffmpeg.exe is file named ffmpeg with extenssion exe that means it is exectuable file (it was only cosmetic point - normally you don't need to bother with this - command.com can start files with extenssion exe and com)
    Quote Quote  
  11. Member loa909's Avatar
    Join Date
    Mar 2007
    Location
    United Kingdom
    Search Comp PM
    Im sorry pandy but this is all beyond me for my little brain LOL. as I dont have a clue. all i normally do is drop video what has subtitles onto the ffplay.bat it shows a green oblong box over movie so then I measure where to cover subs, then take those numbers, IE: delogo=x=70:y=292:w=146:h=46 and copy to the logo.bat file and it just blurs subtitles

    I have never done anything regarding codecs etc. this is too much for my small brain LOL

    but I am a slow learner.
    Quote Quote  
  12. Originally Posted by loa909 View Post
    Im sorry pandy but this is all beyond me for my little brain LOL. as I dont have a clue. all i normally do is drop video what has subtitles onto the ffplay.bat it shows a green oblong box over movie so then I measure where to cover subs, then take those numbers, IE: delogo=x=70:y=292:w=146:h=46 and copy to the logo.bat file and it just blurs subtitles

    I have never done anything regarding codecs etc. this is too much for my small brain LOL

    but I am a slow learner.
    No worry, no rush - my point was - when you adjusting audio level then your compressed audio stream need to be decoded\decompressed, later audio processing can be applied and after this your audio must be stored somewhere in some format and you selected AC-3 audio codec with bitrate 192kbps
    Code:
    -c:a ac3 -b:a 192k
    .
    You need to do same steps when you applying your delogo for video signal - it need to be decoded, delogo filter applied and at some point video must be stored in some file in some format and this missing from your script for delogo. Literally you need to specify somewhere something like
    Code:
    -c:v libx264 -crf 22
    at least, also some useful container must be provided to wrap audio and video in single file. As for today H.264 is most widely accepted modern codec i would advise you to learn how to use ffmpeg not only for audio but also for video files processing - https://trac.ffmpeg.org/wiki/Encode/H.264
    Quote Quote  
  13. Member loa909's Avatar
    Join Date
    Mar 2007
    Location
    United Kingdom
    Search Comp PM
    I will never be able to learn this as its way too hard for me. Im too old for this now LOL. could you not do me a script what blurs subtitles etc. the one i have so far seems ok but you are saying about codec etc which is double dutch to me.
    Quote Quote  
  14. Originally Posted by loa909 View Post
    I will never be able to learn this as its way too hard for me. Im too old for this now LOL. could you not do me a script what blurs subtitles etc. the one i have so far seems ok but you are saying about codec etc which is double dutch to me.
    Geen probleem Meneer, echter om Uw probleem op te lossen, moet ik meer details weten. (it was Dutch) and English: no problem Sir, however to solve Your problem i need to know more details... sorry can't resist still miss Netherlands.

    Just give me some details about video codec, container you wish to use.



    Aaaah - i see why you are so confused - seem ffmpeg use by default h.264 automatically - when you process video and not providing detailed and required video codec setting then by then ffmpeg use default video codec which is obviously h.264 with some settings, seem this is fine for you, will try to mimic this behaviour then but call explicitly h.264.

    not tested this script but should work (if not just give me error feedback) - you can (should) modify this script to adjust delogo filter settings accordingly to your needs.

    btw audio is also processed trough dynaudnorm filter.

    Code:
    @setlocal
    
    @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=23
    
    @audio bitrate
    @set ab=192
    
    @SET x264opts="crf=%vq%:level=4.0:qpmin=12:vbv_maxrate=19999:vbv_bufsize=9999:ref=3:bframes=3:rc-lookahead=30: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:fullrange=auto:overscan=show:colorprim=bt709:transfer=bt709:colormatrix=bt709"
    
    @rem delogo filter settings
    @set blurlogo=delogo=x=70:y=292:w=146:h=46
    
    @set vproc="pp=ac,%blurlogo%,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"
    @set aproc="pan=stereo|FL < FL+1.414FC+0.5BL+0.5SL+0.25LFE+0.125BR|FR < FR+1.414FC+0.5BR+0.5SR+0.25LFE+0.125BL,dynaudnorm=p=1/sqrt(2):m=100:s=20"
    
    @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 aac -b:a %ab%k -f matroska "%%~n1_delogo.mkv")
    
    @endlocal
    @pause
    Last edited by pandy; 19th Nov 2017 at 08:48.
    Quote Quote  
  15. Member loa909's Avatar
    Join Date
    Mar 2007
    Location
    United Kingdom
    Search Comp PM
    what exactly is this script for just to blur a subtitle and also enhance audio or just the 1st part blur subtitles. its no good asking me for stuff on this as dont have a clue

    do i also have to put path to ffmpeg here
    Code:
     @rem folder where ffmpeg.exe is located
    Quote Quote  
  16. Originally Posted by loa909 View Post
    what exactly is this script for just to blur a subtitle and also enhance audio or just the 1st part blur subtitles. its no good asking me for stuff on this as dont have a clue

    do i also have to put path to ffmpeg here
    Code:
     @rem folder where ffmpeg.exe is located
    Script will do:

    audio filter - audio is downmixed, this works up to 7.1 channel audio configuration, target is stereo downmix with enabled LFE (low frequency channel for subwoofer) and center channel audio emphasized (increase perceived loudness for dialogues assumed that they are in center channel), downmixed audio is pass to dynaudnorm filter where audio peak level can't be higher than -3.0103dBFS (recommended maximum peak level for digital audio) - this ends audio filtering

    video filter - video is passed to postprocessing (deblock, dering), delogo filter is applied to video with parameters provided by You, later video is passed to resize filter however this filter not perform any resize as output video will have same size as source however two things are performed, first video signal range is forced to auto so follow source, secondly all video going out of this filter should be with proper color matrix BT.709 as this color matrix is signalled by H.264 to decoders - proper decoder shall used this information and video should have proper color on screen (this is cosmetic settings - i could ignore this then rely purely on how decoder will set colormatrix).

    Finally audio is compressed to AAC with 192kbps bitrate and video is compressed to H.264 video codec with good quality (some settings forcing video encoder to create more compatible stream with older HW encoders - impact on quality should be marginal), also i use preset faster as in most cases it provide very fast video compression with acceptable bitrate increase (storage cost is nowadays quite low).

    @rem means comment ie ignored line - added as information, if you change folder where ffmpeg.exe is located you should edit line bellow this comment i.e.
    Code:
    @set FF=C:\ffmpeg-3.4-win64-static\bin
    .
    That's all.
    Quote Quote  
  17. Member loa909's Avatar
    Join Date
    Mar 2007
    Location
    United Kingdom
    Search Comp PM
    so am i clear in that this script does all i need like enhance audio, enhance video, and also blurs subtitles or am I completely wrong as all this is too much for my brain LOL
    Quote Quote  
  18. Originally Posted by loa909 View Post
    so am i clear in that this script does all i need like enhance audio, enhance video, and also blurs subtitles or am I completely wrong as all this is too much for my brain LOL
    Yes, however video enhance is marginal (limited deblocking and limited deringing, IMHO beter than nothing if we recompress video).
    Quote Quote  
  19. Member loa909's Avatar
    Join Date
    Mar 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by pandy View Post
    Originally Posted by loa909 View Post
    so am i clear in that this script does all i need like enhance audio, enhance video, and also blurs subtitles or am I completely wrong as all this is too much for my brain LOL
    Yes, however video enhance is marginal (limited deblocking and limited deringing, IMHO beter than nothing if we recompress video).
    when you say recompress video do you mean like zip it up like winrar etc. then use that script, Im sure I am completely wrong if so how do you recompress it. I believe this script is in case you want to enhance audio and sort video, and blur subtitles. all in one, but say you only want to enhance audio or say just blur subtitles
    Quote Quote  
  20. Originally Posted by loa909 View Post
    Originally Posted by pandy View Post
    Originally Posted by loa909 View Post
    so am i clear in that this script does all i need like enhance audio, enhance video, and also blurs subtitles or am I completely wrong as all this is too much for my brain LOL
    Yes, however video enhance is marginal (limited deblocking and limited deringing, IMHO beter than nothing if we recompress video).
    when you say recompress video do you mean like zip it up like winrar etc. then use that script, Im sure I am completely wrong if so how do you recompress it. I believe this script is in case you want to enhance audio and sort video, and blur subtitles. all in one, but say you only want to enhance audio or say just blur subtitles
    Then create 3 different batch files - one where audio and video is filtered, second only audio but video is copied losslessly and third where audio is copied losslessly.
    of course you can create single batch where you can select which type of processing is OK but IMHO faster is to use 3 different scripts than single script with selection.
    Quote Quote  
  21. Member loa909's Avatar
    Join Date
    Mar 2007
    Location
    United Kingdom
    Search Comp PM
    Anyway I would just like to thank you very much for all your help. But this is way beyond me. But will use your script
    Quote Quote  
  22. Glad if you finding this useful.

    Bellow 3 scripts.

    Audio + Video processing script:

    Code:
    @setlocal
    
    @echo Audio + Video processing
    
    @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=23
    
    @rem audio bitrate
    @set ab=192
    
    @SET x264opts="crf=%vq%:level=4.0:qpmin=12:vbv_maxrate=19999:vbv_bufsize=9999:ref=3:bframes=3:rc-lookahead=30: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"
    
    @rem delogo filter settings
    @set blurlogo=delogo=x=70:y=292:w=146:h=46
    
    @set vproc="pp=ac,%blurlogo%,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"
    @set aproc="pan=stereo|FL < FL+1.414FC+0.5BL+0.5SL+0.25LFE+0.125BR|FR < FR+1.414FC+0.5BR+0.5SR+0.25LFE+0.125BL,dynaudnorm=p=1/sqrt(2):m=100:s=20"
    
    @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 aac -b:a %ab%k -f matroska "%~n1_delogodynaudio.mkv"
    
    @endlocal
    @pause
    Audio only processing, video is copied losslessly:

    Code:
    @setlocal
    
    @echo Audio processing, video is copied losslesly
    
    @rem folder where ffmpeg.exe is located
    @set FF=C:\ffmpeg-3.4-win64-static\bin
    @set PATH=%FF%;%PATH%
    
    @set filename=%1
    
    @rem audio bitrate
    @set ab=192
    
    @set aproc="pan=stereo|FL < FL+1.414FC+0.5BL+0.5SL+0.25LFE+0.125BR|FR < FR+1.414FC+0.5BR+0.5SR+0.25LFE+0.125BL,dynaudnorm=p=1/sqrt(2):m=100:s=20"
    
    @ffmpeg.exe -hide_banner -v 32 -stats -y -i "%filename%" -c:v copy -af %aproc% -c:a aac -b:a %ab%k -f matroska "%~n1_dynaudio.mkv"
    
    @endlocal
    @pause
    This script if for video processing, audio will be copied losslessly:

    Code:
    @setlocal
    
    @echo Video processing, audio is copied losslessly
    
    @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=23
    
    @SET x264opts="crf=%vq%:level=4.0:qpmin=12:vbv_maxrate=19999:vbv_bufsize=9999:ref=3:bframes=3:rc-lookahead=30: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"
    
    @rem delogo filter settings
    @set blurlogo=delogo=x=70:y=292:w=146:h=46
    
    @set vproc="pp=ac,%blurlogo%,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% -c:a copy -f matroska "%~n1_delogo.mkv"
    
    @endlocal
    @pause
    Edited on forum editor, hope everything is fine, please test it - if there is any error i will try to fix it.
    Last edited by pandy; 26th Nov 2017 at 06:27. Reason: fixed errors in scripts, scripts are tested and working OK - sorry for errors
    Quote Quote  
  23. Member loa909's Avatar
    Join Date
    Mar 2007
    Location
    United Kingdom
    Search Comp PM
    Ok so the 1st script will check Audio + Video I see you have also included the delogo script. so am i correct in saying this will also blur subtitles as well as checking audio and video

    2nd script checks just audio, not video or subtitles

    and the 3rd script checks just audio and also subtitles


    or am i completely wrong. I thank you so much for all this. I dont have any movies yet to test them on but I will do soon as I get some
    Quote Quote  
  24. Originally Posted by loa909 View Post
    Ok so the 1st script will check Audio + Video I see you have also included the delogo script. so am i correct in saying this will also blur subtitles as well as checking audio and video

    2nd script checks just audio, not video or subtitles

    and the 3rd script checks just audio and also subtitles


    or am i completely wrong. I thank you so much for all this. I dont have any movies yet to test them on but I will do soon as I get some
    1-st script process audio AND video (by processing i mean any filtering is allowed, it can be for audio level normalization, it can be video delogo filter)
    2-nd will process (filtering) Only Audio, video stream will be copied (so no filtering applied to video)
    3-rd will process (filtering) Only Video, audio stream will be copied.
    By copying i understand lossless process to copy data from source to target.
    Each script has short name displayed on screen (check text after @echo - should be in 2 second visible line (3-rd physical) line of script, under @setlocal command).
    I can imagine some small improvements (increase robustness when you process only video or audio with first script but this is future).
    Quote Quote  
  25. Member loa909's Avatar
    Join Date
    Mar 2007
    Location
    United Kingdom
    Search Comp PM
    ok i will test these when i get a movie to use on them

    your help has been invaluable to me. so cant thank you enough
    Quote Quote  
  26. Originally Posted by loa909 View Post
    ok i will test these when i get a movie to use on them

    your help has been invaluable to me. so cant thank you enough
    NP, glad to help, good luck!
    Quote Quote  



Similar Threads