home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
WebService and Mobile Access
[WebService] General Media Access Webservice
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Oxan" data-source="post: 747264" data-attributes="member: 97484"><p>Adding live streaming turns out to be pretty simple, just adding this code to TelevisionController.cs (and a reference to the development version of MPWebStream) and it's working:</p><p>[code] public ActionResult Stream() </p><p> {</p><p> TranscoderProfile profile = new TranscoderProfile() {</p><p> UseTranscoding = false,</p><p> MIME = "video/MP2T"</p><p> };</p><p> WebChannelBasic channel = ServiceInstance.GetChannelBasicById(301);</p><p> string username = "webmediaportal-" + System.Guid.NewGuid().ToString("D");</p><p> WebVirtualCard card = ServiceInstance.SwitchTVServerToChannelAndGetVirtualCard(username, channel.IdChannel);</p><p></p><p> TranscodingStreamer streamer = new TranscodingStreamer(card.RTSPUrl, card.TimeShiftFileName, profile);</p><p> streamer.TranscodeToClient(Response);</p><p> ServiceInstance.CancelCurrentTimeShifting(username);</p><p> return new EmptyResult();</p><p> }[/code]</p><p>Of course there's more code needed to read configuration, arguments, handle authentication and provide some flexibility, but this is the basic. If you're okay with it I'm going to implement the rest and create a patch for it.</p><p></p><p>For the rest: great! I have some time to work on the refactoring too, so just ask if you need help <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p></blockquote><p></p>
[QUOTE="Oxan, post: 747264, member: 97484"] Adding live streaming turns out to be pretty simple, just adding this code to TelevisionController.cs (and a reference to the development version of MPWebStream) and it's working: [code] public ActionResult Stream() { TranscoderProfile profile = new TranscoderProfile() { UseTranscoding = false, MIME = "video/MP2T" }; WebChannelBasic channel = ServiceInstance.GetChannelBasicById(301); string username = "webmediaportal-" + System.Guid.NewGuid().ToString("D"); WebVirtualCard card = ServiceInstance.SwitchTVServerToChannelAndGetVirtualCard(username, channel.IdChannel); TranscodingStreamer streamer = new TranscodingStreamer(card.RTSPUrl, card.TimeShiftFileName, profile); streamer.TranscodeToClient(Response); ServiceInstance.CancelCurrentTimeShifting(username); return new EmptyResult(); }[/code] Of course there's more code needed to read configuration, arguments, handle authentication and provide some flexibility, but this is the basic. If you're okay with it I'm going to implement the rest and create a patch for it. For the rest: great! I have some time to work on the refactoring too, so just ask if you need help :) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
WebService and Mobile Access
[WebService] General Media Access Webservice
Contact us
RSS
Top
Bottom