Jump to content

Direct play of Nextpvr live tv


Recommended Posts

Posted

Because it's not needed.

 

I will try to check it again. :)

arrbee99
Posted

Just wondering if maybe there was any progress with this ? could send logs of it not working, if it'll help.

Posted

Didn't had the time yet...

arrbee99
Posted

Sounds more than fair enough :)

 

May I also ask  - it should be doable (nothing insurmountable) ?

 

Admittedly I would use it for OTA NZTV, which can be somewhat underwhelming on occasion, but would be nice....

  • 3 weeks later...
Posted

What were the details in the PM. Happy to look at code if I can kill transcoding to devices that can handle the native streams.

  • 2 weeks later...
Posted

@@sytone

 

This is the input from the PM

 

Here is the code to probe  a live tv stream.

All credits go to t.andre!

 

In your LiveTvService.cs or Plugin.cs constructor add IMediaEncoder _mediaEncoder.

probeUrl: is the stream url.

Source : for dvbLink is LiveTV or Recording, I use the same code to probe the two options. It’s just for logging.

 

private async Task ProbeStream(MediaSourceInfo mediaSourceInfo, string probeUrl, string source, CancellationToken cancellationToken)

        {

            Plugin.Logger.Info("Probe stream for {0}", source);

            MediaInfoRequest req = new MediaInfoRequest

            {

                MediaType = Model.Dlna.DlnaProfileType.Video,

                InputPath = probeUrl,

                Protocol = MediaProtocol.Http,

                ExtractChapters = false,

                VideoType = VideoType.VideoFile,

            };

 

            var originalRuntime = mediaSourceInfo.RunTimeTicks;

            Stopwatch stopWatch = new Stopwatch();

            stopWatch.Start();

            MediaInfo info = await _mediaEncoder.GetMediaInfo(req, cancellationToken).ConfigureAwait(false);

            stopWatch.Stop();

            TimeSpan ts = stopWatch.Elapsed;

            string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10);

            Plugin.Logger.Info("Probe RunTime " + elapsedTime);

 

            if (info != null)

            {

                mediaSourceInfo.Bitrate = info.Bitrate;

                mediaSourceInfo.Container = info.Container;

                mediaSourceInfo.Formats = info.Formats;

                mediaSourceInfo.MediaStreams = info.MediaStreams;

                mediaSourceInfo.RunTimeTicks = info.RunTimeTicks;

                mediaSourceInfo.Size = info.Size;

                mediaSourceInfo.Timestamp = info.Timestamp;

                mediaSourceInfo.Video3DFormat = info.Video3DFormat;

                mediaSourceInfo.VideoType = info.VideoType;

                mediaSourceInfo.RequiresClosing = true;

                mediaSourceInfo.RequiresOpening = true;

                mediaSourceInfo.SupportsDirectPlay = true;

                mediaSourceInfo.SupportsDirectStream = true;

                mediaSourceInfo.SupportsTranscoding = true;

 

 

                mediaSourceInfo.DefaultSubtitleStreamIndex = null;

 

                if (!originalRuntime.HasValue)

                {

                    mediaSourceInfo.RunTimeTicks = null;

                }

                var audioStream = mediaSourceInfo.MediaStreams.FirstOrDefault(i => i.Type == Model.Entities.MediaStreamType.Audio);

 

                if (audioStream == null || audioStream.Index == -1)

                {

                    mediaSourceInfo.DefaultAudioStreamIndex = null;

                }

                else

                {

                    mediaSourceInfo.DefaultAudioStreamIndex = audioStream.Index;

                }

            }

            else

            {

                Plugin.Logger.Error("Cannot probe {0} stream", source);

            }

        }

 

 

This is how it would look in the MediaPortal plugin:

https://github.com/p...45376a5884a55de

arrbee99
Posted

Am quietly hoping it will work soon  :)

arrbee99
Posted

Would anyone be interested in any logs ?

  • 4 months later...
Posted

Was any progress made with this?  Recently moved from wmc/windows 7 to nextpvr/windows 10. Getting the same incredibly long delay before emby live tv plays (web version).  Emby Theater not playing at all.

  • 2 weeks later...
Posted

Was any progress made with this?  Recently moved from wmc/windows 7 to nextpvr/windows 10. Getting the same incredibly long delay before emby live tv plays (web version).  Emby Theater not playing at all.

Re-installed Nextpvr 3.7.7, Emby Theater now working, which is a bonus, but is still transcoding.  Even (in my limited understanding) tried making the live tv buffer a network share.  Fingers crossed something gets worked out.

arrbee99
Posted

Re-installed Nextpvr 3.7.7, Emby Theater now working, which is a bonus, but is still transcoding.  Even (in my limited understanding) tried making the live tv buffer a network share.  Fingers crossed something gets worked out.

Just wondering if I could ask if you did anything in particular to get NPVR working in Theater  - also tried re-installing 3.7.7 after a 4 month gap and its the same as before for me, works in Chrome, but in Theater just get a spinning circle.

Posted

Just wondering if I could ask if you did anything in particular to get NPVR working in Theater  - also tried re-installing 3.7.7 after a 4 month gap and its the same as before for me, works in Chrome, but in Theater just get a spinning circle.

No. It would appear to have been random luck.  Hasn't worked since.  Web version is still pretty sluggish.

arrbee99
Posted

Oh well, that's a pity. Mediaportal worked OK for me but I was, and still am, hoping that NPVR will work at some point. Maybe I'll ask on the NPVR forum.

Posted

can you play this url in mpc?

http://localhost:8866/live?channeloid=7148&client=MB3.1
Posted

Hey luke. That stream plays fine through vlc, but dont know how to open it in mpc

arrbee99
Posted

Asked at NPVR forum http://forums.nextpvr.com/showthread.php?58532-Emby-Theater butthis seems to be the best place. Still not working in ET but I see it plays TV in 7llusions Windows app, though trancsoding...

 

57b9136830894_EmbyTVinWindowsapp.jpg

 

Though I could try changing ET's video playback settings, but if I change them they don't stick - they revert to Auto.

 

Any logs required / ideas ?

Posted

I can easily force transcoding and have it work

Posted

Asked at NPVR forum http://forums.nextpvr.com/showthread.php?58532-Emby-Theater butthis seems to be the best place. Still not working in ET but I see it plays TV in 7llusions Windows app, though trancsoding...

 

57b9136830894_EmbyTVinWindowsapp.jpg

 

Though I could try changing ET's video playback settings, but if I change them they don't stick - they revert to Auto.

 

Any logs required / ideas ?

 

 

Does it play in windows media player via file -> open url? Just to give you a point of comparison, the hd homerun url works.

arrbee99
Posted

Sorry have no idea what to type in where it asks for the url in wmp. Could you please explain what it would typically look like or where I would find it.

Posted

Check the last page for my question.

arrbee99
Posted

Sorry, saw that the other day but forgot about it. Anyway, just gives an error.....

 

57b91cbb9bb49_EmbyWMPerror.jpg

 

to this...

 

57b91d3c786c9_EmbyWMPerrorrequest.jpg

arrbee99
Posted

Tried the same in MPC and it says 'opening....' for a few seconds, then 'failed to render the file'.

Posted

Then I would ask next pvr to get their url working with windows media player. not only will it fix it for emby theater but it will make playback much easier with any other player on windows. We built a video player based on directshow because that's what the community wanted. On Windows it is the best option, but it also means we inherit many of the same limitations of Windows Media Player, which we can easily fix with transcoding, but I know you guys don't want that.

arrbee99
Posted

Hokey dokey, I will pass along what you say, if its OK, and see how things go.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...