Нема описа

JTX-Encoder.bat 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. @echo off
  2. title= ---- Encodeur du JTX ----
  3. color 0C
  4. cls
  5. echo ******************************************************
  6. echo ****************** Encodeur du JTX *******************
  7. echo ******************************************************
  8. echo.
  9. echo Ce programme encode les vid‚os du dossier dans lequel
  10. echo il est plac‚, puis transfŠre les fichiers originaux
  11. echo dans un dossier Originaux/.
  12. echo Aucune vid‚o n'est donc supprim‚e.
  13. echo.
  14. echo 1 : FullHD 1920x1080 8 Mbits/s 25 i/s
  15. echo 2 : HD 1280x720 3 Mbits/s 25 i/s
  16. echo 3 : Web 854x480 1.5 Mbits/s 25 i/s
  17. echo 4 : Archives 720x576 1.5 Mbits/s 25 i/s
  18. choice /C 1234 /N /M "S‚lectionez le r‚glage en appuyant sur [1], [2], [3] ou [4] :"
  19. echo.
  20. if errorlevel 4 (
  21. echo ********************************************************
  22. echo Encodage au format Archives : 720x576 1.5 Mbits/s 25 i/s
  23. echo ********************************************************
  24. call :encoding 4
  25. )
  26. if errorlevel 3 (
  27. echo ***************************************************
  28. echo Encodage au format Web : 854x480 1.5 Mbits/s 25 i/s
  29. echo ***************************************************
  30. call :encoding 3
  31. )
  32. if errorlevel 2 (
  33. echo ******************************************
  34. echo Encodage en HD : 1280x720 3 Mbits/s 25 i/s
  35. echo ******************************************
  36. call :encoding 2
  37. )
  38. if errorlevel 1 (
  39. echo ***********************************************
  40. echo Encodage en FullHD : 1920x1080 8 Mbits/s 25 i/s
  41. echo ***********************************************
  42. call :encoding 1
  43. )
  44. goto:eof
  45. :encoding
  46. echo.
  47. md Originaux
  48. color 0a
  49. for %%a in (*.*) do (
  50. call :encodingcheck %1 "%%a"
  51. )
  52. goto:end
  53. :encodingcheck
  54. set toencode="false"
  55. set extension="%~x2"
  56. if %extension%==".mkv" set toencode="true"
  57. if %extension%==".MKV" set toencode="true"
  58. if %extension%==".avi" set toencode="true"
  59. if %extension%==".AVI" set toencode="true"
  60. if %extension%==".mpg" set toencode="true"
  61. if %extension%==".MPG" set toencode="true"
  62. if %extension%==".webm" set toencode="true"
  63. if %extension%==".WEBM" set toencode="true"
  64. if %extension%==".mp4" set toencode="true"
  65. if %extension%==".MP4" set toencode="true"
  66. if %extension%==".mov" set toencode="true"
  67. if %extension%==".MOV" set toencode="true"
  68. if %extension%==".mts" set toencode="true"
  69. if %extension%==".MTS" set toencode="true"
  70. if %extension%==".mxf" set toencode="true"
  71. if %extension%==".MXF" set toencode="true"
  72. if %toencode%=="true" (
  73. if %1==1 call :fullhd %2
  74. if %1==2 call :hd %2
  75. if %1==3 call :web %2
  76. if %1==4 call :archives %2
  77. )
  78. goto:eof
  79. :fullhd
  80. title= ---- Encodeur du JTX ---- Encodage de %1 en FullHD
  81. move %1 Originaux/
  82. ffmpeg.exe -i Originaux/%1 -threads 0 -c:v libx264 -b:v 8M -maxrate 12M -r 25 -s 1920x1080 -x264opts level=4 -c:a aac -strict experimental -b:a 192k -y "%~np1.mp4"
  83. goto:eof
  84. :hd
  85. title= ---- Encodeur du JTX ---- Encodage de %1 en HD
  86. move %1 Originaux/
  87. ffmpeg.exe -i Originaux/%1 -threads 0 -c:v libx264 -b:v 3M -maxrate 4.5M -r 25 -s 1280x720 -x264opts level=3.1 -c:a aac -strict experimental -b:a 192k -y "%~np1.mp4"
  88. goto:eof
  89. :web
  90. title= ---- Encodeur du JTX ---- Encodage de %1 au format Web
  91. move %1 Originaux/
  92. ffmpeg.exe -i Originaux/%1 -threads 0 -c:v libx264 -b:v 1.5M -maxrate 2.25M -r 25 -s 854x480 -x264opts level=3 -c:a aac -strict experimental -b:a 192k -y "%~np1.mp4"
  93. goto:eof
  94. :archives
  95. title= ---- Encodeur du JTX ---- Encodage de %1 au format Archives
  96. move %1 Originaux/
  97. ffmpeg.exe -i Originaux/%1 -threads 0 -c:v libx264 -b:v 1.5M -maxrate 2.25M -r 25 -s 720x576 -x264opts level=3 -c:a aac -strict experimental -b:a 192k -y "%~np1.mp4"
  98. goto:eof
  99. :end
  100. color 0b
  101. title= ---- Encodeur du JTX ---- Encodage termine
  102. cls
  103. echo.
  104. echo ***************************
  105. echo **** Fin de l'encodage ****
  106. echo ***************************
  107. echo.
  108. echo Les fichiers originaux se trouvent dans le dossier
  109. echo Originaux/
  110. echo.
  111. echo Merci d'avoir choisi l'encodeur du JTX !
  112. echo.
  113. Pause
  114. exit