Jump to content

Problems playing m3u - spinning on all devices


r1ng0

Recommended Posts

Server: 4.0.3.0

 

Playing with iptv.

Confirmed the setup works on VLC (windows).

Setup Live TV on Emby using m3u. It did get the channels, and I can play couple channels in the web client or android app as soon as I start the server. But shortly after everything stops playing - it just spins, both on web and android. Comes back for a couple more plays on server restart. Same behavior on both QNAP NAS and Window Emby server.

 

When it's spinning attempting to play, no ffmpeg* logs are created (but these do get created first couple times when it's actually working after restart).

From embyserver.txt log (sanitized):

2019-03-30 17:05:33.639 Info HttpServer: HTTP GET http://<embyserver>:8096/emby/System/Endpoint. UserAgent: <User Agent>
2019-03-30 17:05:33.639 Info HttpServer: HTTP Response 200 to 192.168.XX.XX. Time: 0ms. http://<embyserver>:8096/emby/System/Endpoint
2019-03-30 17:05:40.585 Info HttpServer: HTTP GET http://<embyserver>:8096/emby/Users/<userid>. UserAgent: <User Agent>
2019-03-30 17:05:40.601 Info HttpServer: HTTP Response 200 to 192.168.XX.XX. Time: 16ms. http://<embyserver>:8096/emby/Users/<userid>
2019-03-30 17:05:40.617 Info App: User policy for <user>. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
2019-03-30 17:05:40.617 Info App: Profile: Unknown Profile, Path: http://<iptv>.co:2086/<userid>/<password>/3272, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
2019-03-30 17:05:40.617 Info App: Profile: Unknown Profile, No direct play profiles found for Path: http://<iptv>.co:2086/<userid>/<password>/3272
2019-03-30 17:05:40.617 Info App: Profile: Unknown Profile, Path: http://<iptv>.co:2086/userid/<password>/3272, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
2019-03-30 17:05:40.617 Info App: Profile: Unknown Profile, No direct play profiles found for Path: http://<iptv>.co:2086/<userid>/<password>/3272
 
Loading http://<iptv>.co:2086/<userid>/<password>/3272 in the browser successfully downloads the stream.
 
Link to comment
Share on other sites

Hi there, let's look at an example. Please attach the complete emby server log. thanks !

Link to comment
Share on other sites

Complete as in non sanitized, with passwords and all, or full log from the beginning (with passwords redacted out)?

Link to comment
Share on other sites

Here's another log (with debug option checked). In this cases multiple channels were playing fine on web, android and roku for good 10 minutes until all broke. Once emby gets into this state no channels play on any devices, it just spins. The only fix is to restart the server.

embyserver-sanitized.txt

Link to comment
Share on other sites

Anything I can do now to get this working in the meantime? This was the reason I got premium in the first place...

Link to comment
Share on other sites

  • 2 weeks later...
hshah

@@Luke, I am running the latest beta and have noticed this behaviour a few times now.  Was the fix implemented?  Would you like me to capture logs when it next occurs?

Link to comment
Share on other sites

hshah

Yes please, thanks.

 

Slightly off-topic, but is there a way to reduce the level of logging? A lot of what is logged looks to be overkill when one isn't trying to debug an issue etc.

Link to comment
Share on other sites

hshah

I have managed to capture some logs... and I think I have depersonalised everything too :)

 

Weirdly enough, I am now also experiencing the stream repeating itself, which is something that was raised on here a couple of years ago (https://emby.media/community/index.php?/topic/44840-live-tv-automatically-jumping-backwards).  Hopefully you (@Luke) can spot what on Earth is going on from the same logs.

 

In terms of the logging itself, for the systems I manage at both home and work, the norm is to save warnings/errors and information that may be useful on a day to day basis.  However, when it comes to troubleshooting/debugging, the option to enable all the logging of additional information is available.  For day to day use, we don't need the info level logs, especially because the sheer volume of them may hide actual errors/warnings.  Just thinking that the "Enable debug logging" option could be expanded a little to allow user configuration or just even provide 3 - 4 preset levels which can be selected from a dropdown.

logs.zip

Link to comment
Share on other sites

Why not turn debug logging off and only use it when "debugging" something?

 

BTW, concerning your problem.  I common thing I've seen is that repeating streams are usually a tell tale sign you are using m3u8 streams vs TS streams.  See if you can use TS format.  Most providers allow you to request this format on the URL line used to fetch the M3U files.

&type=m3u_plus&output=ts

Adding that to the URL used to pull back the M3U file will often due the trick.

 

In any case have you tried your M3U file playing back in VLC?  If you open your playlist in VLC and get the same repeating segments then the issue is outside of Emby and nothing Emby does will help.

Link to comment
Share on other sites

hshah

Why not turn debug logging off and only use it when "debugging" something?

 

BTW, concerning your problem.  I common thing I've seen is that repeating streams are usually a tell tale sign you are using m3u8 streams vs TS streams.  See if you can use TS format.  Most providers allow you to request this format on the URL line used to fetch the M3U files.

&type=m3u_plus&output=ts

Adding that to the URL used to pull back the M3U file will often due the trick.

 

In any case have you tried your M3U file playing back in VLC?  If you open your playlist in VLC and get the same repeating segments then the issue is outside of Emby and nothing Emby does will help.

 

I have debugging logging disabled anyway, but I would like to also remove the info level logging as well.  On an average day for me, it is writing 10-30mb of data and makes spotting actual errors quite difficult.  Would be nice to choose between the generic ALL, DEBUG, INFO, WARN and ERROR levels.

 

 

With regards to the m3u8 vs ts, I am not sure where I read it or if I just made it up, but for some reason I thought m3u8 was the optimum choice.  I have it set to m3u8 in Xtream-Editor so changing that setting is as easy as flicking a switch.

 

Cheers @cayers.  I am going to go off and read up on these two formats.  Whilst I do though, would you mind really briefly explaining why m3u8 would cause such a behaviour and ts is unlikely to?

Link to comment
Share on other sites

The nutshell view is that a TS file is a single stream from start to finish.  Think of having put an Mp4 file in the cloud and playing it back remotely.  You're essentially just downloading/playing the single file using a single connection.

 

The M3U8 format is a much more advanced "package".  The file or stream being broadcast is broken down into CHUNKS of data.  Besides these chunks there is also a manifest file written.  Think of the manifest in this case as a simple text file with a list of these chunks and the URL to pull each of the chunks down from the provider. Each chuck and manifest read is a new connection or re-purposed connection.

 

So with the TS format you basically open a connection to fetch the TS file and keep the connection open until it's done which is pretty simple.  If data slows down the client will pause until more data is delivered. 

 

With M3U8 files, if the server doesn't update the manifest in a timely manner, the manifest is temporarily not available, the server doesn't get the next chunks written or any other similar type thing the client may not know there is a problem.  It pulls the next manifest or is still using the current one and pulls back what it thinks is the current chunk.  You can so how this could cause the client app to pull down the current chunk over and over again which gives the impression of a loop or repeating scenes that will likely be of 5 to 60 seconds in duration.

 

With that said M3U8 manifests are important for streaming (just maybe not in this context).  When used correctly you can do things like serve up PREPARED media in different resolutions and bitrates and dynamically switch as needed from the client.  This is how companies like Netflix, Amazon Prime serve up media.  Each movie or TV show might exist in 10 to 15 different combinations of resolution/bitrate.  The client can then dynamically switch (between chunks) which version it wants to use.  If bandwidth is tight or the client buffer is almost empty it can choose to use for example a 2 Mb version.  When there is plenty of bandwidth available and the buffer is staying full it might request a 10 Mb version.  This is how programs "dynamically" adjust.  Youtube does the same sort of thing.

 

However getting back to our use of these 2 formats (TS & M3U8) the provider doesn't have SEVERAL different versions of the media prepared and ready to use.  It only has the ONE format available which could be 8 Mb on one channel and 4 Mb on another channel.  So why use M3U8 which is more complex when the TS format would work without the extra overhead and complications?

 

That of course is an over simplification of what's going on but I think helps explain it a bit.  With the more simpler method of a TS stream it's VERY SIMPLE to identify problems. For example if on playback you get a lot of pauses the data isn't flowing fast enough for some reason.

 

So try switching your format to TS and see if your issues go away.  You're not missing out on anything by doing this.

 

Hope that helps,

Carlo

Edited by cayars
  • Like 1
Link to comment
Share on other sites

  • 8 months later...

I had exactly the same problem.

The problem was simply that the links in the m3u file were actually m3u8 links so I created a m3u8 file with VLC

Link to comment
Share on other sites

Your ffmpeg log contains rtps urls, but those aren't in your screenshot. I only see http urls there. Are you sure this is the right log?

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