Jump to content

Slow Tuning - HDHR


Dave_1959

Recommended Posts

Dave_1959

Hi all,

New to Emby and android TV so apologies if I'm missing an obvious answer to this. 

Emby is setup on Windows (i5, 8GB) with a HDHR Quattro and I have 2 Nvidia Shield "tubes".  All works well apart from a couple of items -

  1. When tuning to Live TV it takes up to 20 seconds to tune. Looking at the server dashboard at the same time it says "Direct Play" (no picture at that time) for a while, then changes to "Transcoding" for a few seconds and then "Direct Stream". As soon as the "direct Play" disappears the picture comes on. This suggests that DIrect play doesn't work, it times out and reverts to Direct stream which then works.
    I've tried enabling the "allow direct play" option in the app but this only seems to work for some Freeview channels and just gives the "spining wheel" on others (the majority). Other apps (HDHR Client, Kodi direct to HDHR) all bring up the channels quickly.
    Is there a way to either - a) Get Direct Play to work on the shield with Emby (I believe the Shield supports it) or b) force Emby not to try direct Play in the first place and go direct to Direct Stream (although I suspect this will still have some slight delay)
  2. I've noticed that several times Emby has locked one or more of the HDHR tuners. There is a file being streamed to disk related to each "locked" tuner (so Emby is still streaming it to file). A restart of Emby is needed to release the locks and delete the streamed file. I believe this may be when for some reason the streamed program didn't show up in the client and the client was closed without a formal "I'm exiting". The logs back this up with the FFmpeg process being stopped a short while later (after a timeout I guess), the individual FFmpeg files get deleted but Emby doesn't then stop the tuner stream, leaving it locked and slowly filling up the disk. I suspect this is related to 

 Any help appreciated.

Many thanks

Dave

Link to comment
Share on other sites

Hi.  As you found, when you can direct stream the channel, it should be quite fast (mine tune in about a second) but, if we have to run the stream through ffmpeg on the server, then it does introduce a slow-down.

Also, the specific situation you describe - where a channel is requested but never starts and then you back out of the playback - does seem to be one that can orphan a streaming process on the server.

The good new is, I think both issues are likely to be improved in a future update of the server.

Thanks.

Link to comment
Share on other sites

Dave_1959

Thanks for the quick response 😀

I may be wrong but the slow tuning isn't a delay due to the ffmpg running but the delay before that starts whilst trying Direct Play and failing. Because I have had to disable the "allow direct play" option the delay is on all channels. Playing recordings (including ones that transcode) load very quickly - so the transcoding is fast.

Interestingly, when the picture on live TV does appear, if Stats for Nerds was already set, it shows a few seconds of "direct play" (approx the same as the dashboard showed "direct play" ) before switching to Direct stream - it's as if the stats are delayed  and are catching up somehow?

Is there any way to disable direct play being tried on Live TV ?

Many thanks

Dave

Edited by Dave_1959
Typos
Link to comment
Share on other sites

1 hour ago, Dave_1959 said:

Is there any way to disable direct play being tried on Live TV ?

Yes, but you said you already disabled that in the app...

If not, disable both "Attempt Direct Stream" and "Allow Video Stream Copy".

Link to comment
Share on other sites

Dave_1959

Hi,

I had disabled the allow direct play (and now the Video steam copy) but the dashboard still shows Direct Play for approx 5sec before going to Transcoding (and now stays at that of course). It's not a major issue (although my wife and daughter seem to think it is! 😉). Not sure why the server tries Direct play still?

What seems odd is why direct play doesn't seem to work for the majority of the channels ? The only reason I've seen in the logs is unsupported container.

Have to say though very impressed with Emby and having trialed all the other alternatives it's way ahead of them for our requirements at least😀.

Many thanks

Dave

Link to comment
Share on other sites

Dave_1959

Hi, (and Happy 4th of July)

Please find attached the requested logs. I've sent the AndroidTV log using the debug option (sent 4th July 2020 at 08:55 ET ( I believe - 13:55 BST))

To keep it as simple as possible I restarted the Emby Service prior to running the test and simply went to the Guide, Selected BBC1-HD and play. Attached is a screen shot from the dashboard showing the "Direct Play". The screen shot was taken at 2 seconds but it remained in Direct Play for approx 8 seconds before going to transcoding (see second screen shot)

The Allow Direct Play and Allow video stream copy were both disabled. The logged in user was myself (Dave).

Hope that helps. If you require any more information or tests then please ask.

Have a great day

Dave

Emby1.png

emby2.png

embyserver.txt hardware_detection-63729467464.txt ffmpeg-transcode-1fa1f473-7909-4aaa-807b-4f11dedabd61_1.txt

Link to comment
Share on other sites

It is not trying to direct play.  There is just a delay before the server knows exactly how the item is playing.

Link to comment
Share on other sites

Dave_1959

Hi,

So it's just a default label showing. I can understand that 😉.

However, that still leaves the question why some channels will Direct Play and others won't in Emby. Using HDHR client or Kodi they all seem to direct play (or at least load very quickly).

I've sent another log from the Android TV Client (sent at 16:23BST - 11:23 ET?) with 3 tests with the Allow Direct Play and Allow video stream both now Enabled. I've also attached the server log.

The first 2 channels (BBC1 HD and BBC2 HD) both loaded very quickly and were in Direct Play. The third test was ITV HD and I just got a spinning wheel and it never loaded. I could back out though so it wasn't locked. In all cases the server was showing Direct Play.

Obviously the direct play method would be the best (quickest) so hopefully these logs will give us a clue as to why some aren't working.

Once again many thanks for this great support😄

Cheers

Dave

embyserver.txt

Link to comment
Share on other sites

Dave_1959

Hi Luke

I've tried all 3 of these channels and all trigger Transcoding in the web app - "The media is compatible with the device regarding resolution and media type (H.264, AC3, etc.), but is in an incompatible file container (.mkv, .avi, .wmv, etc.). The video will be re-packaged on the fly before streaming it to the device." and  all play fine.

I can't see how to force "Direct Play" in the web app but maybe that's not possible.

Despite the trancoding (to Direct Stream) in firefox the channels still load a lot quicker than they do in the Android TV app (approx 4 seconds compared to 8-10+) (with Allow direct play off but Allow video stream on)

I would add that they play fine in Firefox but in Chromium I just get the spinning wheel (and subsequent locked tuner) on all the channels (but this is another issue I've seen posts about and not a problem directly for me)

Hope that helps.

Cheers

Dave

Link to comment
Share on other sites

21 hours ago, Dave_1959 said:

The first 2 channels (BBC1 HD and BBC2 HD) both loaded very quickly and were in Direct Play. The third test was ITV HD and I just got a spinning wheel and it never loaded. I could back out though so it wasn't locked. In all cases the server was showing Direct Play.

The option to not allow video stream copy in live TV was expressly created to address these UK channels that will only play if transcoded.  @Spaceboy do you remember the exact characteristics of channels that have this problem?

Link to comment
Share on other sites

Dave_1959

Hi, I've looked through @Spaceboy posts (or the more recent ones) but can't see anything (but there are a lot of posts😉)

If it is an issue with the UK Channels I can't understand why other apps (Kodi, HDHR Client) all load quickly on all the UK Channels. I'm assuming they are direct playing as they load quickly and would only have the Shield to do any transcoding.  ?

Regards

Dave

Link to comment
Share on other sites

Spaceboy
The option to not allow video stream copy in live TV was expressly created to address these UK channels that will only play if transcoded.  @Spaceboy do you remember the exact characteristics of channels that have this problem?

I think this is a dvbt problem and actually was@maegibbons rather than me
  • Like 1
Link to comment
Share on other sites

Dave_1959

Just tried again to see if aac_latm could be related but not conclusive. I did find a post suggesting it may be a 1080i vs 1080p issue but as I can't "Direct Play" some SD channels this seems unlikely?

Tried using an External player (KODI) for Live TV and all tested channels worked in direct play and apart from the delay in loading Kodi loaded reasonably fast.. Does this suggest an issue with exoplayer ? - Kodi isn't a solution as you loose a lot of the Emby functions whilst watching a program 😟

In summary:

  • With Direct Play enabled I would estimate 50% of live channels won't work (spinning wheel) the ones that do work load quickly
  • With Direct Play disabled - all channels work but take up to 10-12 seconds to load. 
  • Viewing recordings - all load quickly (even if transcoding).

I'd be happy to not have Direct Play if the transcoded  / direct stream live view opened as quick as transcoded recordings. I can't understand why there should be a difference once the tuner has loaded (logs show <1s)

 

Link to comment
Share on other sites

1 hour ago, Dave_1959 said:

I did find a post suggesting it may be a 1080i vs 1080p issue but as I can't "Direct Play" some SD channels this seems unlikely

That wouldn't rule out interlaced content being the issue which very well may be it...

Have you tried selecting the options to de-interlace on the server and then also enabling direct play?

Link to comment
Share on other sites

Dave_1959
1 hour ago, ebr said:

That wouldn't rule out interlaced content being the issue which very well may be it...

Have you tried selecting the options to de-interlace on the server and then also enabling direct play?

Setting the de-interlace options and Direct Play forces transcoding and the channels play with reason for transcoding being "interlaced video". This shows the same on all channels (ie ones that did Direct Play (BBC News HD for example) and those that didn't.)

@Spaceboy, Thanks for the link but I'm getting the issue on both HD and SD channels.

 

Link to comment
Share on other sites

1 hour ago, Dave_1959 said:

This shows the same on all channels

Are you positive?  Even channels that are not interlaced?

Link to comment
Share on other sites

Dave_1959
15 minutes ago, ebr said:

Are you positive?  Even channels that are not interlaced?

All the HD channels I tested with Direct Play and De-interlace on transcoded and played. That included ones that didn't play with just Direct Play enabled.

I've now checked some SD channels (with both Direct play and De-interlace enabled) and some show "Direct" and then load, others show "direct" and don't load. Others showed "Trans" and then loaded and showed "Interlaced Video" as the reason. None that showed "Trans" failed to load but did sometimes take 10sec or more. In those cases the Stats showed Direct Play when the image loaded for 5-10 seconds and then changed to Transcode.

As far I was aware the Freeview HD channels are all 1080i (but I may be wrong). 

Also the de-interlaced SD channels was very poor video quality (far worse than interlaced) and not watchable (but that's just for info in case it's relavent)

Link to comment
Share on other sites

Okay, so it sounds like everything you tested was interlaced and that is the thing that makes them not direct stream.

Thanks.

Link to comment
Share on other sites

Spaceboy

All my sd channels want to transcode for interlacing. I just let them direct play, I can’t tell any difference in the picture quality and I’d rather have them start faster

Link to comment
Share on other sites

6 minutes ago, Spaceboy said:

I just let them direct play, I can’t tell any difference in the picture quality

Your TV or device is probably doing a decent job of de-interlacing them.

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