Jump to content

LIVE TV Streams Not Available


NYRANGERS423

Recommended Posts

NYRANGERS423

I have a m3u file setup for live tv and I am limited to 3 streams at a given time. I can recreated this issue by tuning into a stream waiting a few minutes then moving to a different stream. I do this on multiple devices to simulate the usage. Then this occurs. The issue is Emby, from my perspective, "holds up" the available streams. No streams will be playable and on any device I will get too many errors give up on any device with the Emby app. Using the browser I will get the loading circle of death. When I go to my dashboard it will show no users are using the LIVE TV streams, movies and shows work normally. Troubleshooting I have done to narrow down the issue:

  • A restart of the emby sever will resolve the issue.
  • If I use vlc player to stream a channel from the m3u file while emby is having this issue. VLC gives me a error due to no streams available. If I leave a stream playing on vlc player and simulate TV usage on emby to recreate this issue the stream on the vlc player will play normally. I would then shutdown the stream on vlc and try to stream on emby. It will then start streaming but once I leave that channel on emby to switch to a new one the issue persists. Which leads me to believe emby is "holding up the streams". 
  • I changed the limit on the m3u device, for the tuner devices in the emby server settings to "0" which should have the stream limit unlimited. I have noticed I do not get the "simultaneous stream limit has been reached". I get "Error HttpServer: Error processing request"

 

I will attached the log with the simultaneous stream limit has been reached. This is when I have the stream limit set to "3". and I will attach the log with HTTPServer error. If you need the full logs please let me know or if you need any more information.   

embyserver _Breakdown _ StreamError.txt embyserver-63733198738_HTTPError.txt

Link to comment
Share on other sites

Hi,

Can we try something?  Do an Emby Server restart.

Then connect via a web browser and go to your your Live TV section.  Pick a channel to watch and click PLAY.  Do nothing for 5 minutes.  If you get a spinning circle just let it set without touching it.  I want to see if this is a "slow start" issue or if it just will not play.  After the 5 minutes upload your new server log file and if there is an ffmpeg file with this date/time upload that as well.

Thanks

Link to comment
Share on other sites

NYRANGERS423
30 minutes ago, cayars said:

Hi,

Can we try something?  Do an Emby Server restart.

Then connect via a web browser and go to your your Live TV section.  Pick a channel to watch and click PLAY.  Do nothing for 5 minutes.  If you get a spinning circle just let it set without touching it.  I want to see if this is a "slow start" issue or if it just will not play.  After the 5 minutes upload your new server log file and if there is an ffmpeg file with this date/time upload that as well.

Thanks

 

I just completed that test. The stream did played well for the 5 minutes. Attached is the log and the ffmpeg file.ffmpeg-directstream-746b7ab8-da9d-43e5-9519-2c64ac8eb0f7_1_Test.txtembyserver_Test.txt

Edited by NYRANGERS423
Link to comment
Share on other sites

NYRANGERS423

The issue does not happen right away. I did the restart like you asked and started playing the stream. Had no issues. As an update since that restart I simulated multiple people accessing live tv on multiple devices. The issue came back within minutes. I will keep the server running without a restart and if you would like to try anything while the server is having these issues we can. Currently, this happens with no other devices connected and when I click play stream from the live tv section I will wait about 2 minutes and this appears" Playback Error, No compatible streams are currently available. Please try again later or contact your system administrator for details."


Attached to this post are the current log files, if you go the most recent time stamp I started the stream till I received the error I stated above then grab the log files to upload here.

This is what I believe the issue is from the logs below. There is a issue starting ffmpeg, something about could not find a file for transcoding, and The write operation failed, see inner exception.. 

2020-08-16 23:13:45.336 Error HttpServer: Error processing request
    *** Error Report ***
    Version: 4.4.3.0
    Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
    Operating system: Unix 5.3.18.3
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///system/System.Private.CoreLib.dll
    System.Environment.Version: 3.1.2
    Processor count: 12
    Program data path: /config
    Application directory: /system
    System.IO.FileNotFoundException: System.IO.FileNotFoundException: Could not find file '/config/transcoding-temp/85e334dc7e904ad1888347cc45c41032.ts'.
    File name: '/config/transcoding-temp/85e334dc7e904ad1888347cc45c41032.ts'
       at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
       at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
       at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, FileOpenOptions fileOpenOptions)
       at Emby.LiveTV.TunerHosts.LiveStream.CopyFile(String path, Boolean seekFile, Int32 emptyReadLimit, Stream stream, IFileSystem fileSystem, IStreamHelper streamHelper, CancellationToken cancellationToken)
       at Emby.LiveTV.TunerHosts.LiveStream.CopyToAsync(Stream stream, CancellationToken cancellationToken)
       at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
       at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
    Source: System.Private.CoreLib
    TargetSite: Void ThrowExceptionForIoErrno(ErrorInfo, System.String, Boolean, System.Func`2[Interop+ErrorInfo,Interop+ErrorInfo])


2020-08-16 23:13:45.569 Error HttpServer: Error processing request
    *** Error Report ***
    Version: 4.4.3.0
    Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
    Operating system: Unix 5.3.18.3
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///system/System.Private.CoreLib.dll
    System.Environment.Version: 3.1.2
    Processor count: 12
    Program data path: /config
    Application directory: /system
    System.Exception: System.Exception: Error starting ffmpeg
       at Emby.Server.MediaEncoding.Api.BaseStreamingService.StartFfMpeg(StreamState state, String outputPath, CancellationTokenSource cancellationTokenSource, Boolean acquireResources)
       at Emby.Server.MediaEncoding.Api.Hls.BaseHlsService.ProcessRequest(StreamRequest request)
       at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
       at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
       at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
    Source: Emby.Server.MediaEncoding
    TargetSite: Void MoveNext()

 

 

2020-08-16 23:13:49.230 Error HttpServer: Error processing request
    *** Error Report ***
    Version: 4.4.3.0
    Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
    Operating system: Unix 5.3.18.3
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///system/System.Private.CoreLib.dll
    System.Environment.Version: 3.1.2
    Processor count: 12
    Program data path: /config
    Application directory: /system
    System.IO.IOException: System.IO.IOException: The write operation failed, see inner exception.
     ---> System.Net.Sockets.SocketException (104): Connection reset by peer
       at System.Net.Sockets.Socket.EndSend(IAsyncResult asyncResult)
       at SocketHttpListener.SocketStream.EndWrite(IAsyncResult asyncResult)
       at System.IO.Stream.<>c.<BeginEndWriteAsync>b__61_1(Stream stream, IAsyncResult asyncResult)
       at System.Threading.Tasks.TaskFactory`1.FromAsyncTrimPromise`1.Complete(TInstance thisRef, Func`3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Net.Security.SslStream.<WriteSingleChunk>g__CompleteAsync|210_1[TWriteAdapter](ValueTask writeTask, Byte[] bufferToReturn)
       at System.Net.Security.SslStream.WriteAsyncChunked[TWriteAdapter](TWriteAdapter writeAdapter, ReadOnlyMemory`1 buffer)
       at System.Net.Security.SslStream.WriteAsyncInternal[TWriteAdapter](TWriteAdapter writeAdapter, ReadOnlyMemory`1 buffer)
       --- End of inner exception stack trace ---
       at System.Net.Security.SslStream.WriteAsyncInternal[TWriteAdapter](TWriteAdapter writeAdapter, ReadOnlyMemory`1 buffer)
       at System.Threading.Tasks.TaskToApm.End(IAsyncResult asyncResult)
       at SocketHttpListener.Net.HttpResponseStream.EndWriteCore(IAsyncResult asyncResult)
       at SocketHttpListener.Net.HttpResponseStream.EndWrite(IAsyncResult asyncResult)
       at System.IO.Stream.<>c.<BeginEndWriteAsync>b__61_1(Stream stream, IAsyncResult asyncResult)
       at System.Threading.Tasks.TaskFactory`1.FromAsyncTrimPromise`1.Complete(TInstance thisRef, Func`3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization)
    --- End of stack trace from previous location where exception was thrown ---
       at System.IO.Stream.CopyToAsyncInternal(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
       at Emby.Server.Implementations.HttpServer.FileWriter.WriteToAsync(IResponse response, CancellationToken cancellationToken)
       at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
       at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
    Source: System.Net.Security
    TargetSite: Void MoveNext()
    InnerException: System.Net.Sockets.SocketException: Connection reset by peer
    Source: System.Net.Sockets
    TargetSite: Int32 EndSend(System.IAsyncResult)
       at System.Net.Sockets.Socket.EndSend(IAsyncResult asyncResult)
       at SocketHttpListener.SocketStream.EndWrite(IAsyncResult asyncResult)
       at System.IO.Stream.<>c.<BeginEndWriteAsync>b__61_1(Stream stream, IAsyncResult asyncResult)
       at System.Threading.Tasks.TaskFactory`1.FromAsyncTrimPromise`1.Complete(TInstance thisRef, Func`3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization)
    --- End of stack trace from previous location where exception was thrown ---
       at System.Net.Security.SslStream.<WriteSingleChunk>g__CompleteAsync|210_1[TWriteAdapter](ValueTask writeTask, Byte[] bufferToReturn)
       at System.Net.Security.SslStream.WriteAsyncChunked[TWriteAdapter](TWriteAdapter writeAdapter, ReadOnlyMemory`1 buffer)
       at System.Net.Security.SslStream.WriteAsyncInternal[TWriteAdapter](TWriteAdapter writeAdapter, ReadOnlyMemory`1 buffer)

embyserver_issue recreated.txt ffmpeg_Issue recreated.txt

Link to comment
Share on other sites

I also see this in the ffmpeg log.

23:13:45.553 http://127.0.0.1:8096/LiveTv/LiveStreamFiles/85e334dc7e904ad1888347cc45c41032/stream.ts: Server returned 404 Not Found

It's as if no streams are available.

By any chance when you try to play back are you backing out or once starting to play the channel staying on that channel?

Link to comment
Share on other sites

NYRANGERS423

Hmmm, that is interesting. Before the issue occurs, I do play a stream when it loads I do back out and click another stream. This is how I recreate this issue but once the issue occurs I don't have to do anything to get to not stream. What I mean is right now no stream are compatible still. i have not restarted the server and if I click the stream in about a minute of it loading it throws the error.

Link to comment
Share on other sites

NYRANGERS423

Do you think this may be a transcoding problem? Every time I play a stream I do get the Could not find file '/config/transcoding-temp/2028f718f67847c8acc44801b801b276.ts'. error report then right after is the Error starting ffmpeg. 

Link to comment
Share on other sites

NYRANGERS423
37 minutes ago, cayars said:

I also see this in the ffmpeg log.

23:13:45.553 http://127.0.0.1:8096/LiveTv/LiveStreamFiles/85e334dc7e904ad1888347cc45c41032/stream.ts: Server returned 404 Not Found

It's as if no streams are available.

By any chance when you try to play back are you backing out or once starting to play the channel staying on that channel?

Forgive me for the rapid posts. I had a thought I wanted to add. If emby right now is receiving a return of 404 not found that will be because no stream are available. My limit on the m3u file is 3. Here is the weird part, no devices or users on emby are using any streams. If I check the m3u file in vlc player I get the 404 not found. I checked with the source I get the m3u file from and I the return 404 is normal if no streams are available. This again makes me believe emby is holding up the streams some where?

Link to comment
Share on other sites

35 minutes ago, NYRANGERS423 said:

Hmmm, that is interesting. Before the issue occurs, I do play a stream when it loads I do back out and click another stream. This is how I recreate this issue but once the issue occurs I don't have to do anything to get to not stream. What I mean is right now no stream are compatible still. i have not restarted the server and if I click the stream in about a minute of it loading it throws the error.

I think  what's happening is by backing out Emby doesn't know the stream has ended so it never let's go of the tuner.  Doesn't take long to eat up your three streams this way.

What you want to do is WAIT to either let it start to play or get an error, that way the tuner stream is freed up.

Link to comment
Share on other sites

NYRANGERS423
6 minutes ago, cayars said:

I think  what's happening is by backing out Emby doesn't know the stream has ended so it never let's go of the tuner.  Doesn't take long to eat up your three streams this way.

What you want to do is WAIT to either let it start to play or get an error, that way the tuner stream is freed up.

That is what I think is happening as well. I can try to wait till the stream plays before backing out to change to a different channel or complete any action at all. Now is there any way that I could prevent this as sometimes my streams do take some time to load and more often then not me or my family would back out to a different channel which would cause to this issue. Is there a way I could set up a way for emby to timeout the stream or maybe every so often check to make sure the user is useing the tuner device to maybe clear out the streams?

Link to comment
Share on other sites

That's the only way I know of unless a fix can be made for this which might be rather hard to do.

Link to comment
Share on other sites

NYRANGERS423

If a fix for the issue is difficult to complete could there be a possibly to expand some kind of way to manually control the streams for the tuner device from emby. Maybe a feature where we can manually disconnect or clear streams in use without restarting. If I could do something like that with the api I could make it easier for me to keep up with this issue if it does persist with me.

Link to comment
Share on other sites

I can tell you the whole Live TV/DVR section will be replaced with new functionality and is hot in development right now.  This is to both add new features and to have a new pipeline that can be adjusted far easier to handle fixes like this if needed.  So with the new project I'm not sure how much sense it makes to fix old code unless it's something simple which this is not.

Hope that helps,

Carlo

 

Link to comment
Share on other sites

NYRANGERS423

I really do appreciate that. I understand timelines may be difficult to predict but would you be able to say if this is very roughly few months away for more towards a year to 18 months or even longer. If you do not have the kind of information I also understand. I appreciate the assistance with this problem and your time. You were very helpful. 

Link to comment
Share on other sites

Can't say.  Not trying to be coy or hiding info but it'll be ready when it's ready, hopefully sooner then later. :)

The best thing I think I can recommend is to tell your friends and family that have access to your Live TV is to wait until it starts to play or gives an error. Usually with cable TV the wait isn't too bad.  Not great for channel surfing but it makes you look at the EPG better to figure out what you want to watch. :)

Edited by cayars
Link to comment
Share on other sites

NYRANGERS423

I do understand that. I just thought I would ask anyway. It definitely does! I really look at the guide before we make any decisions. Again, thanks for the help with this.  Big EMBY supporter here 😋

  • Like 1
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...