Network and Classroom Management Thread, Avi to wmv script across Home Dirs? in Technical; Did someone have a script to convert avi to wmv (using ffmpeg - I think!) that recurses into sub folders? ...
5th February 2010, 09:52 AM #1
- Rep Power
Avi to wmv script across Home Dirs?
Did someone have a script to convert avi to wmv (using ffmpeg - I think!) that recurses into sub folders? - I can vagley remember someones post about running it on user areas.
Can I find that post? - no. Hummm, must be searching for the wrong thing. Should have gone to a well known high st opticians.
If you have, would you care to share?..
5th February 2010, 09:57 AM #2
If you go to google and type the following or something along the lines of the below
Originally Posted by daveyboy
avi to wmv site:EduGeek.net
search text at the start with a space then the word site with : directly afterwards ie site: then the url of the site you want to search for so in this case EduGeek.net
that way it will search for anything that is related to avi to wmv on edugeek.
something like below
convert xvid (.avi) to windows media 9
5th February 2010, 10:32 AM #3
Something like this will recurse the folders and process them.
I use this to transcode files on my media PC from .ts to .mp4 but the principle is the same - you'll just need to get the right ffmpeg line!
It assumes you're going to convert files under C:\recordings - I'd guess yours will be something like d:\homedirs\year7
It writes a log to c:\temp\transcode.log
It assumes you want an mp4 file - change the line at the top to whatever it needs to be
It looks for .ts files to transcode; change that to whatever extension you're transcoding from.
There's a commented out line at the end to delete the input file; I really, really wouldn't do this - YMMV but I find ffmpeg often fails to complete the transcoding. You're then left with a zero byte output file and no input file if you auto-delete. (I think the problems I have is because the MPG2 transport stream that you record from Freeview is not perfect so this may not be a problem for you)
if not ofso.fileexists(sLog) then
for each osubFolder in oFolder.subfolders
for each oFile in oSubFolder.files
for each oFile in oFolder.files
if sExt="ts" then
sInput=oFile.parentfolder & "\" & oFile.name
sOutput=oFile.parentfolder & "\" & sTitle & ".mp4"
if not ofso.fileexists(sOutput) then
oLog.writeline now & "~" & sTitle
sCmd="c:\utils\ffmpeg.exe -i """ & sInput & """ -b 384k -s qvga -r 25 -aspect 4:3 -vcodec mpeg4 -acodec libfaac -ab 112k -ac 2 """ & sOutput & """"
'this line is destructive!!!
'the line above is destructive!!!
Thanks to srochford from:
mac_shinobi (5th February 2010)
5th February 2010, 11:15 AM #4
- Rep Power
Steve, thank you very much - I will be looking at this later today.
By Mr.Ben in forum AV and Multimedia Related
Last Post: 19th January 2010, 09:07 AM
Last Post: 3rd September 2009, 09:59 PM
By HodgeHi in forum Coding
Last Post: 3rd July 2009, 11:13 AM
By mmoseley in forum Wireless Networks
Last Post: 1st October 2007, 12:57 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)