Jump to content


Photo

IPTV Stuttering


Best Answer mickle026 , 28 March 2020 - 01:55 PM

Now you found the reason why you are getting stuttering , ie cpu at 99%, you need to determine why its at 99%

 

1st to try is reboot Emby Server.  Sometimes on live tv a shared pipe sevice (you dont need to know what that is) can still run after channels have stopped playing.  This leaves ffmpeg open and transcoding to disk, this can be seen in the transcoding temp dir as it creates huge files the longer its been running.  Rebooting emby server cancels them and removes the temp files.  This is caused by a client exiting a selected channel as its starting but not quite playing yet.  These should terminate but very occasionly don't.  Rebooting the server (not the PC) sorts this out.  A running ffmpeg service hogs some of the cpu.

 

otherwise

 

Open task manager, click the performace tab.

 

You can see if HDDs are at 100% too or not and memory usage is high.  That'll show if something else is using them or if windows is probably using virtual memory.  If it is then that too is reading/writing to the disk.

 

If just the CPU is high then check running processes.  Some things like the indexing service can sometimes become corrupt .

 

If CPU + Memory + HDD is high then try unloading some processes, skype is a big *bleep* for making the disks access constantly.

 

There are 100's of things that can cause this, you need to narrow it down.

 

The Processes tab will show you what is using the most of everything.

 

Run Disk Check  - Scandisk /f

Go to the full post


  • Please log in to reply
42 replies to this topic

#1 leungalv OFFLINE  

leungalv

    Advanced Member

  • Members
  • 48 posts
  • Local time: 05:24 PM

Posted 22 March 2020 - 11:44 PM

Hi there,

 

I'm having some issues with LiveTV in Emby as described below.  

 

Specs

 

Computer

i3-2015 CPU @ 3.10 GHz

12GB RAM

Samsung SSD 840 EVO

IGP Intel HD3000

Windows 10 

 

Internet Connection

1 Gbps down - Have tested with and without VPN, does not make a difference on playback in Emby nor VLC.

 

Emby

Version 4.4.0.30 Beta

 

Emby Theater

3.0.8

 

Issue

 

IPTV playing from private server via m3u file.  Playback stutters every 5 to 10 seconds (no matter what channel) in Emby (i.e. freezes for 2-3 seconds, then resumes).  Same channel plays flawlessly in VLC. 

 

Thoughts?

 

 

 



#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 157215 posts
  • Local time: 05:24 PM

Posted 23 March 2020 - 02:18 AM

Moved to testing area. 



#3 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 157215 posts
  • Local time: 05:24 PM

Posted 23 March 2020 - 02:18 AM

Server/ffmpeg log?



#4 leungalv OFFLINE  

leungalv

    Advanced Member

  • Members
  • 48 posts
  • Local time: 05:24 PM

Posted 23 March 2020 - 10:08 AM

Server/ffmpeg log?

 

Will attach tonight, thank you for the prompt response.



#5 groenator OFFLINE  

groenator

    Advanced Member

  • Members
  • 123 posts
  • Local time: 10:24 PM

Posted 23 March 2020 - 01:58 PM

I can confirm I have the same issue. I will try uploading the logs later.

#6 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 157215 posts
  • Local time: 05:24 PM

Posted 23 March 2020 - 06:33 PM

Thanks, but first just try lowering the in-app quality setting. That will resolve almost all stuttering or buffering problems.



#7 leungalv OFFLINE  

leungalv

    Advanced Member

  • Members
  • 48 posts
  • Local time: 05:24 PM

Posted 24 March 2020 - 12:11 AM

I tried lower the in-app quality to no avail.  Tried on 4 different machines.

 

I have PM'ed the logs, respectfully, I don't have time to redact information at this time.

 

Thank you.



#8 leungalv OFFLINE  

leungalv

    Advanced Member

  • Members
  • 48 posts
  • Local time: 05:24 PM

Posted 26 March 2020 - 07:48 PM

Still happening with the latest Emby Server version :( 



#9 mickle026 OFFLINE  

mickle026

    Advanced Member

  • Members
  • 416 posts
  • Local time: 10:24 PM

Posted 26 March 2020 - 08:45 PM

have you tried playing your streams in vlc or such to make sure its actually emby and not the stream source?  - this is to the second user (groenator), i see the first has done this.

 

For the first if there are no problems in vlc (leungalv), check the server usage ie cpu etc, is hardware transcoding on/off etc

 

I have no problems currently with live tv or iptv streams playing,

 

But i did have a few days ago and that turned out to be windows 10 update caused that, it altered the samba settings which in turn stopped rdp (remote desktop) working and caused intermittent pauses on the whole machine.  It has also stopped the HOSTNAME discovery on my network.  (I still havent got that working, although everything says its on and all the services are running).   I have no idea why that would affect mine as it did or why samba would stop RDP working - but it did and just might not be emby.  My win 10 pro version is 10.1.18363.  I can access via the machine ip though.


Edited by mickle026, 26 March 2020 - 09:01 PM.


#10 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 157215 posts
  • Local time: 05:24 PM

Posted 26 March 2020 - 09:51 PM

Yes that is a good point. Sometimes it could be that the stream source is just not delivering the data quickly enough.



#11 leungalv OFFLINE  

leungalv

    Advanced Member

  • Members
  • 48 posts
  • Local time: 05:24 PM

Posted 27 March 2020 - 01:23 AM

Hi mickle026, I will look into the Windows 10 update issue and the hardware transcoding issue.  The streams are playing perfectly fine on VLC and Kodi on the same machine.  

 

@Luke, the stream source appears be fine.  It stutters only in Emby at all hours of the day - but always works fine in VLC and Kodi.

 

Thanks



#12 mickle026 OFFLINE  

mickle026

    Advanced Member

  • Members
  • 416 posts
  • Local time: 10:24 PM

Posted 27 March 2020 - 05:52 PM

Hi mickle026, I will look into the Windows 10 update issue and the hardware transcoding issue.  The streams are playing perfectly fine on VLC and Kodi on the same machine.  

 

@Luke, the stream source appears be fine.  It stutters only in Emby at all hours of the day - but always works fine in VLC and Kodi.

 

Thanks

The main difference there is Emby writes the stream to the hdd/ssd and re-streams it - reads it, whereas vlc and kodi don't.

 

So you also need to check drive access.  I cannot have the transcoding on an old HDD or a windows DrivePool (storage Spaces) drive or it stutters too.  I have mine on an SSD, it is my Win10 OS - SSD, but my server doesnt do anything else other than Emby.

 

C:\Users\<USER>\AppData\Roaming\Emby-Server\programdata\transcoding-temp

 

Here is an example of one of my channels.

 

The C33ABB.m2u8 and the TS files are an IPTV stream

 

The m3u8 is the playlist and has entries like this:

 

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:9
#EXTINF:3.520000,
hls/C33ABB/C33ABB.ts

 

5e7e745ccf676_transcoding.jpg

 

So when you play an IPTV stream in emby you are having both reads and writes to the transcoding temp directory.  If you can this wants to set to an SSD drive or a drive not in use by soimething else.  It can be set in the dashboard under transcoding there is a box for the temporary path, you can put a different path than the default here.


Edited by mickle026, 27 March 2020 - 05:55 PM.


#13 leungalv OFFLINE  

leungalv

    Advanced Member

  • Members
  • 48 posts
  • Local time: 05:24 PM

Posted 28 March 2020 - 12:35 AM

have you tried playing your streams in vlc or such to make sure its actually emby and not the stream source?  - this is to the second user (groenator), i see the first has done this.

 

For the first if there are no problems in vlc (leungalv), check the server usage ie cpu etc, is hardware transcoding on/off etc

 

I have no problems currently with live tv or iptv streams playing,

 

But i did have a few days ago and that turned out to be windows 10 update caused that, it altered the samba settings which in turn stopped rdp (remote desktop) working and caused intermittent pauses on the whole machine.  It has also stopped the HOSTNAME discovery on my network.  (I still havent got that working, although everything says its on and all the services are running).   I have no idea why that would affect mine as it did or why samba would stop RDP working - but it did and just might not be emby.  My win 10 pro version is 10.1.18363.  I can access via the machine ip though.

 

 

I turned on RDP, didn't help.

 

 

The main difference there is Emby writes the stream to the hdd/ssd and re-streams it - reads it, whereas vlc and kodi don't.

 

So you also need to check drive access.  I cannot have the transcoding on an old HDD or a windows DrivePool (storage Spaces) drive or it stutters too.  I have mine on an SSD, it is my Win10 OS - SSD, but my server doesnt do anything else other than Emby.

 

C:\Users\<USER>\AppData\Roaming\Emby-Server\programdata\transcoding-temp

 

Here is an example of one of my channels.

 

The C33ABB.m2u8 and the TS files are an IPTV stream

 

The m3u8 is the playlist and has entries like this:

 

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:9
#EXTINF:3.520000,
hls/C33ABB/C33ABB.ts

 

.......

 

So when you play an IPTV stream in emby you are having both reads and writes to the transcoding temp directory.  If you can this wants to set to an SSD drive or a drive not in use by soimething else.  It can be set in the dashboard under transcoding there is a box for the temporary path, you can put a different path than the default here.

 

I thought this might be a promising solution, but it didn't have any effect.  I tried both on the OS SSD and installed a separate SSD for transcoding to no avail.

 

I did notice, however, as you suggested I check in your previous post - CPU usage was 99%.  Of this, 90% is ffmpeg.

 

EDIT: I don't think it's the ffmpeg 90% CPU usage that's causing issues, since watching content stored on the system uses that amount as well. 


Edited by leungalv, 28 March 2020 - 02:34 AM.


#14 mickle026 OFFLINE  

mickle026

    Advanced Member

  • Members
  • 416 posts
  • Local time: 10:24 PM

Posted 28 March 2020 - 01:55 PM   Best Answer

Now you found the reason why you are getting stuttering , ie cpu at 99%, you need to determine why its at 99%

 

1st to try is reboot Emby Server.  Sometimes on live tv a shared pipe sevice (you dont need to know what that is) can still run after channels have stopped playing.  This leaves ffmpeg open and transcoding to disk, this can be seen in the transcoding temp dir as it creates huge files the longer its been running.  Rebooting emby server cancels them and removes the temp files.  This is caused by a client exiting a selected channel as its starting but not quite playing yet.  These should terminate but very occasionly don't.  Rebooting the server (not the PC) sorts this out.  A running ffmpeg service hogs some of the cpu.

 

otherwise

 

Open task manager, click the performace tab.

 

You can see if HDDs are at 100% too or not and memory usage is high.  That'll show if something else is using them or if windows is probably using virtual memory.  If it is then that too is reading/writing to the disk.

 

If just the CPU is high then check running processes.  Some things like the indexing service can sometimes become corrupt .

 

If CPU + Memory + HDD is high then try unloading some processes, skype is a big *bleep* for making the disks access constantly.

 

There are 100's of things that can cause this, you need to narrow it down.

 

The Processes tab will show you what is using the most of everything.

 

Run Disk Check  - Scandisk /f


  • leungalv likes this

#15 dcol ONLINE  

dcol

    Advanced Member

  • Members
  • 1381 posts
  • Local time: 02:24 PM
  • LocationTucson, Arizona

Posted 28 March 2020 - 01:58 PM

I use many IPTV channels simultaneously and never see stuttering but that may be because my transcoding temp directory is running on an SSD. So maybe the speed does have something to do with it. Also, the transcoding is done on an Nvidia GTX1660. My CPU never goes above 2% on the EmbyServer process while watching IPTV. Also, this server is dedicated to running Emby and associated tasks only.

 

Maybe the transcoding speed is also a factor.


Edited by dcol, 28 March 2020 - 02:12 PM.


#16 mickle026 OFFLINE  

mickle026

    Advanced Member

  • Members
  • 416 posts
  • Local time: 10:24 PM

Posted 28 March 2020 - 02:12 PM



 


 

 

I did notice, however, as you suggested I check in your previous post - CPU usage was 99%.  Of this, 90% is ffmpeg.

 

EDIT: I don't think it's the ffmpeg 90% CPU usage that's causing issues, since watching content stored on the system uses that amount as well. 

 

 

 

 

Jeez thats a Lot!!

 

This is my server with 1 iptv stream (HD), ffmpeg is hardly using anything.

 

5e7f92283830a_Untitled.png

 

 

So i'll set it to transcode and see how that compares, GPU is transcoding, CPU is the same, disk access is 4%, ffmpeg is at 0.4%

 

5e7f92e516365_Untitled.png

 

5e7f9341b2651_Untitled.jpg

 

You must be software transcoding ....................

 

Why is ffmpeg at 90% cpu ???


  • leungalv likes this

#17 dcol ONLINE  

dcol

    Advanced Member

  • Members
  • 1381 posts
  • Local time: 02:24 PM
  • LocationTucson, Arizona

Posted 28 March 2020 - 02:17 PM

I think that software encoding may be the answer here. Try hardware encoding with preferably an Nvidia GTX/RTX card. Using Intel is still in the CPU.

And if using an Nvidia card, unlock it so you can support more than 2 streams at once.

 

UPDATE***

Looked at the GPU and GPU Engine in Task Manager while IPTV streaming and EmbyServer and ffmpeg stayed at 0%. So there blows my theory.


Edited by dcol, 28 March 2020 - 02:23 PM.


#18 mickle026 OFFLINE  

mickle026

    Advanced Member

  • Members
  • 416 posts
  • Local time: 10:24 PM

Posted 28 March 2020 - 02:19 PM

I think that software encoding may be the answer here. Try hardware encoding with preferably an Nvidia GTX/RTX card. Using Intel is still in the CPU.

And if using an Nvidia card, unlock it so you can support more than 2 streams at once.

if he can play it in vlc the should he be even transcoding/encoding ?

 

What client are you plaing it on on the pc?  (edge  firefox etc .....)


Edited by mickle026, 28 March 2020 - 02:20 PM.


#19 densma OFFLINE  

densma

    Advanced Member

  • Members
  • 103 posts
  • Local time: 10:24 PM

Posted 28 March 2020 - 02:46 PM

live tv is surely broken

 

 



#20 dcol ONLINE  

dcol

    Advanced Member

  • Members
  • 1381 posts
  • Local time: 02:24 PM
  • LocationTucson, Arizona

Posted 28 March 2020 - 02:50 PM

live tv is surely broken

Not here






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users