psyciknz / NextPVR.bundle

Plex Channel for viewing NextPVR content
29 stars 4 forks source link

Unable to play live TV #8

Closed ygalanter closed 7 years ago

ygalanter commented 8 years ago

Not sure if I am doing something wrong or something else is going on, but I have 2 issues. One - Out of 30 live TV channels NextPVR-Plex shows only 4. And second issue - when I attempt to play live channel - it doesn't, displaying errors like "this stream could not be played". Any idea what's going on? Thanks!

psyciknz commented 8 years ago

Possibly easier to post me a message on the next pvr forums (or plex) Im on both as psycik. As I'll need you to post logs etc.

Regarding the 2nd issue post some logs - what I've seen sometime is some places have 10.3 style channel numbers, which has issues.

Regarding the first issue. http://:8866/services?method=channel.listings.current&sid=plex&client=C07FF0ARDHJH

Will list all of the channels currently playing. If this list is different from what you see in nextpvr-plex then maybe there's something wrong with some of the entries and it's skipping them. Post the result of the call on your server and I can look at it

psyciknz commented 7 years ago

I've made some changes in this area finally, and had some success for live tv. Try this if stil linterest

ygalanter commented 7 years ago

Awesome, thanks!

From: psyciknz Sent: Sunday, March 12, 2017 3:10 AM To: psyciknz/NextPVR-Plex Cc: ygalanter ; Author Subject: Re: [psyciknz/NextPVR-Plex] Unable to play live TV (#8)

I've made some changes in this area finally, and had some success for live tv. Try this if stil linterest

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

psyciknz commented 7 years ago

So this is working for you?

bandbbs2 commented 7 years ago

i just downloaded the latest plugin and tried it on Plex 1.5.3.3580 under Windows 10... while trying to play Live TV items I get a "there was a problem playing this item" message.. What can I provide to help "debug"?

psyciknz commented 7 years ago

Is that using the app from windows store? Does using the web player change this?

Also what is your source data? E.g. I'm in nz, ours is h.264 with ac3 or aac. Audio.

Obviously I can't test mpeg2

bandbbs2 commented 7 years ago

this is trying to play live TV on plex server on the same PC.. not sure what you mean by web player? it's playing from NEXTPVR so i am not sure about h.264 or the audio?.. how do i tell? thanks

psyciknz commented 7 years ago

Do you start a Plex app or do you use a browser to access Plex?

For the video the nextpvr recording logs should show that detail.

Also do you have channel numbers with decimal values?

bandbbs2 commented 7 years ago

NRecord.zip I use the Plex APP associated with the Plex server on the same Win 10 PC.. it’s not the standalone Windows 10 Plex app from the app store. So in this case.. on my Win 10 PC I am running the Plex server on the same PC.. and I am on that same PC under the PLEX server app..

I attached the Nextpvr logs in zip file – see the error in the web.txt log” look at around 4:03PM on 4/6

Unexpected error streaming channel: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host

at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)

at NShared.Streaming.StreamingHelper.StreamNative(Socket conn, Dictionary`2 parameters)

It’s a channel with a decimal value.. 2.1 or 2.2

Thanks..

From: psyciknz [mailto:notifications@github.com] Sent: Thursday, April 6, 2017 4:06 PM To: psyciknz/NextPVR-Plex NextPVR-Plex@noreply.github.com Cc: bandbbs2 blaine@bburton.net; Comment comment@noreply.github.com Subject: Re: [psyciknz/NextPVR-Plex] Unable to play live TV (#8)

Do you start a Plex app or do you use a browser to access Plex?

For the video the nextpvr recording logs should show that detail.

Also do you have channel numbers with decimal values?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/psyciknz/NextPVR-Plex/issues/8#issuecomment-292300194 , or mute the thread https://github.com/notifications/unsubscribe-auth/AZudFzDWcmvTQvQNHRrRqwo5NISbABQ0ks5rtUWpgaJpZM4Gqvjs . https://github.com/notifications/beacon/AZudFw2SYlqf64B1m22HCaeTLXx310iOks5rtUWpgaJpZM4Gqvjs.gif

com.dcSoftware.plexapp.nextpvr.zip

psyciknz commented 7 years ago

So right click the plex app and open "plex" from there right? Ok that opens the plex web viewer in a browser looking at localhost.

I'm not sure what the nextpvr error is. Could be that plex is closing the connection as it's not getting anything - even though nextpvr looks like it's waiting.

Ok I see you're ATSC and: 2017-04-05 16:34:57.527 [DEBUG][5] Removing filter MPEG-2 Sections and Tables 2017-04-05 16:34:57.528 [DEBUG][5] Removing filter BDA MPEG2 Transport Information Filter 2017-04-05 16:34:57.528 [DEBUG][5] Removing filter MPEG-2 Demultiplexer

So I assume mpeg2. Likely that the decimal channel numbers are causing a problem.

In the plex logs\pms logs directory will be a nextpvr log (that the channel writes), it should list the URL I'm calling to access the channel. It should look something like this: /live?channel=12.2&sid=plex&client=vra1hepros10pb9 (this seems to be the nextpvr side of it)

I did make a change a while back for decimal channel numbers, but not sure if it was confirmed as working.

bandbbs2 commented 7 years ago

yes.. right click..

see attached log.. is shows the /live? url I believe.. Playvideo: http://127.0.0.1:8866/live?channel=2.1&sid=plex&client=7E77E4F0-CE9D-4AF2-8975-F7EFEC788F50

com.dcSoftware.plexapp.nextpvr.zip

thanks..

psyciknz commented 7 years ago

And if you run that url in a browser you get prompted to download a file? It should.

See I see nothing wrong with it, I'm passing the channel id as a decimal. Unless the problem is the mpeg 2 as in the code I'm doing this: container = container, video_codec = VideoCodec.H264, audio_codec = 'aac_latm', audio_channels=2, optimized_for_streaming = True

You could try editing the NextPVR.bundle/Contents/Code/init.py file in the CreateVideoClipObject section. And where you see the video codec and audio codec, try commenting them out with # If that works, that could be a change I make.

psyciknz commented 7 years ago

Shouldn't be. Here's the same file from github video_codec = VideoCodec.H264,

video_codec = 'h264',

audio_codec = 'aac_latm', audio_channels=2,

Also to be confusing there's a CreateVideoObject and a CreateVideoClipObject. The latter is used for live (I haven't fixed recorded content yet).

bandbbs2 commented 7 years ago

got it.. that seems to have fixed playing liveTV via Plex under a browser, also, Plex app on IOS, Plex app on AppleTV.. still gets an error on Plex app on XBOX.. but, again, it wasn't working anywhere until I made the change you suggested.. what I mean is that is now works on Win 10 brower, Plex App for IOS, and Plex App for Apple TV... not working on Plex for XBOX

Very much appreciate the help!!!

psyciknz commented 7 years ago

Ahh great. Ok. I'll make an update to the code to sort that out.

I might close off this issue once I've done it.

bandbbs2 commented 7 years ago

Thanks again!!!

Sent on the go!!


From: psyciknz notifications@github.com Sent: Thursday, April 6, 2017 6:53:50 PM To: psyciknz/NextPVR-Plex Cc: bandbbs2; Comment Subject: Re: [psyciknz/NextPVR-Plex] Unable to play live TV (#8)

Ahh great. Ok. I'll make an update to the code to sort that out.

I might close off this issue once I've done it.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/psyciknz/NextPVR-Plex/issues/8#issuecomment-292350337, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AZudFxVSzK4g9GUzNzJ4Z5EbrqKxxAtfks5rtWz-gaJpZM4Gqvjs.

VRtrout commented 7 years ago

I also had live tv issues and commenting that out fix it. Thanks.

video_codec = VideoCodec.H264,

            #video_codec = 'h264',
            #audio_codec = 'aac_latm',

ALSO: Just below those settings were these that were commented out

bitrate = 13000,

            #video_resolution=480,

I un-commented them out and gained the ability to adjust the playback bit-rate (the settings icon in the corner appeared, was not there before for live tv).

psyciknz commented 7 years ago

Should be fixed now.