LAPINPT

H264 to MP4

Jul 28th, 2013
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.83 KB | None | 0 0
  1. @echo off
  2.  
  3. :: MUX h264 with m4a or aac to MP4
  4.  
  5. set MP4Box="D:\Apps\mp4box\MP4Box.exe"
  6.  
  7. IF EXIST "%~1\" (
  8. echo. & echo Select Files Not Folders
  9. GOTO EOF
  10. )
  11.  
  12. IF [%2]==[] echo. & echo You Just Picked a Single File & echo. & timeout 8 >NUL
  13. CD /D "%~dp1"
  14.  
  15. FOR %%F IN (%*) DO (
  16.    IF [%%~xF]==[.h264] set videof=%%~nxF
  17.    IF [%%~xF]==[.h264] set movien=%%~nF
  18.    IF [%%~xF]==[.m4a] set audiof=%%~nxF
  19.    IF [%%~xF]==[.aac] set audiof=%%~nxF
  20. )
  21.  
  22. set release=720p.BRRip.x264.mp4
  23. set frames=23.976
  24.  
  25. IF EXIST "%movien%*-PT*" (
  26.    set output=%movien%.PORTUGUESE.%release%
  27.    set idiom=pt
  28. ) ELSE (
  29.    set output=%movien%.%release%
  30.    set idiom=eng
  31. )
  32.  
  33. echo Video: %videof%
  34. echo Audio: %audiof%
  35. echo Target: %output%
  36.  
  37. %MP4Box% -new -add %videof%:fps=%frames%:lang=%idiom%:name="" -add %audiof%:lang=%idiom%:name="" %output%
  38.  
  39. :EOF
Advertisement
Add Comment
Please, Sign In to add comment