説明なし

JTX-Encoder.bat 3.7KB

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