VideoHelp.com forum archive
http://www.supermediastore.com/



Forum Archive Home -> Linux -> Ffmpeg command to encode ENTIRE DIRECTORY?



Ffmpeg command to encode ENTIRE DIRECTORY?
sumpm1 posted 2008 Sep 04 08:25
I am using ffmpeg from command line in Linux. I want to encode a bunch of audio files. I was wondering if anyone knows a ffmpeg command that will just encode everything in a given folder?

Thanks



Baldrick posted 2008 Sep 04 08:53
Convert all files to mp3(you probably want to add some settings also):
:
for file in /folder/*; do `ffmpeg -i $file $file.mp3`;done


edit: updated the code, this should work better.



Cazz posted 2008 Sep 27 08:40
Hi
I trying to change the code a little because I want the output file create in a diffrent directory.
but the file is whole address to the file so I have to somehow remove the old directory but not the filename

/update
to make it easy for me I just change the code a little

:
for file in *.avi; do `ffmpeg -i $file /newfolder/$file.avi`;done


so now I just have to put the file in that folder of movie I want to convert and run :)




Login/Register to our forum to be able to post here.








About   Advertise   Forum Archive   RSS Feeds   Statistics