Jump to content

HDHomerun + LiveTV


BenDover

Recommended Posts

BenDover

As of the latest EMBY update, whenever I try and watch LiveTV on my Nvidia Sheild 2016, I get intermittent crashes of the app or my HDHomerun will lock up completely and needs to be reset. It doesn't happen while watching the stream directly, but if i hit back to go back to the guide its like the app will crash and reboot. It also skips/pauses for 1-3 minutes before playing again or turns the screen green as if it lost the whole feed. I'm transcoding so we have the ability to pause so its not direct stream. I can watch anything from my library fine and i can watch LiveTV from Emby Theater on my PC but whenever I do it on the Shield it crashes with one of the below errors. I've tried the HDHomerun native app on my Shield and it works flawlessly.

Can send full log if needed.  Please help!

Version: 4.4.3.0
Command line: C:\Users\Administrator\AppData\Roaming\Emby-Server\system\EmbyServer.dll
Operating system: Microsoft Windows NT 6.2.9200.0
64-Bit OS: True
64-Bit Process: True
User Interactive: True
Runtime: file:///C:/Users/Administrator/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
System.Environment.Version: 3.1.4
Processor count: 16
Program data path: C:\Users\Administrator\AppData\Roaming\Emby-Server\programdata
Application directory: C:\Users\Administrator\AppData\Roaming\Emby-Server\system
System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
at System.IO.Pipelines.Pipe.CommitUnsynchronized()
at System.IO.Pipelines.Pipe.PrepareFlush(CompletionData& completionData, ValueTask`1& result, CancellationToken cancellationToken)
at System.IO.Pipelines.Pipe.FlushAsync(CancellationToken cancellationToken)
at System.IO.Pipelines.Pipe.DefaultPipeWriter.FlushAsync(CancellationToken cancellationToken)
at System.IO.Pipelines.PipeWriter.CopyFromAsync(Stream source, CancellationToken cancellationToken)
at Emby.LiveTV.TunerHosts.SharedHttpPipelineSource.<>c__DisplayClass8_0.<<StartStreaming>b__0>d.MoveNext()
Source: System.IO.Pipelines
TargetSite: Boolean CommitUnsynchronized()
2020-07-17 08:01:52.992 Error SharedHttpPipelineSource: Error copying live stream.
*** Error Report ***
Version: 4.4.3.0
Command line: C:\Users\Administrator\AppData\Roaming\Emby-Server\system\EmbyServer.dll
Operating system: Microsoft Windows NT 6.2.9200.0
64-Bit OS: True
64-Bit Process: True
User Interactive: True
Runtime: file:///C:/Users/Administrator/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
System.Environment.Version: 3.1.4
Processor count: 16
Program data path: C:\Users\Administrator\AppData\Roaming\Emby-Server\programdata
Application directory: C:\Users\Administrator\AppData\Roaming\Emby-Server\system
System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
at System.IO.Pipelines.Pipe.CommitUnsynchronized()
at System.IO.Pipelines.Pipe.PrepareFlush(CompletionData& completionData, ValueTask`1& result, CancellationToken cancellationToken)
at System.IO.Pipelines.Pipe.FlushAsync(CancellationToken cancellationToken)
at System.IO.Pipelines.Pipe.DefaultPipeWriter.FlushAsync(CancellationToken cancellationToken)
at System.IO.Pipelines.PipeWriter.CopyFromAsync(Stream source, CancellationToken cancellationToken)
at Emby.LiveTV.TunerHosts.SharedHttpPipelineSource.<>c__DisplayClass8_0.<<StartStreaming>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Emby.LiveTV.TunerHosts.SharedHttpPipelineSource.<>c__DisplayClass8_0.<<StartStreaming>b__0>d.MoveNext()

 

 

Later update: Found out that the HDHomerun is still detecting that a tuner is still in use when its not. Restarting the emby app seems to release it, but nobody was watching and it still had it locked.

Edited by BenDover
Link to comment
Share on other sites

20 hours ago, BenDover said:

but if i hit back to go back to the guide its like the app will crash and reboot

If your issue is only when trying to exit playback of a live channel (back to the guide) then that is fixed in the current beta (and release currently in review with Google).

 

Link to comment
Share on other sites

freddyfinn
On 7/19/2020 at 1:40 AM, ebr said:

If your issue is only when trying to exit playback of a live channel (back to the guide) then that is fixed in the current beta (and release currently in review with Google).

 

Thanks for this. I'll have to check it out. 

Hopfully the tuner is released and the stream .ts file is deleted as well. 

Only the shield has been an issue. Apple TV  has been okay so far. 

Link to comment
Share on other sites

BenDover

Phew,

That's one big problem that I've been having, the other is the tuners not releasing from EMBY. I'm not sure if its some settings on the shield, but i did go into the settings in HDHomerun and verify that it is the EMBY server who has the tuners locked.

 

Is there something I can check otherwise to see why its not releasing all the time?

Link to comment
Share on other sites

3 hours ago, BenDover said:

Phew,

That's one big problem that I've been having, the other is the tuners not releasing from EMBY. I'm not sure if its some settings on the shield, but i did go into the settings in HDHomerun and verify that it is the EMBY server who has the tuners locked.

 

Is there something I can check otherwise to see why its not releasing all the time?

If you were having the problem of the app hanging up and restarting when exiting live TV then that is also why the streams were getting stranded.

Link to comment
Share on other sites

freddyfinn
7 hours ago, BenDover said:

Phew,

That's one big problem that I've been having, the other is the tuners not releasing from EMBY. I'm not sure if its some settings on the shield, but i did go into the settings in HDHomerun and verify that it is the EMBY server who has the tuners locked.

 

Is there something I can check otherwise to see why its not releasing all the time?

I am now on the google beta that ebr posted and I can confirm that this issue is resolved. 

Register for it and you will receive the update. The beta will have the same version number as the current release so don't panic if you see the same release version in settings. 

Link to comment
Share on other sites

BenDover

I actually turned off de interlacing for live TV and that seems to be helping quite a bit too.

The only problem I havent figured out is why the tuner isnt releasing. I've got an HDHomerun Prime. I was watching TBS at 7:30-8 and then switched to something from my library. I went back 5 minutes ago (8:35pm) and the 1 tuner was still locked on TBS by the server.

 

Ideas?

Link to comment
Share on other sites

freddyfinn
25 minutes ago, cayars said:

The beta is usually always newer than the release.

Yes i realised that after checking the play store. 

It comes up as a beta and I'm guessing that the beta release doesnt change the app version in settings so when the update is released you will automatically update to the latest stable release. 

Edit: Picture seems better as well. 

Edited by freddyfinn
Link to comment
Share on other sites

23 minutes ago, BenDover said:

I actually turned off de interlacing for live TV and that seems to be helping quite a bit too.

The only problem I havent figured out is why the tuner isnt releasing. I've got an HDHomerun Prime. I was watching TBS at 7:30-8 and then switched to something from my library. I went back 5 minutes ago (8:35pm) and the 1 tuner was still locked on TBS by the server.

 

Ideas?

Turned off deinterlacing to fixed the settings so that the Emby Server wasn't doing the deinterlacing and let the Shield TV do the work?

The wording is tricky.

You didn't happen to be recording TBS did you?

Link to comment
Share on other sites

BenDover

We were not. I was actually watching BBT on the normal 7:30pm re-runs. After that I switched to something in my library. I saw nothing recording at all

 

::sad face::

Mark

Link to comment
Share on other sites

4 minutes ago, BenDover said:

After that I switched to something in my library

Can you tell us exactly how you did that?

Link to comment
Share on other sites

BenDover
12 minutes ago, ebr said:

Can you tell us exactly how you did that?

Was using EMBY Live TV and went to guide for TBS. Watched BBT for about 15 minutes or so. Hit back on the shield remote several times to get back to library selection. Selected TV library, the show we were watching, then the episode. Hit play on the episode.

Logged into server for something else 20-30 minutes later, noticed that HDHomerun was still locked on TBS from the server.

 

 

 

Link to comment
Share on other sites

1 hour ago, BenDover said:

noticed that HDHomerun was still locked on TBS from the server.

Exactly how did you determine that?  Do you have the server log from this activity?

Link to comment
Share on other sites

BenDover
20 minutes ago, ebr said:

Exactly how did you determine that?  Do you have the server log from this activity?

Inside the HDHomerun app it shows you like below:

 

image.png.eae78a7f3bdf9f0a45020981f2cbbf4b.png

 

If you click on a tuner when it shows its being used it shows:

 

image.png.e2edcfe4571cac2ffd4f84815860cc35.png

 

 

Except in the case of this and many other situations, it was tuned to a channel and it was "resource lock" on the IP of the server where emby was installed.

Link to comment
Share on other sites

I'm not sure why the tuner would still be held open.  The shutdown process for the channel clearly occurred:

2020-07-23 20:23:23.037 Info HttpServer: HTTP POST http://10.10.10.10:8096/emby/Sessions/Playing/Stopped. UserAgent: Dalvik/2.1.0 (Linux; U; Android 9; SHIELD Android TV Build/PPR1.180610.011)
2020-07-23 20:23:23.037 Info VideoHlsService: ProcessRun 'StreamTranscode c4eace': Stopping ffmpeg process with q command for F:\Transcoding-temp\transcoding-temp\00860E_0.ts
2020-07-23 20:23:23.285 Info VideoHlsService: AppendExtraLogData - Read graph file: C:\Users\Administrator\AppData\Roaming\Emby-Server\programdata\logs\ffmpeg-transcode-c4eace9e-e702-4c58-994c-1b662e262756_1graph.txt
2020-07-23 20:23:23.287 Info VideoHlsService: AppendExtraLogData - Deserialized GraphData fileStream: {0:n} bytes Graph Count: 1
2020-07-23 20:23:23.288 Info VideoHlsService: AppendExtraLogData - File Deleted
2020-07-23 20:23:23.289 Info VideoHlsService: ProcessRun 'StreamTranscode c4eace' Process exited with code 0
2020-07-23 20:23:23.298 Info EncodingManager: Deleting partial stream file(s) F:\Transcoding-temp\transcoding-temp\00860E.m3u8
2020-07-23 20:23:23.298 Info SessionManager: Playback stopped reported by app AndroidTv 1.8.10g playing NBCHD. Stopped at 1356410 ms
2020-07-23 20:23:23.298 Info MediaSourceManager: Live stream native_1774c7cd3e14b1908306436e677e16c4_b29750778a083cffeef5890b2797eb69 consumer count is now 0
2020-07-23 20:23:23.298 Info MediaSourceManager: Closing live stream 06044cf0e6f93cdae5f285c9ecfaaeb4_01413a525b3a9622ce6fdf19f7dde354_native_1774c7cd3e14b1908306436e677e16c4_b29750778a083cffeef5890b2797eb69
2020-07-23 20:23:23.298 Info SharedHttpPipelineSource: Closing SharedHttpPipelineSource
2020-07-23 20:23:23.299 Info SharedHttpPipelineSource: SharedHttpPipelineSource is done streaming.
2020-07-23 20:23:23.299 Info SharedHttpPipelineSource: Deleting temp files F:\Transcoding-temp\transcoding-temp\bbed3927c9784e8c83e41a3e3cf7840c.ts
2020-07-23 20:23:23.303 Info HttpServer: HTTP Response 200 to 127.0.0.1. Time: 1246930ms. http://127.0.0.1:8096/LiveTv/LiveStreamFiles/bbed3927c9784e8c83e41a3e3cf7840c/stream.ts
2020-07-23 20:23:23.303 Info MediaSourceManager: Live stream 06044cf0e6f93cdae5f285c9ecfaaeb4_01413a525b3a9622ce6fdf19f7dde354_native_1774c7cd3e14b1908306436e677e16c4_b29750778a083cffeef5890b2797eb69 closed successfully
2020-07-23 20:23:23.304 Info HttpServer: HTTP Response 204 to 10.10.10.19. Time: 267ms. http://10.10.10.10:8096/emby/Sessions/Playing/Stopped

 

The next time this happens, can you look in your transcoding-temp location and see if Emby is still writing files to there?  It doesn't look like it should be.  Perhaps just the "disconnect" on the tuner end is failing somehow...

Link to comment
Share on other sites

BenDover
12 minutes ago, ebr said:

I'm not sure why the tuner would still be held open.  The shutdown process for the channel clearly occurred:


2020-07-23 20:23:23.037 Info HttpServer: HTTP POST http://10.10.10.10:8096/emby/Sessions/Playing/Stopped. UserAgent: Dalvik/2.1.0 (Linux; U; Android 9; SHIELD Android TV Build/PPR1.180610.011)
2020-07-23 20:23:23.037 Info VideoHlsService: ProcessRun 'StreamTranscode c4eace': Stopping ffmpeg process with q command for F:\Transcoding-temp\transcoding-temp\00860E_0.ts
2020-07-23 20:23:23.285 Info VideoHlsService: AppendExtraLogData - Read graph file: C:\Users\Administrator\AppData\Roaming\Emby-Server\programdata\logs\ffmpeg-transcode-c4eace9e-e702-4c58-994c-1b662e262756_1graph.txt
2020-07-23 20:23:23.287 Info VideoHlsService: AppendExtraLogData - Deserialized GraphData fileStream: {0:n} bytes Graph Count: 1
2020-07-23 20:23:23.288 Info VideoHlsService: AppendExtraLogData - File Deleted
2020-07-23 20:23:23.289 Info VideoHlsService: ProcessRun 'StreamTranscode c4eace' Process exited with code 0
2020-07-23 20:23:23.298 Info EncodingManager: Deleting partial stream file(s) F:\Transcoding-temp\transcoding-temp\00860E.m3u8
2020-07-23 20:23:23.298 Info SessionManager: Playback stopped reported by app AndroidTv 1.8.10g playing NBCHD. Stopped at 1356410 ms
2020-07-23 20:23:23.298 Info MediaSourceManager: Live stream native_1774c7cd3e14b1908306436e677e16c4_b29750778a083cffeef5890b2797eb69 consumer count is now 0
2020-07-23 20:23:23.298 Info MediaSourceManager: Closing live stream 06044cf0e6f93cdae5f285c9ecfaaeb4_01413a525b3a9622ce6fdf19f7dde354_native_1774c7cd3e14b1908306436e677e16c4_b29750778a083cffeef5890b2797eb69
2020-07-23 20:23:23.298 Info SharedHttpPipelineSource: Closing SharedHttpPipelineSource
2020-07-23 20:23:23.299 Info SharedHttpPipelineSource: SharedHttpPipelineSource is done streaming.
2020-07-23 20:23:23.299 Info SharedHttpPipelineSource: Deleting temp files F:\Transcoding-temp\transcoding-temp\bbed3927c9784e8c83e41a3e3cf7840c.ts
2020-07-23 20:23:23.303 Info HttpServer: HTTP Response 200 to 127.0.0.1. Time: 1246930ms. http://127.0.0.1:8096/LiveTv/LiveStreamFiles/bbed3927c9784e8c83e41a3e3cf7840c/stream.ts
2020-07-23 20:23:23.303 Info MediaSourceManager: Live stream 06044cf0e6f93cdae5f285c9ecfaaeb4_01413a525b3a9622ce6fdf19f7dde354_native_1774c7cd3e14b1908306436e677e16c4_b29750778a083cffeef5890b2797eb69 closed successfully
2020-07-23 20:23:23.304 Info HttpServer: HTTP Response 204 to 10.10.10.19. Time: 267ms. http://10.10.10.10:8096/emby/Sessions/Playing/Stopped

 

The next time this happens, can you look in your transcoding-temp location and see if Emby is still writing files to there?  It doesn't look like it should be.  Perhaps just the "disconnect" on the tuner end is failing somehow...

Sure thing. Ill let you know if it happens again.

 

Thanks for your help everyone.

Link to comment
Share on other sites

BenDover
On 7/25/2020 at 10:19 AM, ebr said:

I'm not sure why the tuner would still be held open.  The shutdown process for the channel clearly occurred:


2020-07-23 20:23:23.037 Info HttpServer: HTTP POST http://10.10.10.10:8096/emby/Sessions/Playing/Stopped. UserAgent: Dalvik/2.1.0 (Linux; U; Android 9; SHIELD Android TV Build/PPR1.180610.011)
2020-07-23 20:23:23.037 Info VideoHlsService: ProcessRun 'StreamTranscode c4eace': Stopping ffmpeg process with q command for F:\Transcoding-temp\transcoding-temp\00860E_0.ts
2020-07-23 20:23:23.285 Info VideoHlsService: AppendExtraLogData - Read graph file: C:\Users\Administrator\AppData\Roaming\Emby-Server\programdata\logs\ffmpeg-transcode-c4eace9e-e702-4c58-994c-1b662e262756_1graph.txt
2020-07-23 20:23:23.287 Info VideoHlsService: AppendExtraLogData - Deserialized GraphData fileStream: {0:n} bytes Graph Count: 1
2020-07-23 20:23:23.288 Info VideoHlsService: AppendExtraLogData - File Deleted
2020-07-23 20:23:23.289 Info VideoHlsService: ProcessRun 'StreamTranscode c4eace' Process exited with code 0
2020-07-23 20:23:23.298 Info EncodingManager: Deleting partial stream file(s) F:\Transcoding-temp\transcoding-temp\00860E.m3u8
2020-07-23 20:23:23.298 Info SessionManager: Playback stopped reported by app AndroidTv 1.8.10g playing NBCHD. Stopped at 1356410 ms
2020-07-23 20:23:23.298 Info MediaSourceManager: Live stream native_1774c7cd3e14b1908306436e677e16c4_b29750778a083cffeef5890b2797eb69 consumer count is now 0
2020-07-23 20:23:23.298 Info MediaSourceManager: Closing live stream 06044cf0e6f93cdae5f285c9ecfaaeb4_01413a525b3a9622ce6fdf19f7dde354_native_1774c7cd3e14b1908306436e677e16c4_b29750778a083cffeef5890b2797eb69
2020-07-23 20:23:23.298 Info SharedHttpPipelineSource: Closing SharedHttpPipelineSource
2020-07-23 20:23:23.299 Info SharedHttpPipelineSource: SharedHttpPipelineSource is done streaming.
2020-07-23 20:23:23.299 Info SharedHttpPipelineSource: Deleting temp files F:\Transcoding-temp\transcoding-temp\bbed3927c9784e8c83e41a3e3cf7840c.ts
2020-07-23 20:23:23.303 Info HttpServer: HTTP Response 200 to 127.0.0.1. Time: 1246930ms. http://127.0.0.1:8096/LiveTv/LiveStreamFiles/bbed3927c9784e8c83e41a3e3cf7840c/stream.ts
2020-07-23 20:23:23.303 Info MediaSourceManager: Live stream 06044cf0e6f93cdae5f285c9ecfaaeb4_01413a525b3a9622ce6fdf19f7dde354_native_1774c7cd3e14b1908306436e677e16c4_b29750778a083cffeef5890b2797eb69 closed successfully
2020-07-23 20:23:23.304 Info HttpServer: HTTP Response 204 to 10.10.10.19. Time: 267ms. http://10.10.10.10:8096/emby/Sessions/Playing/Stopped

 

The next time this happens, can you look in your transcoding-temp location and see if Emby is still writing files to there?  It doesn't look like it should be.  Perhaps just the "disconnect" on the tuner end is failing somehow...

@ebr Happened again. Its stuck tuned to a channel I was recording last night. I checked my transcoding temp directory and there is a .TS file in there. I won't kill it until I hear from you in case you want logs?

 

 

Link to comment
Share on other sites

BenDover
5 minutes ago, ebr said:

Is the .ts file growing/changing?  What is the last modified time?

It is not growing or changing. The last edit date was the 9:03pm which was the end of the show being recorded. I opened it to confirm it was the show and it looks like it was 15 minutes of the show not the whole thing. FIle size is 19.7 GB.

 

I've attached the embyserver logs for the time frame.

 

embyserver.txt embyserver-63731404800.txt

Link to comment
Share on other sites

Okay, so the issue is probably occurring on a stream that gets interrupted somehow.

Thanks.

Link to comment
Share on other sites

BenDover
2 hours ago, ebr said:

Okay, so the issue is probably occurring on a stream that gets interrupted somehow.

Thanks.

do the logs show anything? or did you mean thats what the logs are showing?

Edit: Here are the logs from the 26-27th from the HDHomerun.

HDHomerun.txt

Edited by BenDover
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...