LAPINPT

MP4 to MKV BATCH

Jul 28th, 2013
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.43 KB | None | 0 0
  1. @echo off
  2.  
  3. set mkvmerge="D:\Apps\MKVToolnix\mkvmerge.exe"
  4.  
  5. for /F "delims=" %%M in ('dir /b *.mp4') do (
  6. IF EXIST %%M CALL :MP4MERGE %%M
  7. )
  8.  
  9. GOTO END
  10.  
  11. :MP4MERGE
  12. set source=%~nx1
  13. set target=%~n1.mkv
  14. %mkvmerge% -o "E:\%target%" --track-name 0:"" --compression 0:none --track-name 1:""  --compression 1:none --no-global-tags "%source%" --title ""
  15.  
  16. timeout 1 >NUL
  17.  
  18. :: CLEANUP
  19. IF EXIST "E:\%target%" (  
  20. RM -f "%source%"
  21. )
  22.  
  23. :END
Advertisement
Add Comment
Please, Sign In to add comment