Mike Taulty's Blog
Bits and Bytes from Microsoft UK
Uploading Videos to Silverlight Streaming

Blogs

Mike Taulty's Blog

Elsewhere

I wanted to upload some videos to Silverlight Streaming. There's an area of the admin site that says "Manage Videos" but, unfortunately, it only lets you upload one video at a time through the web page so that could prove painful if you've a few videos.

There's an API to Silverlight Streaming so I wrote a bit of code to do my upload for me.

image

It's really, really, really ( REALLY! ;-) ) basic but it might help someone at some point so I've shared it here ( hopefully minus my account id and key ).

Couple of things to add;

  1. If you ask it to upload a lot of files and it errors part way through then it displays a blocking message box. Might not be what you want so maybe change/comment that.
  2. I haven't figured out how to use this to end up with all the videos in a single fileset on Silverlight Streaming. My videos currently all go into their own separate filesets and I've not managed to work out how to get them all into a single fileset. I've a sneaking suspicion that if you want to do that you have to zip them all into one zip file and upload that but that's not-so-practical if you've got a lot of videos.

Update: I've changed the code that's downloadable here. The code now also has a textbox where you can specify the FileSet and all the videos will go into that single FileSet so point (2) above is now redundant although you could easily hack the code back to make it create multiple filesets or perhaps have an option on the UI as to how it's meant to work.


Posted Tue, May 6 2008 3:43 AM by mtaulty
Filed under: ,

Comments

SilverlightShow.net wrote SilverlightShow.net
on Fri, May 9 2008 12:40 AM
<p>I wanted to upload some videos to Silverlight S
Wöchentliche Rundablage: ASP.NET MVC, Silverlight 2, TDD, WPF, jQuery… | Code-Inside Blog wrote Wöchentliche Rundablage: ASP.NET MVC, Silverlight 2, TDD, WPF, jQuery… | Code-Inside Blog
on Wed, May 14 2008 4:49 AM
Weekly Links: ASP.NET MVC, Silverlight 2, TDD, WPF, jQuery… | Code-Inside Blog International wrote Weekly Links: ASP.NET MVC, Silverlight 2, TDD, WPF, jQuery… | Code-Inside Blog International
on Wed, May 14 2008 4:51 AM