Jump to content

Transcoding, streamcopy, direct play, direct stream... - help!


1972

Recommended Posts

Hi all,


 


Redshirt explained something about the different video play methods in another thread, which explained a lot the me:


 


 


Transcoding will occur on all the mobile clients if they don't support the codec/container of the source video, or they can't access the media directly. Transcoding is a necessary evil. 


 


Streamcopy is a form of transcoding, it means the device supports the stream, but not the container. It's just not as cpu intensive as a full transcode. 


 


Direct play and direct stream are two different things. Direct play means that the client can access the file directly. IE it can see the windows shares. Direct stream means the client couldnt' see the file directly so the server is streaming it without transcoding.


 


However...I see a lot of movies on my Android device are transcoded and I wondered what decides which play method is choosen. Can someone explain me?


- Is it the use of codecs on the server?


- Is it determined by the client?


- Is it determined by the video/audio file format?


- ... somethinge else?


 


help this noob!  :wacko:


 

Link to comment
Share on other sites

It is a combination of the client's capabilities/codecs, its ability to access the files directly, the format of the video (both container and audio/video content) and the requested quality settings and/or network bandwidth available.

 

Basically, the client and server will work together to provide the best possible outcome given all of those factors.

Link to comment
Share on other sites

Ok, you meantion several things. 

 

In my case I have a MB server/MBC pc and several Android tablet devices (phone, tab2, tab3). All make contact via wifi and the available bandwith is pretty good I guess. The files are accessible via my home network.

You mentioned the format of the video, can you gives examples of what video/audio formats are supported for streaming. Or is there a list available? Or what codec is best for streaming/transcoding/etc/? I have installed the LAV codecs on the server, but no codecs on the Android devices... (Is this preferred/possible?)

 

Yes, I know... a lot of questions, but I guess I am not the only one trying to understand how to get the best performance out of MediaBrowser :-)  

Link to comment
Share on other sites

As long as you have LAV installed on your MBC machine and have defined your library with paths that allow that machine to directly access them, MBC will always direct play.  It will warn you if it is streaming something it thinks it should be direct playing instead (unless you turn this warning off).

 

As for Android I think that answer is probably just "it depends" in a lot of cases.  However, I think the most portable and universal format these days is an mp4 container with h262/4 video and aac audio in it - but I'm not an expert there so others can chime in.

Link to comment
Share on other sites

Redshirt

The Android OS by default can't see windows shares. So direct play will never be an option. Also the internal player has very limited codec support so it's almost guaranteed that it needs to transcode unless the source video is mp4 / h264 - baseline / aac in which case it will direct stream. 

  • Like 1
Link to comment
Share on other sites

  • 5 months later...
CrossCech

The Android OS by default can't see windows shares. So direct play will never be an option. Also the internal player has very limited codec support so it's almost guaranteed that it needs to transcode unless the source video is mp4 / h264 - baseline / aac in which case it will direct stream. 

 

Knowing this is an old thread and there has been some other discussions regarding transcoding, streaming and direct play via android client, I thought I'd share my experience. I've found the above quote to be contradictory to what I've accomplished.

 

First off, let me describe my home network setup. I have a media server that has MB3 server installed (official) with 2 home theater pc's using MBC. The server library is configured with network share pathnames (\\ServerName\Movies\). Works beautifully! I also have a Google Nexus 10 and 7 in the mix. 

 

Here's where it gets a little messy. Both tablets have MB app installed. On my Google Nexus 10 I have MX Player installed with the DTS codec and ES File Explorer which allows me to see my media server shares directly over LAN. When I browse through ES File Explorer to a movie (i.e. Star Trek - 1080p mkv w/15 mb bit rate) it Direct Plays to my tablet beautifully. I figure it to be Direct Play because in the upper left corner of MX Player it will show the title of the movie rather than Stream However, when I browse through MB android client for the same movie and using MX Player externally, it will Direct Stream which has the corresponding Stream in the upper left corner of MX Player. I'm not complaining by any means, because it still plays beautifully on my tablet. Just seems like there could be a solution to still have Direct Play either way.

 

I'm not a Programmer and can offer no help in coding, but I share this info to pose an hypothesis: Why does it matter if Android OS can or can't see window shares if an app can? ES File Explorer is capable of doing this. Could similar coding be implemented in mobile MB client apps? I assume that if it could, it'd enable external players like MX Player to work more efficiently, therefore lessen the need for server transcoding. I know that Direct Stream is not transcoding, but I do get ffmpeg high cpu usage when attempting to stream mkv over internet when I'm away from home. But that is a whole other issue.

 

I just find it odd that, while I'm in my home network, I can Direct Play via ES File Explorer, yet using the same player externally in android MB client it Direct Streams. Something doesn't seem to be transferring correctly. Can this be explained? I suppose I could just shut up and just use ES File Explorer and Direct Play on my tablet, but it'd be nice to have the front end of MB doing it! :)

Edited by CrossCech
Link to comment
Share on other sites

"Direct" access is potentially possible with some third party libs but, really, those libraries are just using other protocols to get that access.

 

The bottom line is you shouldn't really care that much about the underlying technology as long as the end result gets you what you want (a high quality viewing experience).

Link to comment
Share on other sites

hifiaudio2

But does direct streaming use more server resources than direct play?  I am guessing you are saying the video quality should be the same though....

 

If more than one device attempted to access movies that are direct streaming vs direct playing,  would that be more likely to bottleneck?

Link to comment
Share on other sites

MSattler

But does direct streaming use more server resources than direct play?  I am guessing you are saying the video quality should be the same though....

 

If more than one device attempted to access movies that are direct streaming vs direct playing,  would that be more likely to bottleneck?

 

I think something to remember here is from a development standpoint, and smaller user type environments, transcoding is ok, if the quality is what you want it to be.  Yes transcoding and direct streaming will use more resources than direct playing.  But even if the Emby app can see the actual windows shares, it's the internal android video player that needs to be able to support accessing that stream, unless you use the Emby app as the middle man, but then in my opinion you are just replacing one resource constraint on the server, for another on the player.

 

From my experience so far, if Direct Play is a must for you, user WMC MBC app or use the Kodi app with either the XBM3C plugin, or the Sync plugin which is an Alpha.  Kodi will direct play just about everything to my FireTV Stick, and this is because it can access the shares directly and it supports all of the required codecs and containers.  

 

In order for an Emby client to provide Direct Play itself on Android, we will need an actual Emby video, licensed for all of the required codecs, and it will work.  Or you for say the Android Mobile app, you can use MX Player with the codec package, but you will lose resume cabability.

Link to comment
Share on other sites

nbakken81

"Direct" access is potentially possible with some third party libs but, really, those libraries are just using other protocols to get that access.

 

The bottom line is you shouldn't really care that much about the underlying technology as long as the end result gets you what you want (a high quality viewing experience).

I think it's totally fine for him to only want video to be transcoded when it needs to be transcoded. The ideal setup not only has the server producing great results, but running efficiently as well. Plus, wouldn't direct play allow for rewinding and fast-forwarding? I too am currently playing with transcoding settings to eliminate the transcoding of files that don't need it, specifically with respect to Android devices. I have a Nexus9, 10, and Minix Neo x8 plus, all of which rarely need a stream to be transcoded, yet always seem be sent transcoded streams.

 

Is there a way to add a profile that recognizes android devices, and forces Direct Play?

Link to comment
Share on other sites

The built in android player cannot direct play from a network source.  Period.  It does not understand file system network access (only http).

 

The app and server, however, do try to figure out exactly what the device can handle and only transcode or convert what is absolutely necessary and pass that to the player in the protocol it understands.  It is possible this logic isn't perfect yet but we would need to see some examples of these items that you say "should not need transcoding" but are.

 

Would need the transcode logs for the playback of those items.

Link to comment
Share on other sites

blackmamba

Sorry to jump in too this thread but this is effectively the same issue I have been trying to resolve in this thread

 

From reading above:

which rarely need a stream to be transcoded, yet always seem be sent transcoded streams
 

In order for an Emby client to provide Direct Play itself on Android, we will need an actual Emby video, licensed for all of the required codecs, and it will work

 

From my experience so far, if Direct Play is a must for you, ...... use the Kodi app with ...... the XBM3C plugin

 

So from the perspective of having an Android settop box (RKM902II in my case,  Minix Neo x8 for the guy above) as a client to an MB Server on windows, which I would have thought is a pretty common setup .....

 

If you want to avoid transcoding on the server (because the server isn't very powerful or you have a number of people accessing it in the home simultaneously)  the kodi plugin will always be a better way to go than the mb android plugin because the kodi player has more codecs etc. etc. compared to MB???

Link to comment
Share on other sites

i mentioned in another thread that we do have interest in building these kinds of features, we're just not there yet. our android apps are open source so this could be a great project for a new contributor to look at.

Link to comment
Share on other sites

  • 1 year later...
spearoid

It is a combination of the client's capabilities/codecs, its ability to access the files directly, the format of the video (both container and audio/video content) and the requested quality settings and/or network bandwidth available.

 

Basically, the client and server will work together to provide the best possible outcome given all of those factors.

 

So a Googling doesn't seem to lead me to a way to do this, and maybe I shouldn't be trying to do what I'm trying to do anyway, but I think I actually want transcoding to occur instead of direct streaming....assuming these are not overlapping processes.

 

Playing certain episodes from my Android tablet of even the Ember app on Windows 10, Direct Streaming occurs and it does not keep up...constantly buffering.

 

I am happy to have lesser video quality to avoid buffering but cannot seem to get anything but direct stream, which looks great, but buffers often.

 

I have Emby running on a very powerful server that will handle transcoding without a hitch. Can I disable direct streaming?  I don't use Emby at all when on my LAN and am only interested in reliable streaming while away from my home.

 

I have 10 mbps down and 2 mbps up....which I assume is not fast enough to support direct streaming outside my LAN, but Emby doesn't seem to want to do anything but direct stream.

Link to comment
Share on other sites

Happy2Play

So a Googling doesn't seem to lead me to a way to do this, and maybe I shouldn't be trying to do what I'm trying to do anyway, but I think I actually want transcoding to occur instead of direct streaming....assuming these are not overlapping processes.

 

Playing certain episodes from my Android tablet of even the Ember app on Windows 10, Direct Streaming occurs and it does not keep up...constantly buffering.

 

I am happy to have lesser video quality to avoid buffering but cannot seem to get anything but direct stream, which looks great, but buffers often.

 

I have Emby running on a very powerful server that will handle transcoding without a hitch. Can I disable direct streaming?  I don't use Emby at all when on my LAN and am only interested in reliable streaming while away from my home.

 

I have 10 mbps down and 2 mbps up....which I assume is not fast enough to support direct streaming outside my LAN, but Emby doesn't seem to want to do anything but direct stream.

You should set a "Internet Streaming bitrate limit", lower than your upload speed.  Dashboard-Playback-Streaming

Edited by Happy2Play
Link to comment
Share on other sites

Before you do that, check your in-app settings and see if you might have configured a streaming bitrate that is too high for the connection. If you have done this, try setting it back to Auto. See if the Auto settings will suffice before configuring the above. thanks.

Link to comment
Share on other sites

spearoid

both good replies, thank you. 

 

I had just checked app settings before coming back to this page, and the Android app does allow me to configure things so that it doesn't try to stream something my home internet can't handle...which fixed me nicely on my tablet.....but the Win10 app doesn't appear to have any such settings or configurability...so I would want a global solution from the server side of things if possible. Actually I think I'd like to limit the outgoing bandwidth from my server anyway, I never saw that setting.These things should do the trick...thanks for the help!

Link to comment
Share on other sites

  • 6 months later...
drikosv8
Someone can pass me the link where it contains the formats that the emby reproduces directly without transcoding, I will coverter all my videos to play direct.

 

Thank you

 

 


Alguem pode me passa o link aonde contem os formatos que o emby reproduz direto sem transcodificação, vou coverter todos meu videos para jogar direto.

 

Obrigado

Link to comment
Share on other sites

Guest asrequested

 

Someone can pass me the link where it contains the formats that the emby reproduces directly without transcoding, I will coverter all my videos to play direct.
 
Thank you
 
 
Alguem pode me passa o link aonde contem os formatos que o emby reproduz direto sem transcodificação, vou coverter todos meu videos para jogar direto.
 
Obrigado

 

 

https://emby.media/community/index.php?/topic/48799-direct-play-vs-direct-streaming-vs-transcoding/

Link to comment
Share on other sites

Deathsquirrel

 

Someone can pass me the link where it contains the formats that the emby reproduces directly without transcoding, I will coverter all my videos to play direct.
 
Thank you
 
 
Alguem pode me passa o link aonde contem os formatos que o emby reproduz direto sem transcodificação, vou coverter todos meu videos para jogar direto.
 
Obrigado

 

 

There is no one answer to that as it's a function of your playback devices and connection speed.  Just about everything can do h264 with 2-channel AAC sound but your particular devices might not handle a high bitrate even in that format.

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