I try to convert any video to .flv format in asp.net. I have hosted my web application into shared environment with "Trust Level = Low", In that i am using one executalbe file "ffmpeg" to convert any video file into *.FLV format. but they need Full Trest level
I need help on converting any video file to FLV file format in prgrammatical way. I am playing this FLV开发者_开发百科 file format in any browser like internet explorer.... what should i do without using any third party software tools.? is there any Dll libraries or sample codes....
how to solve this problem ?
This require flvtool2 tool to be installed on your box.
ffmpeg -i video.avi -ar 22050 -ab 32 -f flv -s 320×240 – | flvtool2 -U stdin video.flv
You dont need to elevate your trust level and put the application in risk. Instead, configure proper Code Access Security (CAS) policies that you need to run the files you want with proper access permissions.
This is going to get very tricky -- my bet is that your hosting environment is not suitable for video encoding. Especially if you want anything near realtime.
Personally, I'd use a service to handle this rather than ginning it up myself. If you just want to convert, check out Hey!Watch for example. Lots of options out there if you want to offload more details.
精彩评论