Advertisement
KaneStaff

LipSyncSnip.bat

Oct 15th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.95 KB | None | 0 0
  1. @echo off
  2.  
  3. REM get video id
  4. REM tMwhl4IrPNc
  5. set /p VID=Enter Video ID:
  6.  
  7. REM download the file or playlist
  8. SET start=https://www.youtube.com/watch?v=
  9. SET url=%start%%VID%
  10.  
  11. youtube-dl --extract-audio --audio-format wav --audio-quality 0 --yes-playlist -o %%(id)s.%%(ext)s %url%
  12.  
  13. REM get start and end times
  14. REM 00:31
  15. set /p START=Enter clip start time MM:SS:
  16. REM 00:49
  17. set /p END=Enter clip end time MM:SS:
  18.  
  19. REM trim the file down to size
  20. ffmpeg -i %VID%.wav -ss 00:%START%.00 -to 00:%END%.00 -c copy %VID%trim.wav
  21.  
  22. REM get the length of the clip
  23. ffprobe -i %VID%trim.wav -show_entries stream=codec_type,duration -of compact=p=0:nk=1
  24.  
  25. REM get fade times
  26. REM 1
  27. set /p FADEIN=Enter fade in duration:
  28. REM 17
  29. set /p FADEOUTS=Enter fade out start time:
  30. REM 1
  31. set /p FADEOUTD=Enter fade out duration:
  32.  
  33. REM filter fade in and out
  34. ffmpeg -i %VID%trim.wav -af "afade=t=in:st=0:d=%FADEIN%,afade=t=out:st=%FADEOUTS%:d=%FADEOUTD%" %VID%clip.wav
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement