Jump to content

Added buffering for live tv option?


syadnom

Recommended Posts

syadnom

I have a consistent issue where the stream seems to start playing on web ui, roku, ios apps and jitters a little as if it's not buffering enough.  Can we change the number of seconds to buffer for all devices?  That would be key to getting good performance for playing live tv. 

  • Like 1
Link to comment
Share on other sites

Hi.  Can we please look at an example of the issue you are having so that we can determine the best resolution?

Thanks.

 

Link to comment
Share on other sites

syadnom

See attached video.  couldn't get it to record with audio for whatever reason but it's apparent in the video.  audio does pause as well.  You can see when I start playing and then every few seconds the playback pauses.  This continues indefinitely but if I pause it for 3-4 seconds and then play it's resolved.  Happens in chrome, roku, ios apps.  pausing for a few seconds fixes it.

 

This is the #1 thing that keeps me on Plex.  I really want off Plex but these playback issues are really annoying.

 

Thanks.

Link to comment
Share on other sites

syadnom

This is from a different session but on my phone.  I wanted to take the chrome player's CPU use out of the mix.  This stream does the same stuttering as the posted video.

 

Note, CPU usage stays very low for this transcode.  I see the ~.95-.99 encode speed but I don't know why that would be with a GTX970 hardware encoding and the CPU barely touched. 

ffmpeg-transcode-3196a2f6-1f13-4912-9fc2-50fe54298181_1.txt

Link to comment
Share on other sites

Thanks. Hopefully, some of the improvements we're working on with live TV in general will improve this.

Link to comment
Share on other sites

syadnom
1 hour ago, ebr said:

Thanks. Hopefully, some of the improvements we're working on with live TV in general will improve this.

So is this basically an emby problem, or is my GTX970 just not fast enough to transcode from mpeg2 > h.264?

Link to comment
Share on other sites

I think it is likely a combination of things creating some sort of bottleneck.

Link to comment
Share on other sites

syadnom

The machine is a Dell 790 with a 2nd gen i5-2400 quad core so it's a bit dated.  I also have both an HDHomeRun Extend and Quatro and the Extend is a little worse.  I think decoding the mpeg2 stream is part of the challenge.

 

As far as those improvement you're working on, are they in a beta form I can install or still a ways off?

Link to comment
Share on other sites

syadnom

I just reverted to 4.3.1.0 and it's a substantial improvement on both of my systems.

 

1) Win 10, i5-2400, GTX970

2) Ubuntu 18.04,  i5-6500T

 

I have a third system that was recently updated to 4.4 and it's also stuttering.   

 

 

Link to comment
Share on other sites

syadnom

@ebr - troubleshooting with another user on the forums here, I feel like it's been traced down to a pause during the HLS segment write when the video catches up and the next segment isn't written yet or it hasn't updated the m3u8 file yet or something like that.  If I pause the video for like 1 second it solves it.  all versions I try do this buy 4.3.1 did it a lot less.

Link to comment
Share on other sites

syadnom

ok ,so I found MinSegments=1 in the log.  I believe this is the issue.  I think that I'm already done playing that first segment before the second one has been written and the m3u8 updated.  Is it possible to change this to 2?  I believe that would solve this.  If it were a toggle in the transcoder config that would be even better.  Thoughts?

  • Like 1
Link to comment
Share on other sites

Can we please see identical ffmpeg log examples from both versions? Thanks.

Link to comment
Share on other sites

Guest CodeCat5

I've seen this issue as well on my Nvidia Shield and Firestick, and I *think* I've seen it on an old Roku stick too though I could be wrong about the Roku. It seems a bit intermittent since I tried to reproduce it a few hours ago when I first saw this thread and couldn't. It just happened on my Firestick 2-3 times a few minutes ago, so I downloaded some logs. Hopefully this is what you're looking for @Luke? I'm still fairly new to Emby so if there's somewhere else I should be looking for logs or there's any other info you need please let me know.

As for what I was doing at the time, I was watching channel 5 from my antenna for a bit, then went to the guide and switched to channel 2. Within the first 30 seconds or less I heard the audio cut out for a few seconds. I think I saw it again about 30 seconds later, but it was at the end of a commercial so it's hard to say for sure. Then just before I downloaded the logs it froze for a good 10+ seconds and then resumed playing.

FYI, I've seen it happen fairly often on my Shield as well, but I can usually get it to stop by skipping back 10 seconds.

 

ffmpeg-transcode-6975508c-ef8f-4d86-bee9-294f89c3c98e_1.txt embyserver.txt

Link to comment
Share on other sites

19 hours ago, CodeCat5 said:

but it was at the end of a commercial

Hi.  Is the main channel maybe transmitting in Dolby Digital but the commercial in stereo?  You could see audio drops on switches between audio codecs (especially if using a receiver).

Also, the ffmpeg log you provided was from playing an AVI file - not live TV.  Are you sure you got the right one?

Link to comment
Share on other sites

Guest CodeCat5
20 minutes ago, ebr said:

Hi.  Is the main channel maybe transmitting in Dolby Digital but the commercial in stereo?  You could see audio drops on switches between audio codecs (especially if using a receiver).

I'm not entirely sure how I would be able to tell if that was the case. If you saw something indicating that in the logs though then I *think* that may just be a different minor issue. Normally when I see the issue, it's in the middle of a show and seems to happen every 10-30 seconds until I hit the "skip back" button. It seems like having that extra buffer time somehow resolves it. While I do have a receiver in my living room that's used with my Shield, in this particular case I was watching on my Firestick which is connected directly to a TV with no receiver in the middle.

Quote

Also, the ffmpeg log you provided was from playing an AVI file - not live TV.  Are you sure you got the right one?

Ahh, my mistake. I didn't realize it, but my kids must have also been watching TV in the living room at the time and I just grabbed the most recent log since the timestamp and such seemed about right. It'll probably be tomorrow before I can try to test things again, but I'll see if I can post some better logs the next time I see it happen.

Link to comment
Share on other sites

Guest CodeCat5
9 hours ago, ebr said:

Have you tried changing the app setting for Live TV start time to Long?

I'm currently looking at the "Live TV Start Time" setting on my Shield and I only see Fast/Normal/Slow as options, but not "Long". I'm assuming "Slow" is the setting you were referring to? I went ahead and changed it to "Slow" and I'll see how that works out. So far after basic tests, I don't see any issues and do not see any other noticeable differences after changing that setting. I'll report back with some better logs if I'm able to reproduce the issue again though.

Link to comment
Share on other sites

Guest CodeCat5

@ebr This instance seemed to be fairly mild, but I think I managed to capture some logs where the audio cut out 3 times for a couple of seconds within the first minute or two. In this case I turned on my Nvidia Shield, went to Live TV, browsed the guide, and selected Fox 5 from the channel list from my antenna. It was in the middle of some kind of Nascar coverage, so no commercials or anything like that. Within the first 10-20 seconds or so i heard the audio cut out for a second or two. Then I heard it happen at least two more times within the next minute or so. Hopefully these logs have something useful for you.

ffmpeg-directstream-abdde4a8-08e2-4418-80cf-5ca7b1f27151_1(1).txt embyserver(1).txt

Link to comment
Share on other sites

syadnom
On 7/17/2020 at 10:28 AM, Luke said:

Can we please see identical ffmpeg log examples from both versions? Thanks.

Sorry for the delay.  Here are logs playing the same channel on 4.4.3.0 and 4.5.0.14 beta

 

Both have the identical 'pause' every 3 seconds as the chunks are being written out.  

4.5.0.14-beta-ffmpeg-transcode-bad4a91a-67a2-4e81-8b16-4dc8da66d79f_1.txt4.4.3.0-ffmpeg-transcode-10667a0a-3550-4de8-a79d-df2c3cc75cea_1.txt

Link to comment
Share on other sites

syadnom

Plex doesn't have this behavior at all.  I've changed out network switches and double checked that the tuner is coming up 100FDX and the PC port 1GFDX to make sure no physical issues were present.  I can play the HDHomeRun's streams in VLC perfectly as well.

Link to comment
Share on other sites

16 hours ago, syadnom said:

Sorry for the delay.  Here are logs playing the same channel on 4.4.3.0 and 4.5.0.14 beta

 

Both have the identical 'pause' every 3 seconds as the chunks are being written out.  

4.5.0.14-beta-ffmpeg-transcode-bad4a91a-67a2-4e81-8b16-4dc8da66d79f_1.txt 20 kB · 0 downloads 4.4.3.0-ffmpeg-transcode-10667a0a-3550-4de8-a79d-df2c3cc75cea_1.txt 18.2 kB · 1 download

Have you tried changing the same setting I suggested for CodeCat?

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