Aurigma Forums
»
Legacy Products
»
Archive
»
Other Products
»
MediaProcessor can open the remote file ??
Rank: Newbie
Groups: Member
Joined: 10/6/2008(UTC) Posts: 1
|
hi,
I downloaded the Aurima Graphics Mill Eval version for the test case and I am really interested in MediaProcessor..
I have a small media site where I would like to extract the thumbnail from the wmv file, but the problem remains as wmv media file is located on CDN server and the application code remains on a webserver..
Is there any way I can stream the file from the CDN and get the thumb images as well as the metadata info using the mediaprocessor ??
I am not sure as how to proceed...plz help...
Thanks,
Nir.
|
|
|
|
Rank: Advanced Member
Groups: Member
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hi Nir, You can load .wmv files from CDN server to Media Processor. First of all you should create request and response for your file. The second step is to get stream from response and pass it to WMReader. How to do it you can see below: Code:
String sURL = "http://yourDomain/YourFile.wmv";
System.Net.WebRequest request = System.Net.WebRequest.Create(sURL);
System.Net.WebResponse response = request.GetResponse();
String outputBaseFilename = "d://test.gif";
try
{
//Create the reader
WMReader reader = new WMReader(response.GetResponseStream());
Int32 index = reader.FrameCount/2;
IFrame frame = reader.LoadFrame(index);
//Save the frame using GetThumbnail()
Aurigma.GraphicsMill.Bitmap image = new Aurigma.GraphicsMill.Bitmap();
frame.GetThumbnail(image, 160, 120);
image.Save(outputBaseFilename + @"1.gif");
image.Dispose();
reader.Dispose();
}
catch (System.Exception ex)
{
Console.WriteLine(ex);
}
response.Close();
response = null;
request = null;
}
|
|
|
|
|
Aurigma Forums
»
Legacy Products
»
Archive
»
Other Products
»
MediaProcessor can open the remote file ??
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.