- August 29, 2009
- 1,730
- 1,124
- Home Country
- Netherlands
- Thread starter
- #21
Re: [Beta] MPWebStream: Stream TV over the internet
Mike, I've done the improvements you requested See attached DLL. Source is available here. Code example:
Note that NamedPipe as an input method is a bit unstable for live TV. There are probably some bugs, but overall it's quite usable.
Note to current MPWebStream users: you don't need this, this is just for application developers who want to integrate transcoding into their own application.
Mike, I've done the improvements you requested See attached DLL. Source is available here. Code example:
Code:
using MPWebStream.MediaTranscoding;
class MPWebStreamExample {
private void log(string message) {
// do something with it
}
public void example(HttpContext context) {
Log.RegisterWriter(new Log.LogWrite(MPWebStreamExample.log)); // you can leave this out but I need the log to debug if you've problems :)
TranscoderProfile transcoder = new TranscoderProfile();
transcoder.UseTranscoding = true; // or false for direct streaming, remove lines below
transcoder.Transcoder = "<path to transcoder>";
transcoder.Parameters = "<parameters for trasncoder>";
transcoder.InputMethod = TransportMethod.Filename;
transcoder.OuputMethod = TransportMethod.NamedPipe;
TranscodingStreamer streamer = new TranscodingStreamer("<path to source file>", transcoder);
streamer.TranscodeToClient(context.Response); // returns after client disconnect or end of media
}
}
Note to current MPWebStream users: you don't need this, this is just for application developers who want to integrate transcoding into their own application.