Jump to content

Emby buffering 4K when direct play to Android TV and other network devices - trying to figure out what is wrong


jncunha

Recommended Posts

Hi everyone,
 
I'm changing from Plex and I'm trying to understand why is Emby not capable of playing 4K content to the devices on my network. I'm kind of lost on where the problem is lying.
 
Android TV: Sony A8H
Emby Android app version: 1.8.54g
Emby server version: 4.5.2.0
 
I have all my files in Unraid. These are the specs of the machine running Unraid:
MB: Super Micro X8SIL (gigabit ethernet)
CPU: Intel Xeon X3470 2.93 GHz
RAM: 8 GB DDR3 ECC
 
The container running Emby is on another machine (a Dell PowerEdge R620) running Proxmox with these specs:
CPU: Dual Xeon E5-2620 2.00 GHz
RAM: 64 GB DDR3 ECC
 
I've allocated 12 cores to the Proxmox container and 8GB of RAM.
 
When I try to play to the Emby app on my Sony TV, the dashboard on the server says it's running in Direct Play as seen on the image:
 
The "stats for nerds" screen shows this:
 
  • The image is constantly buffering. Runs for a couple of seconds, stop to buffer, runs for a couple of seconds, etc.
  • My TV is connected via Wi-Fi but I've also tried using a ethernet connection and the same thing happens.
  • The same thing happens when trying to run the movie from the Emby Theater app, web app on Chrome and iPad.
 
I'm trying to understand why this is happening. If my hardware is the problem I just need to know what to upgrade to get this running smoothly.
 
Thank you for the help!
Edited by Happy2Play
edited broken links
Link to comment
Share on other sites

Happy2Play

The server is still the man in the middle for this HTTP stream to client.  So this is direct play via HTTP stream vs a true file access direct play.  But there are many topics on this exact issue as the devs work on improving this configuration.

Link to comment
Share on other sites

4 minutes ago, Happy2Play said:

The server is still the man in the middle for this HTTP stream to client.  So this is direct play via HTTP stream vs a true file access direct play.  But there are many topics on this exact issue as the devs work on improving this configuration.

I'm a total ignorant when talking about networks. From what I understood from your post, the problem lies in the Proxmox server running Emby? To be a "true" direct play Emby would have to run directly from the Unraid machine where the files are stored? Would that solve the problem with the 4K buffering?

Also, can you point me to a post about this issue so I can learn some more? Sometimes I can't find the right keywords to search...

Edited by jncunha
Link to comment
Share on other sites

Happy2Play

To me a true direct play would be the client reading the file directly (but not always possible on every client I believe).  But Emby directly playing via a http stream is Emby pulling the media from your other server and pushing media to the client.  So the man in the middle is doing double the work.

As a test you could put a library with some test items on the machine running Emby and see if you get the same results.

Link to comment
Share on other sites

Q-Droid

Direct play at 60mbps...make sure your TV is getting the network bandwidth it needs. Your servers are not doing much work, just sending a stream.

Link to comment
Share on other sites

1 hour ago, Happy2Play said:

To me a true direct play would be the client reading the file directly (but not always possible on every client I believe).  But Emby directly playing via a http stream is Emby pulling the media from your other server and pushing media to the client.  So the man in the middle is doing double the work.

As a test you could put a library with some test items on the machine running Emby and see if you get the same results.

I just did this test. I downloaded a sample 4K file and just moved it into a folder on the container running Emby. I added this folder to the library on the server and the file just played perfectly. On the dashboard it says that it was "Direct streaming" and not "Direct play". Can't understand why is the difference.

To be sure, I then copied the same file to my media folder in the Unraid machine. The file started to buffer and it was transcoding. It still said "Direct streaming" instead of "Direct playing" but the fact is that is was running and stopping to buffer like the movie I showed before.

 

What I can conclude is that the setup I'm using at the moment is sufficient in terms of hardware. The problem is how it's built.

Scenario #1 - machine running Unraid with media -> another machine with Proxmox container running Emby -> Android TV playing 4K content = constantly buffering even though it says "Direct play" on Emby dashboard.

Scenario #2 - machine with Proxmox container running Emby and with sample media -> Android TV playing 4K content = works perfectly but it says "Direct streaming" instead of "Direct play".

 

I'm considering giving a try to install Emby on a Docker container inside the Unraid machine to see if it removes the problem (this would be the same situation as scenario #2 since it's running Emby on the same machine where the media is stored).

 

1 hour ago, Q-Droid said:

Direct play at 60mbps...make sure your TV is getting the network bandwidth it needs. Your servers are not doing much work, just sending a stream.

I've already tried to connect the TV directly through ethernet and Wi-Fi. Both of the connection produce the same result.

Edited by jncunha
Link to comment
Share on other sites

Happy2Play

Can you provide the nerd stats or ffmpeg log for the Direct Stream.

Link to comment
Share on other sites

14 minutes ago, Happy2Play said:

Can you provide the nerd stats or ffmpeg log for the Direct Stream.

Sure. Here is the image with the nerd stats:

T0sJPO2l.jpg

 

I don't know if I'm right but the "Direct streaming" instead of "Direct playing" might be happening because I'm now testing with an MPEG file instead of a MKV? I couldn't find a way to copy a 40 GB movie to the container so I just downloaded a sample file. Nevertheless, I stopped having issues with the media running from the machine where Emby is installed (scenario #2). If I go back to copy this sample file to my Unraid and play it from there, through my Proxmox container, to my Android TV (scenario #1) I still get the buffering and the "Direct streaming".

Link to comment
Share on other sites

Happy2Play

Yes the example above is do to container.  You should be able to use something mkvtoolnix to repackage to mkv if you want to test more.

Devs will have to comment more, but there have been several topics of these I call "man in the middle" scenarios with this issue.  But with your testing we have shown there would appear to be a throughput issue somewhere in this configuration.

Link to comment
Share on other sites

11 minutes ago, Happy2Play said:

Yes the example above is do to container.  You should be able to use something mkvtoolnix to repackage to mkv if you want to test more.

Devs will have to comment more, but there have been several topics of these I call "man in the middle" scenarios with this issue.  But with your testing we have shown there would appear to be a throughput issue somewhere in this configuration.

Tomorrow I will try to install Emby on a Docker container in Unraid. This way I have Emby and media in the same machine. According to the test it should work. Will report back.

I still would like to understand why my config creates this problem with 4K content only.

Link to comment
Share on other sites

Happy2Play

It has something to do with the high bitrates in this situation.  So there would appear to be a bottleneck somewhere.

Link to comment
Share on other sites

Q-Droid

Seems strange that the same sample file plays differently when stored locally on the Emby server vs. a network share. This inconsistency doesn't make much sense so there is something else the OP hasn't discovered or shared yet.

 

Link to comment
Share on other sites

6 hours ago, Q-Droid said:

Seems strange that the same sample file plays differently when stored locally on the Emby server vs. a network share. This inconsistency doesn't make much sense so there is something else the OP hasn't discovered or shared yet.

 

 

6 hours ago, Q-Droid said:

I think it's time for server and ffmpeg logs.

 

Thanks for following up. Here are the logs I got from the web dashboard. There were a lot of files. I got the latest emby server log and found the 2 ffmpeg logs that were related with the file playing directly from the machine where Emby is installed and the other other from the Unraid machine where I have all my media:

 

Emby server log: embyserver-63742320037.txt

ffmpeg log (file playing from machine where Emby is installed): ffmpeg-remux-f20283df-ce01-4610-9adf-2fb3b05c6b6a_1.txt

ffmpeg log (file playing from Unraid where all media is stored - not Emby machine): ffmpeg-remux-a3af8576-2b2c-41f5-bc36-c2013536ab6b_1.txt

 

Thank you for the support!

Link to comment
Share on other sites

PenkethBoy

just had a quick look (at the ffmpeg logs) and the Chess Hdr - example - has dodgy audio (zero channels) and is having its audio remuxed (in an attempt to get something usable) - hence direct stream not direct play - so i would find a better example to test with

as for why one plays well and the other does not -> the unraid machine has in comparison to the dell - very limited horsepower

unraid is running at 32 fps and the dell at almost 900 fps

is unraid in a vm or native install?

Link to comment
Share on other sites

1 minute ago, PenkethBoy said:

just had a quick look (at the ffmpeg logs) and the Chess Hdr - example - has dodgy audio (zero channels) and is having its audio remuxed (in an attempt to get something usable) - hence direct stream not direct play - so i would find a better example to test with

as for why one plays well and the other does not -> the unraid machine has in comparison to the dell - very limited horsepower

unraid is running at 32 fps and the dell at almost 900 fps

is unraid in a vm or native install?

Unraid is sitting in bare metal. Running from the OS from the flash drive. It's not virtualized.

The specs of the machine are on the first post. For sure the Dell server is a much powerful machine.

Link to comment
Share on other sites

Q-Droid

Someone else might have to chime in because I don't use Emby this way, but it looks like you've defined the library on NAS using an SMB URI (smb://192.168.1.127/MEDIA/Movies) and this might explain why it plays differently.

Have you tried a data/file transfer speed test between your Proxmox and Unraid hosts? If no issues there then it might be something about the above SMB access. Include SMB transfers in your testing if possible.

 

Link to comment
Share on other sites

PenkethBoy

in unraid where is the cache/temp transcode folder set to - i.e what path and what type of disk is it

hopefully not the usb drive!

Link to comment
Share on other sites

1 hour ago, Q-Droid said:

Someone else might have to chime in because I don't use Emby this way, but it looks like you've defined the library on NAS using an SMB URI (smb://192.168.1.127/MEDIA/Movies) and this might explain why it plays differently.

Have you tried a data/file transfer speed test between your Proxmox and Unraid hosts? If no issues there then it might be something about the above SMB access. Include SMB transfers in your testing if possible.

 

The way Emby is accessing the share in Unraid with the files was not setup by me. I used the Emby setup assistant and I typed the IP of the Unraid machine. From there I just chose the Movies folder.

 

48 minutes ago, PenkethBoy said:

in unraid where is the cache/temp transcode folder set to - i.e what path and what type of disk is it

hopefully not the usb drive!

Regarding your question I honestly don't even know how to set that up. I just have an array of disks and a cache SSD. The files are sitting in a share to which I can see in Emby when I type the IP of the Unraid machine. Is there a guide I can follow on how to setup this cache/temp transcode folder?

Link to comment
Share on other sites

PenkethBoy

go to your dashboard main page on the right is a paths section

to change the path location go to dashboard>transcoding then scroll down to "Transcoding temporary path:"

and change it if its on the usb or a slow disk

Link to comment
Share on other sites

On 11/30/2020 at 1:51 PM, PenkethBoy said:

go to your dashboard main page on the right is a paths section

to change the path location go to dashboard>transcoding then scroll down to "Transcoding temporary path:"

and change it if its on the usb or a slow disk

The field was just empty. I went for a simpler solution in the end to avoid the headache.

On 12/1/2020 at 3:03 PM, Luke said:

Hi there, has this helped?

Like I said above I just simplified my life. Instead of running Emby on a different machine, I just installed Emby in Unraid and now 4K is Direct Playing to my TV. Works great.

The only problem is related with the audio. If the movie is using TRUEHD 7.1 it buffers again...

image.png.a40c70516605b29a86e60088072d8248.png

I have a Sony A8H which has an eARC port. I've connected my Sonos Arc but I still need to change it to AC3 5.1 to play without buffering. I believe that having the Sonos Arc connected to the eARC port would support TRUEHD 7.1 but I might be wrong.

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