modernstudboy

H264 drag & drop ffmpeg based video encoder(multi audio+sub)

Jan 11th, 2016
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. H264 Video Encoder based on ffmpeg via drag and drop.
  2. This will encode movie file that is dropped on this batch with h264 codec and aac audio. Audio is set to 96Kbps at auto frequency rate and video is set to encode at 768Kbps. The resolution is set to output 960xAuto resolution. Everything is in single pass.
  3. Additionally it will encode one more audio stream if available in original movie(e.g eng+jap etc) and one subtitle which it will take from srt file stored in same folder where original movie file is. It will skip 2nd audio stream if not present but it will need srt file mandatorily. If there is no srt present just edit the code and remove srt section. The output will be added in same location where source is with '_h264' tag. Container is mp4.
  4. Dont forget to keep ffmpeg.ext at same location where this batch file is.
  5. ------------------------------------------------------------------------------------------------------------------------------------------
  6. @echo off
  7. title=H264 Drag and drop Encoder
  8. echo.
  9. echo Close the programm and simply drag and drop the video file on this tool to start converting.
  10. echo.
  11. cd /d "%~dp0"
  12. call "ffmpeg.exe" -i "%~f1" -f srt -i "%~dpn1.srt" -map 0:v:0 -c:v libx264 -preset medium -b:v 768k -pass 1 -vf scale=960:-1 -map 0:a:0 -c:a aac -strict experimental -ac 2 -b:a 96k -map 0:a:1? -c:a aac -strict experimental -ac 2 -b:a 96k -map 1:s:0? -c:s mov_text "%~dpn1_h264.mp4"
  13.  
  14. echo.
  15. pause
  16. ------------------------------------------------------------------------------------------------------------------------------------------
Add Comment
Please, Sign In to add comment