Advertisement
rodrigopolo

Video Encoding

Jul 11th, 2013
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.37 KB | None | 0 0
  1. @echo off
  2. ::
  3. :: Script for Encoding from:
  4. ::   AVI: Any Video codec, WAV 6 channels
  5. :: To:
  6. ::   M4V: AVC H.264 AC3 5.1
  7. ::
  8. :: ----------------------------------------------------------------------------
  9. :: WARNING!
  10. :: DONT TOUCH OR CHANGE NOTHING BELOW THIS LINE!
  11. :: ----------------------------------------------------------------------------
  12.  
  13.  
  14. IF %1.==. GOTO empty
  15.  
  16. :: Batch path
  17. SET THIS_PATH=%~d0%~p0
  18. SET B=%THIS_PATH%bin\
  19. for %%a in (%*) do "%B%HandBrakeCLI.exe" -i "%%~a" -t 1 --angle 1 -c 1 -o "%%~da%%~pa%%~na.v.m4v" -f mp4 -4 --loose-anamorphic --modulus 2 -e x264 -q 20 -r 30 --pfr -a none --audio-fallback ffac3 --x264-profile=high --x264-tune="animation" --h264-level="4.0" --verbose=1 && ^
  20. "%B%ffmpeg" -i "%%~a" -vn -acodec copy "%%~da%%~pa%%~na.wav" && ^
  21. "%B%aften.exe" "%%~da%%~pa%%~na.wav" "%%~da%%~pa%%~na.ac3" && ^
  22. "%B%MP4Box.exe" -ipod -brand M4VH -hint -keep-sys -add "%%~da%%~pa%%~na.v.m4v#1:fps=30.000" -add "%%~da%%~pa%%~na.ac3:lang=en" -new "%%~da%%~pa%%~na.m4v" && ^
  23. del "%%~da%%~pa%%~na.wav" && ^
  24. del "%%~da%%~pa%%~na.ac3" && ^
  25. del "%%~da%%~pa%%~na.v.m4v"
  26.  
  27. echo All done!
  28.  
  29. GOTO end
  30. :empty
  31. echo.
  32. echo  ERROR!
  33. echo  No input file specified.
  34. echo  You can set an input by draggin a video file to this script or by calling
  35. echo  the script on the command prompt and setting the full file path as
  36. echo  the first param.
  37. echo.
  38. pause
  39. :end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement