Jump to content

Recommended Posts

Posted (edited)

Is there anyway to disable Direct Playing completely, even if the client device supports it?

 

I am currently running emby-server-4.1.1.0

 

What I need I guess is unique and may be against the design of emby.

 

From what I've read, I assume the rule of thumb is: Direct Playing > Direct Streaming > Transcode.

 

Which to me means:

 

If you can Directly Play the stream on the client without passing through the server, do it. If not copy the audio & video codecs into a compatible container (mp4 / hls?) on the emby server and the serve it to the client. Lastly Transcode on the emby server and serve to client if the previous options fail.

 

Bandwidth or processing power is not an issue, I would just like the option to disable Direct Playing so Direct Streaming & Transcode are the only options available.

 

Thanks in advance for any help on this.

Edited by devz3ro
Posted

No, I cannot think of a way to do that.  However, the only apps that can truly direct play (bypassing the server completely) would be the HTPC based ones (Theater desktop, EMC, Kodi...).

 

Why, do you have this desire?

Posted (edited)

Thanks for the quick reply.

 

I'm after this because of my hdhomerun that is limited to 2 tuners.

 

I have noticed that if I am watching the same channel across multiple devices via emby and it is "Direct Streaming" only one tuner is in use. I'm assuming the emby server opens a single tuner connection and via hls streams to the clients.

 

If they are "Direct Playing", a tuner is used per stream which in my case puts a hard limit of 2 on the amount of active streams (even if it's the same channel).

Edited by devz3ro
Posted

Hi.  What app are you using that is direct playing to your HDHR?

Posted

I apologize, I don't remember exactly which client it was. I will have to check when I get home from work.

 

I know that I use the following Emby clients:

 

Android App (mobile), Android TV App, Emby Windows App, and Emby Connect addon in Kodi.

Posted

Okay, the only one that might have been doing that would be Kodi.

 

All the Emby-developed apps will run all live TV streams through the server just for this reason - to enable tuner sharing.

Posted

OK when I get home I will try each client and note which one(s) are doing it. Hopefully I can avoid using the clients that are.

 

If I'm not able to, is there no known way to disable Direct Playing from the server end? I don't mind editing a config file or writing a script to block a certain process.

 

Thanks again for your help & time.

Posted

OK when I get home I will try each client and note which one(s) are doing it. Hopefully I can avoid using the clients that are.

 

If I'm not able to, is there no known way to disable Direct Playing from the server end? I don't mind editing a config file or writing a script to block a certain process.

 

Thanks again for your help & time.

 

You can setup Kodi to use http-paths rather than network paths. These http-paths will do exactly that.

Posted

Just had someone at my house try it with a Shield TV I have. Looks like it's not just Kodi, the below screenshot is from the Kodi Android TV App.

 

5cfe927999f1b_androidtv.png

Posted

If you play that same channel on another device, you should see that only one tuner is being used from your HDHR. Please let us know if this helps. Thanks.

Posted (edited)

Unfortunately that's not the case.

 

What's currently happening:

 

1. Opened a LiveTV Channel 1 stream on Android TV (Direct Playing)

2. Opened a LiveTV Channel 2 stream on Kodi App (I tried both http paths and network paths like speechles suggested but it still does Direct Playing on both settings)

 

Both tuners in this state are locked directly to the client and I cannot watch Channel 1 or 2 on any other client.

 

Here is the ps -ef output from the server when I grep for "emby" when the above 2 are playing:

 

/opt/emby-server/system/EmbyServer -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb

 

If I stop those streams and start one on my LG TV which does direct streaming it looks like this:

 

/opt/emby-server/system/EmbyServer -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb


/opt/emby-server/bin/ffmpeg -analyzeduration 3000000 -user_agent VLC/3.0.1 -fflags +discardcorruptts+fillwallclockdts -f mpegts -i http://127.0.0.1:26347/LiveTv/LiveStreamFiles/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/stream.ts -map_metadata -1 -map_chapters -1 -threads 1 -sn -c:v:0 copy -vsync -1 -codec:a:0 copy -disposition:a:0 default -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3 -individual_header_trailer 0 -segment_format mpegts -segment_write_temp 1 -segment_list_entry_prefix hls/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/ -segment_list_type m3u8 -segment_start_number 0 -segment_list /var/lib/emby/transcoding-temp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.m3u8 -y /var/lib/emby/transcoding-temp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%d.ts
 
Unsure of how to work around this / if it's possible to.
Edited by devz3ro
Posted

Use something other than Kodi for your tests.

 

But, if you are watching two different channels then it will take two tuners...

Posted

Right, I understand that two different channels takes two tuners :-). I tried to tune the same channel it uses both tuners in that scenario.

 

The only reason why I did that was to show that both tuners are in use and no other client can view Channel 1 or Channel 2 while Direct Playing is active. But the same is not true if Direct Streaming is active.

 

I have some time and will go through what other clients besides Android TV (and the obvious Kodi) does direct playing.

Posted

Direct playing has nothing to do with this. If you use two Emby apps, then two streams on the same channel should only occupy one tuner. Kodi is not an Emby app.

Posted (edited)

Thanks Luke, you're right - I'll just remove Kodi from the equation and I should be good. I was able to find that the emby Android mobile client also displays "Direct Playing" (see screenshot below), but it's actually not doing what I thought it was. Only 1 tuner is in use with 1 x Android TV and 1 x Android Mobile client that both display "Direct Playing". The second line below shows that it's still passing through the emby server.

 

Thanks all for your help and time, I appreciate it.

 

/opt/emby-server/system/EmbyServer -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb


/opt/emby-server/bin/ffprobe -analyzeduration 3000000 -i http://127.0.0.1:26347/LiveTv/LiveStreamFiles/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/stream.ts -threads 0 -v info -print_format json -show_streams -show_format -show_data
 

 

5cfecc664834e_androidmobile.png

Edited by devz3ro
Posted

It means that it's direct playing the original source stream without modification. Live TV will almost always pass through emby server.

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