Return to Snippet

Revision: 45778
at May 8, 2011 11:23 by Keef


Updated Code
@echo off

set viddir=%userprofile%\Videos\mobile
set vidwith=480
set vidbitrate=450
set audbitrate=96


set "arg=%*"
set "arg=%arg:)=^)%"
set "arg=%arg:(=^(%"


if not exist %viddir% mkdir %viddir%

for %%a in (%arg%) do (
	cd "%%~pa"
	del /f "%temp%\audio.wav"
	
	ffmpeg -i "%%~fa" -acodec pcm_s16le -ac 2 "%temp%\audio.wav"
	wavegain -r -c -g 8.0 -t -y "%temp%\audio.wav"
	
	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
)

Revision: 45777
at May 7, 2011 14:28 by Keef


Initial Code
@echo off

set "arg=%*"
set "arg=%arg:)=^)%"
set "arg=%arg:(=^(%"

for %%a in (%arg%) do (
	mencoder "%%~fa" -o "%%~fa.[mob].mp4" -vf scale=480:-10,harddup -lavfopts format=mp4 -faacopts mpeg=4:object=2:raw:br=96 -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=450 -of lavf
)

Initial URL

                                

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

Initial Title
Convert video for Andriod phone

Initial Tags

                                

Initial Language
DOS Batch