engineroom
asked on
FFmpeg help... deleteing original source after convering
Hey all, actually have 2 sections to this question. First i'm uploading a video and converting to FLV after the upload. This works fine, but i'm trying to take a screenshot of the flv after the conversion but it doesn't work. I do have a workaround. I take first a screenshot of the video before the conversion and then proceed to convert the video. This works fine, but i was wondering if you can capture a screen shot AND convert at the same time. 2nd and most importantly, after the conversion is done, is there anyway that i can delete the original file? I've tried deleting it in the code after the ffmpeg line, but the problem is that it deletes the original before it even gets to the conversion part. Any input would be greatly appreciated. Attached is some of the code i'm using. thanx all!
...>>> can i somehow combine the 2 wscript.run's ? and then delete?
set wshell = server.createobject("wscri pt.shell")
wshell.run "ffmpeg -i " & server.MapPath("/videos/" & newFileName) & " -f image2 -t 0.001 -ss 3 " & server.MapPath("/videos/" & videoID & ".jpg")
wshell.run "ffmpeg -i " & server.MapPath("/videos/" & newFileName) & " -y -ar 22050 -ab 32 -f flv -s 320x240 " & server.MapPath("/videos/" & replace(newFileName,ext,". flv"))
set wshell = nothing
'Deletes to fast for conversion.
set fso = server.CreateObject("scrip ting.files ystemobjec t")
fso.deleteFile server.MapPath("/videos/" & newFileName)
set fso = nothing
Thanx all
er
...>>> can i somehow combine the 2 wscript.run's ? and then delete?
set wshell = server.createobject("wscri
wshell.run "ffmpeg -i " & server.MapPath("/videos/" & newFileName) & " -f image2 -t 0.001 -ss 3 " & server.MapPath("/videos/" & videoID & ".jpg")
wshell.run "ffmpeg -i " & server.MapPath("/videos/" & newFileName) & " -y -ar 22050 -ab 32 -f flv -s 320x240 " & server.MapPath("/videos/" & replace(newFileName,ext,".
set wshell = nothing
'Deletes to fast for conversion.
set fso = server.CreateObject("scrip
fso.deleteFile server.MapPath("/videos/" & newFileName)
set fso = nothing
Thanx all
er
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect. Thanx dude!
ASKER
Are you still around? Have a quick question to ask...
http://msdn2.microsoft.com/en-us/library/d5fk67ky.aspx