Jump to content

After connecting to one channel, Emby does not establish connection for another channel


ptlh2a

Recommended Posts

ptlh2a

Good morning. Having a problem with Emby server build that will successfully connect to an M3U tuner (using TVHeadEnd) correctly for the first connection, but after stopping the LiveTV stream, Emby server will not connect to another channel (so, basicly changing channels from 1 channel to another - first one does fine, but going to another channel does not work). The only way to get it to connect correctly is to restart the Emby server process (and then it works for the first one, but not second or more). When trying to connect, Emby just gives me the circle like it's trying, but never connects.

I see the channel connection establish for the first channel, and I see it disconnect when done, but when choosing the second channel, I never see it even try to connect in TVHE. This happens also for recordings - first one runs great, but if there is another recording scheduled, it won't record the second one.

Using VLC or TVHE tuner, I can change between multiple channels without issue. Using an M3U tuner connection due to no Emby support for tuner with Ubuntu.

Build:
Emby 4.4.3.0
Ubuntu 18.041
TVHE: 4.2.8-36
Tuner: Hauppauge WinTV-dualHD tuner

Any help or ideas would be great.

Thx.
Pete

Link to comment
Share on other sites

Q-Droid

Have you tested multiple and different clients and do they behave the same way?

How many TV adapters did TVH detect?

What is the simultaneous stream limit under Emby TV Source setup?

And as always, please provide a server log.

Link to comment
Share on other sites

How many "tuners" do you have available to Emby to use?

How are you changing channels? Are you doing it with the mini grid while already playing?  Are you exiting and going back to the guide?  How about the channels tab?

If possible try this.  Go to the channels tab and start a channel playing.  Then exit appropriately with the back arrow on the video (not back in browser) if using a browser or using the back button on a client.  Now from the channels tab can you start another channel playing?

What clients have you tried?

If you look at the TVH server is it showing "tuners" still being used?

Link to comment
Share on other sites

ptlh2a

Thanks for all of the questions. Will endeavor to answer (covering both posts of questions):

1. Have tested this issue with multiple clients (WebOS/LG TV, iPad app, laptop web UI, and Roku). All exhibit the same issue.
2. # of adapters that TVHE found  - 2. I have attached a picture of the tuner list from TVHE.
3. Simultaneous stream limit in Emby (for M3U tuner) - it's set to 0, which should be no limit.
4. I have attached server logs
5. I use the back button, the back button on WebOS (and then pick another channel), also using the Stop button and picked another channel. See the list of clients used in #1.
6. I have attached an image of TVHE running with 2 streams at same time. You can see both connections showing up. When I hit the stop button for both of them, the streams go away (disconnect), and don't show up in THVE connections.
7. I have also put in a pic with Emby running 2 streams thru TVHE (both showing, and running just fine - one from WebUI, one from iPad). Both streams go away after using back arrow to stop stream.
8. In the logs you may see one or two that also did re-connect, but then there was a failure. I chose a program on iPad client, and hit play, and it just sat and spun, and no streams show up in TVHE. However, I was able to connect to a channel within TVHE without issue. I did exit the client and went back in, and it did not change. I did shut down any power saving features on Emby system, so it's not the computer going to sleep.
9. This also happens with recordings....the first recording works great, but then the next recording will not work until the server process has been restarted.

Hopefully this helps. Logs are attached as well.

Thanks.
Pete

 

embyrunning2streams.png

tvhe-2tuner running.png

tunerlist.png

embyserver-63729720694.txt hardware_detection-63729720700.txt ffmpeg-transcode-72fc1738-5ece-4c55-9c02-73987ab90a7f_1.txt embyserver(1).txt

Link to comment
Share on other sites

Q-Droid

What this looks like to me and what I suspect it's an authentication issue.

Your playlist URL given to Emby for the M3U tuner contains credentials but the channel streams from the TVH playlist don't. The channels use a ticket instead and these tickets expire after a few minutes. If you pick a channel with an expired ticket then TVH expects credentials again to reauthorize the session. But you're getting HTTP 401 responses from TVH.

'2020-07-07 12:25:10.373 Info HttpClient: Http response 401 from http://192.168.1.100:9981/stream/channelid/61061737?ticket=F32F43A603E455874D8277CE6384EFBED7FF6A26&profile=pass after 1ms. HeadersServer=HTS/tvheadend, Cache-Control=no-cache, WWW-Authenticate=Basic realm="tvheadend", Connection=close'

When I said before that using a no-auth account was a convenience might not be entirely true. It depends...some clients like VLC know to reauth the session. And some, like Emby might not. It's possible that the TVH plug-in handles this behind the scenes while the direct M3U option doesn't. I can't say because I only used the plug-in for a day or so before I switched to M3U. And I have always used the no-auth "*" account in TVH so never ran into the possible expiration problem you're seeing here.

If you're willing to try it give the no-auth TVH account a shot. There might be other options like a static playlist with credentials and/or modified playlist converted with software, filters or services. Not the kind of stuff I care to bother with unless really needed. 

There may be others in the community who've managed to work around the auth issues when using account credentials in an M3U TVH playlist.

 

Link to comment
Share on other sites

Q-Droid

A little more info about TVH options. It looks like an option is available in TVH 4.3.x to configure and retrieve playlists with persistent authentication. The channel streams in the playlist would include the authentication code(key) to access the streams without further authorization. Using credentials in the playlist URL one time but none needed after that.

I can't offer any more detail as I use the stable releases of TVH, 4.2.x.

 

Link to comment
Share on other sites

ptlh2a

I can attempt to setup TVHE as no-auth and see if it works. 4.3x is reporting "unstable" (it might be pretty good, but may not want to add on extra problems to resolve). I have to do a bit of reading how to set it up, but I am not too worried about it being no-auth. Its just TV (so hackers can watch Magnum P.I. or something like that...maybe Adam-12).

Let me reconfigure TVHE and report back.

Thanks for the help.
Pete

Link to comment
Share on other sites

ptlh2a

I found out setting no-auth is easier than I thought, and it seems to be helping. I have established multiple streams, and then disconnected them, and they all show correctly. I see the connections in TVHE establish and tear down like they should. I made over 8 connections back and forth, and never had to restart the Emby server process at all.

I will test it with recording, but I believe it will work fine, so it seems that using authorization is causing this issue.

Thank you very much for your help with this. Outside of the Roku issue (which is known...was in my previous problem), this would seem to be running better than "the other media server".

I will setup some recordings to see how that does, but I bet it will be fine.

Thanks.
Pete

Link to comment
Share on other sites

Sounds like you got it going well now.  It was a LOOONNGG time getting there. :)

Link to comment
Share on other sites

ptlh2a

It seems to be running like it should now. Yes, it was  long time getting there, but it's ok....we got there. I had tried for months and months with the other brand media server, and got no where.

Thank you for all of the help. I appreciate you keeping at it until the issues were resolved.

Pete

  • Like 1
Link to comment
Share on other sites

Q-Droid

Glad you got it going. It may seem like many moving parts though once you figure out the setup it works well and it's nice to have the flexibility. 

Link to comment
Share on other sites

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...