Jump to content

In the IPTP plugin when using HLS a stalled buffer error is not handled


Recommended Posts

Posted (edited)

@Luke I took the Emby IPTV plugin and enhanced the UI to handle m3u files. I can now add hundreds of channels easily. During my testing I noticed that when using HLS you catch the "buffer stalled error" when frame changes occur, but you don't handle the error itself.  I suggest that when this happens that you remove the playing HLS and instantiate a new one to continue playing. This has worked for me in the past. Otherwise, the screen will stay frozen with a spinning spinner.  I admit that this suggestion creates a brief disruption (a second or two) but for the user, the program continues to play. This almost always happens when the playing media switches to or from a commercial.

On a second topic, the IPTV plugin supports file urls. Can I use this plugin option to play Emby Library content?  If so, what would the URL look like?  I am trying to learn more about this plugin and the IChannel interface. 

Vic

P.S.  I just noticed that I could mitigate the stalled buffer problem by just changing the "quality" setting to cause HLS to reboot so to speak. This parameter is changed in the client, and the results are transmitted to the server. Is there an interface where I can do this my self?

Another interesting point is that the client is still sending progress reports (same progress with no changes) and receiving HLS data, but the screen is not displaying anything. Perhaps this is why changing the resolution (quality) switches the plugin to displaying again.

 

image.thumb.png.8ceb130295d01e6bed63afbd045b4dc4.png

 

 

 

 

 

 

 

Edited by VicMoore
  • Thanks 1
Posted

Hi, we'll take a look at it. Thanks.

Posted

 

@Lukethere is another problem with the IPTV plugin.  It does not work for files. I used the url below and received the error message that "No Compatible Stream was Found." I tried several other file urls with no success.

Vic

 

\\MediaServer2\Media\Movies%201\Dean%20Martin\Five%20Card%20Stud%20(1968)\(Movie)%20Five%20Card%20Stud%20(1968,%20Dean%20Martin,%20Robert%20Mitchum).avi
Added 10/14/2025 8:56 PM
 
 
  • Thanks 1
Posted

@LukeAs you know, Emby clients use HLS to play IPTV streams. A widely reported problem is the "Stalled Buffer" fatal error.  HLS cannot mitigate this problem. It occurs when the stream goes through a change like Frame rate or resolution. The Emby web client post an error to the browser console log when it experiences this problem but sends no report back to the server. I propose that you send this error back to the server so developers can resolve the problem. A resolution is possible by sending a command to the client instructing it to play the media again at the current tick position. Remember we do this same step in both myTV and virtualTV.  This simple step provides a solution to a major IPTV problem without any changes to the Emby server.

I have tried to find in the session manager some means to determine when a buffer stall happens. I have found none. However, I did find it interesting that the Web Client continues sending "Progress" messages even when the client is hung by the buffer stall and displaying nothing.

Do you know if the buffer stalled error is reported in any way back to the server?

Vic

mickle026
Posted (edited)
2 hours ago, VicMoore said:

@LukeAs you know, Emby clients use HLS to play IPTV streams. A widely reported problem is the "Stalled Buffer" fatal error.  HLS cannot mitigate this problem. It occurs when the stream goes through a change like Frame rate or resolution. The Emby web client post an error to the browser console log when it experiences this problem but sends no report back to the server. I propose that you send this error back to the server so developers can resolve the problem. A resolution is possible by sending a command to the client instructing it to play the media again at the current tick position. Remember we do this same step in both myTV and virtualTV.  This simple step provides a solution to a major IPTV problem without any changes to the Emby server.

I have tried to find in the session manager some means to determine when a buffer stall happens. I have found none. However, I did find it interesting that the Web Client continues sending "Progress" messages even when the client is hung by the buffer stall and displaying nothing.

Do you know if the buffer stalled error is reported in any way back to the server?

Vic

Pluto tv does this, it changes audio codec in the adverts, so the channel just stalls.  You have to click stop and play again, its been reported several times.

@VicMooreCheck your messages, I have sent you a ton of code

Edited by mickle026
Posted

I am excited.....  about the code 🙂

Do you know if anyone has a fix for the Emby clients?   I wrote a web client last year and solved the hls problem by removing hls and then starting it again.

Vic

Posted

On another topic... Do you know how to formulate a file url to content into the emby library?

Vic

mickle026
Posted
Just now, VicMoore said:

I am excited.....  about the code 🙂

Do you know if anyone has a fix for the Emby clients?   I wrote a web client last year and solved the hls problem by removing hls and then starting it again.

Vic

Check the code, there lots there that will help, you'll be lost for weeks!

Posted

It's Christmas in October...  I will have so much fun...   thank you

Vic

mickle026
Posted (edited)
14 minutes ago, VicMoore said:

On another topic... Do you know how to formulate a file url to content into the emby library?

Vic

files are sandboxed, you will have to create a sandboxed internal streamhost Interface, and block all url transitions so the url cannot be escaped and directories traversed.  ie file to http via an internal socket, and play it as an url.

I have that coded already here.  I'll dig it out

Edited by mickle026

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