views:

113

answers:

1

I'm trying to write a Silverlight application that reads a media file from a database (most likely a .mpeg or .mpg) and play it on the fly using either a Silverlight MediaPlayer or ExpressionMediaPlayer. When I try using Expression Media Player it plays .wmv and .mp4 files but NOT .mpeg or .mpg file extensions. Is this even possible? If so, HOW?!

I tried going a different route originally where I wrote a Service to Encode the file using a LiveJob and then play it on the ExpressionMediaPlayer from the port using mms://localhost:8080 but I couldn't figure out how to use that to Play/Pause the video. It just ran through once and stopped. Any suggestions on that?

I'm using Expression Encoder 3 & Silverlight 4 by the way.

A: 

i think you're out of luck, check out this page from msdn.

You are going to have to re-encode the file if you want it to play in Silverlight.

luke
that's what I thought. I tried going a different route originally where I wrote a Service to Encode the file using a LiveJob and then play it on the ExpressionMediaPlayer from the port using mms://localhost:8080 but I couldn't figure out how to use that to Play/Pause the video. It just ran through once and stopped. Any suggestions on that?
csahni2
sorry, i don't have any experience with LiveJobs, you're probably better off asking a new question about that specifically. Another option would be just to encode all the videos in advance to WMV (or whatever) and then just serve them normally. that will probably be easier in the long run but it really depends on your use case.
luke
i dont have access to the database repository to do that. it all needs to be done on the fly.
csahni2
this is really a different question than the one you asked originally. you should post another question that specifically asks about reencoding media on the fly for silverlight
luke