Showing posts with label ffmpeg. Show all posts
Showing posts with label ffmpeg. Show all posts

Sunday, October 28, 2012

Updated MP4 to MP3 Script



Wanted to add some metadata to the mp3 I created from mp4s.
so. But for some reason yet to be investigated windows 8 cant seem to find my metadata.
VLC is happy.


REM FORMAT REQ <name-nospace><space><minus><space><songname><.mp4ext>
REM EG 'coolkids - i like to rock.mp4'
for /f "tokens=1,* delims=-" %%a in ('dir *.mp4 /b') do (call :makemusic %%a "%%b")
goto :eof

:makemusic
set str=%2%
set artist=%1%
REM %str:~2,-5% is used to strip the quotemarks and filename
set title=%str:~2,-5%

REM UPDATE WITH YOUR CORRECT PATH TO FFMPEG
G:\music\ffmpeg.exe -i "%1 - %title%.mp4" -vn -ar 44100 -ac 2 -ab 192000 -f mp3 -metadata title="%title%" -metadata artist="%artist%" "%1 - %title%.mp3"
REM <need command that will allow normalise the sound levels> :eof


Tuesday, July 24, 2012

ffmpeg speed, scale and cut\split


Speed it up
ffmpeg.exe -i "mevideo.mp4" -an -vf "setpts=0.1*PTS"  lols.mp4
scale 50% and cut\split after 127 sec
ffmpeg.exe -ss 0 -t 127 -i Lols.mp4 -vf scale=iw/2:-1 test1.mp4

should of done step 2 in 1 go, but gave my cpu something to do..

Sunday, March 18, 2012

batch ffmpeg convert mp4 mp3

Not my best FOR loop, quick and nasty.
Had a stack of mp4 videos to convert for the ride home.

mp4mp3.cmd <batch file>

for /f "delims=." %%a in ('dir *.mp4 /b') do G:\music\ffmpeg.exe -i "%%a.mp4" -vn -ar 44100 -ac 2 -ab 192000 -f mp3 "%%a.mp3"