daveyboy Posted February 5, 2010 Posted February 5, 2010 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?.. Ta muchly.............
mac_shinobi Posted February 5, 2010 Posted February 5, 2010 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?.. Ta muchly............. If you go to google and type the following or something along the lines of the below 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 Google http://www.edugeek.net/forums/av-multimedia-related/39694-convert-xvid-avi-windows-media-9-a.html
srochford Posted February 5, 2010 Posted February 5, 2010 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) const sLog="c:\temp\transcode.log" const sExtension=".mp4" const sRecordings="c:\recordings" set oShell=createobject("wscript.shell") set oFSO=createobject("scripting.filesystemobject") if not ofso.fileexists(sLog) then set oLog=ofso.createtextfile(sLog) else set oLog=ofso.opentextfile(sLog,8) end if set oFolder=ofso.getfolder(sRecordings) for each osubFolder in oFolder.subfolders for each oFile in oSubFolder.files Encode oFile next next for each oFile in oFolder.files encode oFile next oLog.close sub Encode(oFile) sExt=lcase(oFso.getextensionname(oFile)) if sExt="ts" then sTitle=ofso.getbasename(oFile) 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 & """" oLog.writeline sCmd oShell.run sCmd,,true 'this line is destructive!!! 'ofso.deletefile sInput,true 'the line above is destructive!!! end if end if end sub 1
daveyboy Posted February 5, 2010 Author Posted February 5, 2010 Steve, thank you very much - I will be looking at this later today.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now