Jump to content

Emby never Direct Playing any media on any client


cochize1

Recommended Posts

cochize1

I didn't pay much of an attention to that but lately I started playing with Grafana for some stats and it caught my eye that my Emby configuration never direct plays and almost always direct streams. I don't have any 4K content, most are 1080p or 720p x264 (just lately I started adding x265 since more browsers now support this). I have around 15 friends connecting remotely and some members of family on local network over wi-fi using mostly Android TV app. My internet is 750/40 Mb and most of my remote access users has fairly good as well (def over 60 Mbps).

image.png.5915398553535788514d15af19eeb779.png

My server configuration is: Emby on Synology NAS (standalone app, not in docker), port changed from 8096 to 8099 and build-in Synology NGINX reverse proxy for https remote access.

I attached logs trying to play 2 simple 720p files on Chrome browser, Android TV app and Emby for Android app, they all Direct Stream where they should Direct Play. My friend was playing a HEVC file on Chromcast while the logs were taken and that was transcoding but that is for another topic) I also checked if that might be some proxy issue but checked on local address in Chrome Browser http://192.168.0.10:8099 also Direct Streams.

Would love to convert all that streaming to direct playing, any ideas on how to pinpoint what is the issue here?

ffmpeg-transcode-3d9a7ee4-5e27-46b0-bfbf-cf6d5e7c023c_1.txt embyserver.txt

Edited by cochize1
Link to comment
Share on other sites

sross44
1 hour ago, cochize1 said:

I didn't pay much of an attention to that but lately I started playing with Grafana for some stats and it caught my eye that my Emby configuration never direct plays and almost always direct streams. I don't have any 4K content, most are 1080p or 720p x264 (just lately I started adding x265 since more browsers now support this). I have around 15 friends connecting remotely and some members of family on local network over wi-fi using mostly Android TV app. My internet is 750/40 Mb and most of my remote access users has fairly good as well (def over 60 Mbps).

image.png.5915398553535788514d15af19eeb779.png

My server configuration is: Emby on Synology NAS (standalone app, not in docker), port changed from 8096 to 8099 and build-in Synology NGINX reverse proxy for https remote access.

I attached logs trying to play 2 simple 720p files on Chrome browser, Android TV app and Emby for Android app, they all Direct Stream where they should Direct Play. My friend was playing a HEVC file on Chromcast while the logs were taken and that was transcoding but that is for another topic) I also checked if that might be some proxy issue but checked on local address in Chrome Browser http://192.168.0.10:8099 also Direct Streams.

Would love to convert all that streaming to direct playing, any ideas on how to pinpoint what is the issue here?

ffmpeg-transcode-3d9a7ee4-5e27-46b0-bfbf-cf6d5e7c023c_1.txt 764 kB · 1 download embyserver.txt 1.43 MB · 1 download

There’s not much of a difference between direct play and direct stream. Somebody smarter than me can correct if I’m wrong but it is probably just putting it in to a container that it can play on your client instead of transcoding the whole video. Just my quick observation but direct stream is pretty good to go!

Link to comment
Share on other sites

cochize1

Yeah, I know that is why I didn't bother with that for a long time. Yet again, I hate noy knowing things and leaving them undone. From what I am reading now it might be also an issue of Synology access and permissions. But first I will try to play sth from Windows Emby Theater that supposedly does not need direct access to files to Direct Play. Then, I will try to mount the share paths and "make sure the network share is accessible anonymously" as @Luke mentioned in other post over 5 years ago. But if anyone has any suggestions please chip in.

 

 

Link to comment
Share on other sites

rodainas
2 hours ago, cochize1 said:

I didn't pay much of an attention to that but lately I started playing with Grafana for some stats and it caught my eye that my Emby configuration never direct plays and almost always direct streams. I don't have any 4K content, most are 1080p or 720p x264 (just lately I started adding x265 since more browsers now support this). I have around 15 friends connecting remotely and some members of family on local network over wi-fi using mostly Android TV app. My internet is 750/40 Mb and most of my remote access users has fairly good as well (def over 60 Mbps).

image.png.5915398553535788514d15af19eeb779.png

My server configuration is: Emby on Synology NAS (standalone app, not in docker), port changed from 8096 to 8099 and build-in Synology NGINX reverse proxy for https remote access.

I attached logs trying to play 2 simple 720p files on Chrome browser, Android TV app and Emby for Android app, they all Direct Stream where they should Direct Play. My friend was playing a HEVC file on Chromcast while the logs were taken and that was transcoding but that is for another topic) I also checked if that might be some proxy issue but checked on local address in Chrome Browser http://192.168.0.10:8099 also Direct Streams.

Would love to convert all that streaming to direct playing, any ideas on how to pinpoint what is the issue here?

ffmpeg-transcode-3d9a7ee4-5e27-46b0-bfbf-cf6d5e7c023c_1.txt 764 kB · 3 downloads embyserver.txt 1.43 MB · 2 downloads

You attached the transcode log, you need to attach the directstream log.

Link to comment
Share on other sites

cochize1

My bad, file attached. Although the latest is from this morning when I believe my buddy tried to watch Gam of Thrones episode on Firefox. None other log file with ffmpeg directstream was created since then.

NOTE: Meanwhile I managed to mount the optional share points to my libraries and voila, they all Direct Play but only in Emby Theater. I also tested in Emby for Android and Android TV app but they still Direct Stream. I am sure that it has an effect because as soon as I remove the path it reverts to Direct Stream on Theater as well. My question now: is it possible to Direct Play only on Theater and if so will it Direct Play remotely as well? If other apps can Direct Play, how to make that easier for them?

 

ffmpeg-directstream-db11ef5a-bcf0-4705-8b74-9836ba0ce3c2_1.txt

Link to comment
Share on other sites

rbjtech

All files should Direct Play unless there is a need to alter either the container or audio (in most cases), if it has to change the video, then it's called a transcode.

The reason Theatre Direct Plays, is likely because it's sourcing the file over SMB - only Theatre does this, AndroidTV used to do this but no longer does.

All my streams, incl remote all Direct Play - so maybe something is wrong with your reverse proxy config  ?  Is the config based on the NGINX thread from this forum ?

Link to comment
Share on other sites

cochize1

No, seemed to difficult for me at the time. I was affriad it might come to this that I will have to do this someday but I was too affraid I will cut off all my remote users since I have only bacis network skills. I guess your suggestions will be to set this up with external NGNIX Proxy Manager i.e. in docker and not use the native Synology built-in one because it has limited options? Mine set up is the simplest of them all (file attached) but it works and gives me Let's Encrypt certificate for https access:

image.thumb.png.e7ec40bfa67890bef6b119bfafea959e.png

Link to comment
Share on other sites

cochize1

In the meantime I found this in other thread by @Carlo:

Quote

There is no reverse proxy built into Emby.  There is just a setting that tells Emby if you are using a reverse proxy or not.
This changes the way Emby works for certain things such as IP addresses. With the reverse proxy setting Emby know to look into the header for a special header the proxy writes telling us the real IP as this becomes the Proxy's job. It allows Emby to answer on non-secured ports as well because the reverse proxy is going to be responsible for this. Things like that.

The reverse proxy needs to be configured to do these things Emby is going to expect. That's the problem as Synology doesn't give you the needed control for this kind of basic configuration.  You also can't configure port usage or use of web services, etc...

So knowing these limitations and issues it's best to avoid use Synology's proxy by using ports it won't touch. You could also setup a 2nd proxy to run on Synology that you have manual control over and use that with Emby but you still won't be able to use any ports the built in proxy listens to. It's really difficult to impossible to use the 2nd proxy for automatic cert renewal as the built in proxy hijacks this process. Because of all these issues if you aren't experienced with Linux and know how to work around the issues it's best to KISS and keep it simple excluding the proxy completely using different ports and setting up the cert as normal directly in Emby.

Hope that makes sense.

 

Link to comment
Share on other sites

rbjtech

You may be able to just add them in the Custom Header or possibly advanced options ?

Try adding

Range $http_range

If-Range $http_if_range

 

 

  • Thanks 1
Link to comment
Share on other sites

rbjtech
3 minutes ago, cochize1 said:

In the meantime I found this in other thread by @Carlo:

 

I don't use synology, I use a dedicated nginx host on linux - so I'm not sure if the synology proxy is actually nginx, but it 'looks' to be similiar if those headers are anything to go by ...

 

 

Link to comment
Share on other sites

rbjtech

..and as has been said above - direct streaming is no big deal - it's fractionally more taxing than Direct Play, but no video quality is being lost.  It's possible audio may be converted to another format.  It's transcoding (video) that hits any system hard..

Link to comment
Share on other sites

cochize1

Was really hoping that would be that easy, but still Direct Stream on both Android apps with the headers added like attached. Maybe there are some more to add that would help?

PS. I know that about Transcoding is the main concer, it just bugs me and my OCD kicks in when I can't make sth work that is technically possible... somehow

image.png.53c8a5de438a741c5138873f266e605b.png

Link to comment
Share on other sites

GrimReaper

Are you actually checking within Emby Dashboard that items are DirectStreaming or relying only on your Grafana stats? If theye were, there would be ffmpeg-remux logs created for each session. And I've often seen same happening when using external tool - Playback Reporting plugin - reporting DirectStream when the item is DirectPlayed and surmised it must've been doing interpreting even DirectPlay over http as DirectStream in some circumstances.

Speaking of, have just one like that currently:

image.png.a51fab7e483606eb52d1f8170b37f417.png

image.thumb.png.ad255e74fc07cac9b9111674851acc07.png

 

 

Edited by GrimReaper
  • Like 2
Link to comment
Share on other sites

cochize1

Wow, you guys are right. I just didn't translate that in my head as I had my Dashboard translated to Polish so I was just relying on Grafna. So all that hassle for nothing:) 

Now I need to check if mounting that optional paths did something. Thank you all for all the answers.

@jaycedkwill you be reporting that issue to Emby Exporter creator by any chance like you did last time?

image.thumb.png.1040e0b100090f6149e60062f1433e09.png

Link to comment
Share on other sites

jaycedk

@cochize1I have just edited the properties in grafana to reflect the error.

I have changed current Streams and Playback Method with some overrides.

Current Streams

image.png.cbe7cdd1c06f01376fb4419ae89d46d1.png

Playback Methode
image.png.32d763e9e68d480ba0ad0de5afc52477.png

Link to comment
Share on other sites

5 minutes ago, cochize1 said:

@jaycedk@GrimReaper One thing makes me wonder, when in Emby Theater it was showing correctly in Grafana that it is Direct Play so in fact there is some way exporter diferenciate the play method.

I'm assuming No, but just thought I'd ask.

When this file was played in Theater was there any log file created for it's playback on the server?

Link to comment
Share on other sites

Perfect, that would indicate it was a direct play and not a Direct Stream as the Direct Stream would have created a "remux" log file.

  • Like 1
Link to comment
Share on other sites

rbjtech

So to answer the question about Theatre - if you have the optional path set - AND you have a SMB connection/permissions etc - then Emby will Direct Play the file for REAL via SMB.  It bypasses the emby server full stop for the media transfer.    An older version of AndroidTV also allowed this, but sadly this has been removed with the newer Android OS version and the Emby Client has broken it even with the older Android OS as of a few beta's ago ... 🤬

The only client left that uses real Direct Play (the same as what VLC, Kodi etc use) is Emby Theatre for Windows (not the store version) and possibly Emby Theatre for Unix (but unlikely to be SMB, maybe NFS ?)

When working correctly - it will say 'FILE' in the stats for nerds - or you can see it in the file server OS as a direct connection from the CLIENT, not the emby SERVER.

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

This was always a favorite method of playback for me onlan, as it saves the server from doing any streaming and the client can access the file directly eliminating any latency or lag.

It also allowed the admin to restart the server without a direct file play client knowing the server was bounced. :)

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