Convert video for Andriod phone


/ Published in: DOS Batch
Save to your folder(s)

Drag n' drop files on the batch file. Requires ffmpeg, mplayer and wavegain.


Copy this code and paste it in your HTML
  1. @echo off
  2.  
  3. set viddir=%userprofile%\Videos\mobile
  4. set vidwith=480
  5. set vidbitrate=450
  6. set audbitrate=96
  7.  
  8.  
  9. set "arg=%*"
  10. set "arg=%arg:)=^)%"
  11. set "arg=%arg:(=^(%"
  12.  
  13.  
  14. if not exist %viddir% mkdir %viddir%
  15.  
  16. for %%a in (%arg%) do (
  17. cd "%%~pa"
  18. del /f "%temp%\audio.wav"
  19.  
  20. ffmpeg -i "%%~fa" -acodec pcm_s16le -ac 2 "%temp%\audio.wav"
  21. wavegain -r -c -g 8.0 -t -y "%temp%\audio.wav"
  22.  
  23. mencoder "%%~fa" -o "%viddir%\%%~na.[mob].mp4" -audiofile "%temp%\audio.wav" -vf scale=%vidwith%:-10,harddup -lavfopts format=mp4 -faacopts mpeg=4:object=2:raw:br=%audbitrate% -channels 2 -srate 48000 -oac faac -ovc x264 -sws 9 -x264encopts nocabac:level_idc=30:bframes=0:global_header:threads=auto:subq=5:frameref=6:partitions=all:trellis=1:chroma_me:me=umh:bitrate=%vidbitrate% -of lavf
  24. )

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.