Published Tuesday, May 06, 2008 3:43 AM by mtaulty

Uploading Videos to Silverlight Streaming

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.


Filed Under: ,

# SilverlightShow.net @ Friday, May 09, 2008 12:40 AM

<p>I wanted to upload some videos to Silverlight S

SilverlightShow.net

# Wöchentliche Rundablage: ASP.NET MVC, Silverlight 2, TDD, WPF, jQuery… | Code-Inside Blog @ Wednesday, May 14, 2008 4:49 AM

PingBack from http://code-inside.de/blog/2008/05/14/wchentliche-rundablage-aspnet-mvc-silverlight-2-tdd-wpf-jquery/

Wöchentliche Rundablage: ASP.NET MVC, Silverlight 2, TDD, WPF, jQuery… | Code-Inside Blog

# Weekly Links: ASP.NET MVC, Silverlight 2, TDD, WPF, jQuery… | Code-Inside Blog International @ Wednesday, May 14, 2008 4:51 AM

PingBack from http://code-inside.de/blog-in/2008/05/14/weekly-links-aspnet-mvc-silverlight-2-tdd-wpf-jquery/

Weekly Links: ASP.NET MVC, Silverlight 2, TDD, WPF, jQuery… | Code-Inside Blog International