Jump to content


Photo

Why transcode video when only audio can't be DirecStreamed?

transcode audio aac hevc

Best Answer crusher11 , 24 March 2020 - 10:31 AM

If both audio and video are compatible it doesn't direct stream, it direct plays.

If the audio needs to be converted, that new audio needs to be recombined with the video. That's the step HVEC isn't compatible with. When direct playing it just reads the file as is, and nothing needs to be combined, so it doesn't require anything to be altered. Go to the full post


  • Please log in to reply
34 replies to this topic

#1 Alefielm OFFLINE  

Alefielm

    Newbie

  • Members
  • 8 posts
  • Local time: 03:24 PM

Posted 23 March 2020 - 10:44 PM

Hi, I'm trying to play this from Emby 4.4.0.40 Linux to Chromecast ultra using the Android app.

 

When paying it says is transcoding because of the unsupported audio (i'ts ok, Chromecast doesn't support AAC 5.1), my question is, why is Emby transcoding the video too to x264?

My server is on a RaspberryPi, so I try to get versions that doesn't need video encoding/conversion, so far I am streaming 4k 5.1 without problems.

 

Is there any configuration to force emby to transcode only the audio whem the problem is audio? I hope that can be achieved with a lot less cpu power than converting video too.

Thank you!

 

Video
Title1080p HEVC
CodecHEVC
Codec Taghev1
ProfileMain 10
Level120
Resolution1920x800
Aspect Ratio2.40:1
AnamorphicNo
InterlacedNo
Framerate23.976
Bitrate2,000 kbps
Bit Depth10 bit
Pixel Formatyuv420p10le
Reference Frames1
Audio
TitleEnglish AAC 5.1 (Default)
LanguageEnglish
CodecAAC
Codec Tagmp4a
ProfileLC
Layout5.1
Channels6 ch
Bitrate224 kbps
Sample Rate48,000 Hz
DefaultYes
Subtitle
TitleEnglish (SRT)
LanguageEnglish
CodecSRT
DefaultNo
ForcedNo
ExternalYes
Containermp4
Path/Movies/aaaa.mp4
Size1983MB

Edited by Alefielm, 23 March 2020 - 10:45 PM.


#2 rechigo OFFLINE  

rechigo

    Advanced Member

  • Members
  • 770 posts
  • Local time: 11:24 AM
  • LocationCALIFORNIA

Posted 23 March 2020 - 10:59 PM

The reason your video is transcoding as well is because DirectStreams use a streaming protocol called "HLS", which doesn't support HEVC, so the server must convert the video into a suitable format (h264)

 

Your options are:

1) Reencode the whole video to a suitable codec, OR 2) Either replace the audio track completely, or add a separate audio track that you can switch to that your device can direct play


Edited by rechigo, 23 March 2020 - 11:01 PM.

  • Happy2Play, softworkz and Baenwort like this

#3 Happy2Play OFFLINE  

Happy2Play

    Trial and Error

  • Moderators
  • 19116 posts
  • Local time: 11:24 AM
  • LocationWashington State

Posted 23 March 2020 - 11:08 PM

I think we need a sticky or wiki that explains this as were have way to many topics asking Why.

 

@Luke

@ebr

@cayars

@softworkz


  • softworkz likes this

#4 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 156691 posts
  • Local time: 02:24 PM

Posted 23 March 2020 - 11:15 PM

In the near future we're going to be exploring alternative protocols to allow for more flexibility. Thanks.



#5 Alefielm OFFLINE  

Alefielm

    Newbie

  • Members
  • 8 posts
  • Local time: 03:24 PM

Posted 24 March 2020 - 10:09 AM

The reason your video is transcoding as well is because DirectStreams use a streaming protocol called "HLS", which doesn't support HEVC, so the server must convert the video into a suitable format (h264)

 

Your options are:

1) Reencode the whole video to a suitable codec, OR 2) Either replace the audio track completely, or add a separate audio track that you can switch to that your device can direct play

 

Then why when I stream HVEC 4k (with a suitable audio) it DirectStream without transcoding? I take your options, just want to understand the issue better.



#6 crusher11 OFFLINE  

crusher11

    Advanced Member

  • Members
  • 1457 posts
  • Local time: 02:24 AM

Posted 24 March 2020 - 10:31 AM   Best Answer

If both audio and video are compatible it doesn't direct stream, it direct plays.

If the audio needs to be converted, that new audio needs to be recombined with the video. That's the step HVEC isn't compatible with. When direct playing it just reads the file as is, and nothing needs to be combined, so it doesn't require anything to be altered.
  • softworkz, cayars, Baenwort and 2 others like this

#7 softworkz ONLINE  

softworkz

    Advanced Member

  • Developers
  • 2694 posts
  • Local time: 08:24 PM

Posted 24 March 2020 - 05:40 PM

I think we need a sticky or wiki that explains this as were have way to many topics asking Why.

 

@Luke

@ebr

@cayars

@softworkz

 

 

In the near future we're going to be exploring alternative protocols to allow for more flexibility. Thanks.

 

Some reference explanation would still be a good idea for the current situation, I think.



#8 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 3347 posts
  • Local time: 02:24 PM

Posted 24 March 2020 - 11:40 PM

I agree softworkz.  I'll see what I can come up with.


  • softworkz likes this

#9 Guest_asrequested_* OFFLINE  

Guest_asrequested_*
  • Guests

Posted 25 March 2020 - 12:07 AM

If both audio and video are compatible it doesn't direct stream, it direct plays.

 

Not completely correct. If the player doesn't have direct access, it will direct stream. If the player doesn't support the container, it will direct stream.


  • softworkz and rechigo like this

#10 softworkz ONLINE  

softworkz

    Advanced Member

  • Developers
  • 2694 posts
  • Local time: 08:24 PM

Posted 25 March 2020 - 12:15 AM

Not completely correct. If the player doesn't have direct access, it will direct stream. If the player doesn't support the container, it will direct stream.

 

Correct.

 

PS: Glad you're back!



#11 rechigo OFFLINE  

rechigo

    Advanced Member

  • Members
  • 770 posts
  • Local time: 11:24 AM
  • LocationCALIFORNIA

Posted 25 March 2020 - 01:49 AM

Not completely correct. If the player doesn't have direct access, it will direct stream. If the player doesn't support the container, it will direct stream.

What do you mean by "player doesn't have direct access"

Sent from my SM-G973U using Tapatalk

#12 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 3347 posts
  • Local time: 02:24 PM

Posted 25 March 2020 - 09:53 AM

What kind of definition are you guys using for "Direct Play"?

 

Direct Play long time back used to mean the video was played off the HDD subsystem using OS file system hooks directly, but this is not what Direct Play means anymore in Emby Speak.

 

So I just want to clear that up and make sure you guys are talking about this correctly.


Edited by cayars, 25 March 2020 - 09:53 AM.


#13 pwhodges OFFLINE  

pwhodges

    Advanced Member

  • Members
  • 689 posts
  • Local time: 07:24 PM
  • LocationOxford, UK

Posted 25 March 2020 - 10:51 AM

As I understand it, Direct Play means that the file is sent on for playing without change.  Direct Stream means that the audio and video streams are unchanged (no transcoding), but are repackaged in a new container because the client doesn't handle the original container (e.g. mkv).

 

Paul



#14 ebr ONLINE  

ebr

    Chief Bottle Washer

  • Administrators
  • 51885 posts
  • Local time: 02:24 PM

Posted 25 March 2020 - 11:16 AM

As I understand it, Direct Play means that the file is sent on for playing without change.  Direct Stream means that the audio and video streams are unchanged (no transcoding), but are repackaged in a new container because the client doesn't handle the original container (e.g. mkv).

 

Paul

 

That is correct and the below is not:

 

 

Not completely correct. If the player doesn't have direct access, it will direct stream.

 

The player doesn't need "direct access" to the media for it to be direct played (which means played with no modifications whatsoever).



#15 softworkz ONLINE  

softworkz

    Advanced Member

  • Developers
  • 2694 posts
  • Local time: 08:24 PM

Posted 25 March 2020 - 11:33 AM

That is correct and the below is not:

 

 

 

The player doesn't need "direct access" to the media for it to be direct played (which means played with no modifications whatsoever).

 

I would understand "direct access" as the ability to randomly read arbitrary sections of a file ("random access") as opposed to using a streaming protocol.

 

Random file access is possible on local file systems of course, on LANs (e.g. via SMB) but also on WANs (e.g. http with support for range requests).



#16 softworkz ONLINE  

softworkz

    Advanced Member

  • Developers
  • 2694 posts
  • Local time: 08:24 PM

Posted 25 March 2020 - 11:45 AM

You could also say that the client directly accesses the _original_ video file - which isn't happening in the two other cases.

I'm not quite sure what would be wrong about that?



#17 maegibbons OFFLINE  

maegibbons

    Advanced Member

  • Members
  • 2889 posts
  • Local time: 07:24 PM
  • LocationLutterworth, England, UK

Posted 25 March 2020 - 12:30 PM

I would like "Direct Access" to a networked nas share to be possible from Android TV so that the Server is avoided where possible.

I understand this is available in Emby Theatre.

So can we have feature compatability in the Android TV app please.

Krs

Mark

Sent from my SM-N976B using Tapatalk

#18 ebr ONLINE  

ebr

    Chief Bottle Washer

  • Administrators
  • 51885 posts
  • Local time: 02:24 PM

Posted 25 March 2020 - 02:08 PM

I would understand "direct access" as the ability to randomly read arbitrary sections of a file ("random access") as opposed to using a streaming protocol.

 

Random file access is possible on local file systems of course, on LANs (e.g. via SMB) but also on WANs (e.g. http with support for range requests).

 

When he says "direct access" he means the file is being read directly from its location via a file protocol as opposed to being fed by the server over http.  We do not require that situation to call something "direct play".  Direct Play just means the file is being played with no modifications.  Exactly how the file is delivered to the app is not a factor.



#19 ebr ONLINE  

ebr

    Chief Bottle Washer

  • Administrators
  • 51885 posts
  • Local time: 02:24 PM

Posted 25 March 2020 - 02:10 PM

I would like "Direct Access" to a networked nas share to be possible from Android TV so that the Server is avoided where possible.

I understand this is available in Emby Theatre.

So can we have feature compatability in the Android TV app please.

Krs

Mark

Sent from my SM-N976B using Tapatalk

 

We've been over this a lot and you've been a part of those discussions.  The benefit that would provide (extremely minimal) does not currently outweigh the support requirement it would create due to the complications in providing direct access to remote file systems in Android.



#20 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 3347 posts
  • Local time: 02:24 PM

Posted 25 March 2020 - 06:34 PM

Here is what has been in the wiki/knowledge base: https://support.emby...les/44001920144

If anyone sees anything needing change let me know.  I'll likely add some info to this page or at least a link on this page with info from this thread.

 

Direct Play

Media file is used AS IS without any modification. It can be sent from the Emby server or (some clients) allowed to be played directly from the file system. The media fits all the criteria needed by the client including:

  • Stored in a compatible file container playable by the client
  • Encoded with compatible codecs for the client
  • Encoded with a compatible bit rate for the client
  • Has a resolution compatible with the client
Direct Stream

Also known as transmuxing. The Media file is altered in real-time while being delivered to the client. This happens when the container of the media file is not compatible with the client, (.avi, .wmv, .ts, etc), but the resolution, bitrate, and codecs are supported.

In this case the server extracts the internal tracks of the media file such as the video, audio & subtitle tracks and rewrites the file in real-time to a compatible container format the client does support.

Direct Streaming does not touch the video or audio tracks in anyway so there is no loss of quality.

Transcoding

Transcoding takes place when one or more tracks in the media file are not compatible with the client app. This could be the video codec, audio codec, or subtitle being used. The media file could have a higher resolution then requested by the client app or the bit rate of the file could be higher then the client can presently use.

Transcoding at a high level, is taking already encoded content; decoding it; and then altering it. After altering, it is then reassembled/encoded back into a format compatible with the client app and the current settings it is using.

As an example, you might change the audio and/or video format (codec) from one to another, such as converting from an MPEG2 source (commonly used in broadcast television) to H.264 video and AAC audio (the most popular codecs for streaming).

Transcoding only the audio track is a light weight process. Transcoding video can be very taxing on the CPU in the server depending on the resolution, bitrate and codecs being used.







Also tagged with one or more of these keywords: transcode, audio, aac, hevc

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users