Jump to content

Live TV won't stop transcoding


Go to solution Solved by Brian_Oblivion,

Recommended Posts

Brian_Oblivion
Posted

Hi,

Having a problem that just recently popped up when I added some IPTV channels to my TVHeadend server that my Emby server is connected to via the tvheadend plugin. All of this is on the same machine that I also have an OTA tuner card in. It's running the latest ubuntu 24 LTS.

My server is VERY lightly used with typically 1 user connect directly on my home network. 

It's quite likely this has been happening for sometime for my OTA liveTV channels but never got to the be point of being super annoying. But I've added  new IPTV channels to tvheadend and it takes 30+ seconds to tune one of those channels.

Investigating the problem, I naturally looked if it is transcoding. On the client, an Amazon FireCube, stats for nerds reports direct stream on both audio and video. On the emby dashboard, it also reports direct streaming for audio/video when watching any livetv channels (OTA or IPTV). I do NOT have "live seeking" enabled, to confirm if I press pause it prompts me if I want to switch playback mode to live seek. The client settings has the enable live seek checkbox unchecked. 

However, when I go into the emby transcoding temp folder on the machine, it very clearly is creating a new folder and that contains .ts files every time I tune a channel - either OTA OR IPTV. Then when I tune away from it, I can see the folder get deleted/cleaned up. 

I've tried about everything I can think of, but I can't make it stop. I suppose it might be related to my tvheadend config.

There is another thread about livetv buffering I'm watching, as this problem seems a little related

Any suggestions for things to try?

 

 

Brian_Oblivion
Posted

Well... :-).... seems there isn't one correlating to this phenomenon??? I'm making a probably incorrect assumption that because I see directories/files being written to the transcoding temp directory, that I think it's transcoding. I guess it's not. 

The actual problem I'm trying to solve that it can take well over 30 seconds to tune one if these new IPTV channels I've added to my TVHeadend server. 

Additionally, once successfully tuned, the channel plays fine. However when I hit "back" to try and go back to the guide screen, it takes another 30 seconds+ to show the guide screen. This long back time to the guide seems to be related only when I've tuned these IPTV channels.... when watching live OTA channels, going back to the guide is pretty quick.

I've attached the emby server log after force rotating it and reproducing all these slowness problems.  I do see ffmpeg errors in there about "transcoding". There are not corresponding "ffmpeg-blah" logs (or any at all surrounding this time for past several hours).  

 

 embyserver.txt

Posted

@Brian_Oblivion

Hi.  Can you try searching for our standard android app (Just "Emby" on Amazon and "Emby for Android on Google) on the same device's app store and see how that compares?

Thanks.

 

Brian_Oblivion
Posted

Interesting... didn't even know that was available. 

I did install it and test it and the slow tuning performance is improved dramatically using the "android app". More typical <5 second tuning and doesn't take a minute etc... however the picture/sound quality is noticeably poorer. So, hmmm, maybe it is transcoding somewhere?  

Using the non-android version on my firecube, emby dashboard and the client stats for nerds says it's direct streaming. The "mux" the tvheadend server (also on the same machine) is using is streamlink (also running on the same server). Don't know if that helps any. 

 

 

Posted
Quote

I did install it and test it and the slow tuning performance is improved dramatically using the "android app". More typical <5 second tuning and doesn't take a minute etc... however the picture/sound quality is noticeably poorer. So, hmmm, maybe it is transcoding somewhere?  

Hi, did you explore the stats feature in the video player to learn if it was transcoding or not?

Brian_Oblivion
Posted

Yes. With the "Android" version streaming one of these troublesome channels, it reported direct streaming across the board on the client and on the emby dashboard.

I still do see files being created in the transcoding temp directory for emby. And those files grow and new ones get added while watching (*.ts files). It's easy to see since I am the sole person watching a channel :-).  When I tune away, the directory/files all disappear (cleaned up).

 

image.png.6a09f569360738274a793ceb4b1042f0.png

Posted

Right that is the live tv buffer.

  • 2 weeks later...
Brian_Oblivion
Posted

I've tried all kinds of crazy things (different profiles in tvheadend, different formats etc) to try and get my fire cube to tune (and "de"-tune) these IPTV channels in less than 45 seconds and nothing has worked. Everywhere else, on my Roku, firestick(s), phone, web etc... it's fine (or tolerable anyways at around 5 seconds). Even in the android app version on the fire cube device work OK (as noted). 

It's something about the emby fire cube/tv app that is really weird. Takes 45 seconds to tune, takes 45 seconds to go back to the channel guide. When going back to the guide, the server nearly instantly reports the channel has stopped being watched on the dashboard.  The fire cube just hangs with a black screen for about 45 seconds before returning to the guide. 

Any other suggestions or advice?

 

 

 

Posted
13 hours ago, Brian_Oblivion said:

The fire cube just hangs with a black screen for about 45 seconds before returning to the guide. 

Do you have refresh rate switching enabled?

Q-Droid
Posted

In TVH you should only be using the pass through (pass) profile. Otherwise you can end up modifying the streams more than once. 

  • Solution
Brian_Oblivion
Posted
5 hours ago, ebr said:

Do you have refresh rate switching enabled?

Well... the short answer seems to be no but yes lol. 

I looked at the menu settings and I saw all the resolutions and refresh rate options so I thought maybe I did.  I went to the fire cube display settings and indeed it was off. That is, the "match frame rate" option was unchecked. 

I went back into emby again, same behavior, same options. Then I went and turned **on** the match frame rate option. Rebooted the fire cube for good measure and went and checked.... same thing.... same behavior. 

 

Went back into the fire cube settings, turned off the match frame rate option. Rebooted it, went into emby... and poof the option is gone and the tuning is much improved. About 5-10 seconds to tune and doesn't hang when going to back to the guide screen. 

So it would seem turning it on, reboot fire cube, then turn it off, reboot fire cube... fixed the problem. Or least makes it easier to live with. 

 

If you have any tips for improving live tv tuning speed I would love any help there. I have an OTA card with 4 tuners on it and wish it would use some sort of predictive tuning on the 4 tuners. i.e. watching OTA channel 1, then OTA channel 2 is tuned. A new OTA tuner is used and the old tuner remains tuned to channel 1. So when I flip back to channel 1, it's "ready to go".... but this is whole thread of it's own :-). 

 

Pretty weird... but thanks for helping me fix it! 

 

  • Thanks 1

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