MediaBrowser / Emby

Emby Server is a personal media server with apps on just about every device.
https://emby.media
GNU General Public License v2.0
4.18k stars 810 forks source link

Server transcodes even when unnecessary #1249

Closed Deihmos closed 8 years ago

Deihmos commented 9 years ago

The server trancodes videos even when not necessary regardless of the bitrate. The server is transcoding the video playing in all browsers. I even experience this with low bitrate videos with h264 video and aac audio. The video transcodes from h264 to h264 and aac to aac.

http://emby.media/community/index.php?app=core&module=attach&section=attach&attach_id=11685

http://emby.media/community/index.php?app=core&module=attach&section=attach&attach_id=11767

ariselseng commented 9 years ago

Already reported here without any luck: #1188 @LukePulverenti Are you aware of this bug?

Deihmos commented 9 years ago

At least I am not the only one.

ariselseng commented 9 years ago

I really hope this will be fixed soon as this is the only thing stopping me from using Emby full time.

ariselseng commented 9 years ago

This issue is also mentioned here: http://emby.media/community/index.php?/topic/17950-webui-transcoding-please-stop/

This is a bug that manifests itself in all operating systems. So there is potentially many users affected by this. So I would argue that this is a serious bug. Is there anyone that can help figure out what is causing this?

Deihmos commented 9 years ago

I believe emby does not do any remuxing so it has to convert everything. I have videos that are h264 and AAC but with an mkv extension. Emby does a full conversion instead of a container swap.

ariselseng commented 9 years ago

@Deihmos This is the bug isn't it?

Deihmos commented 9 years ago

I don't think it has any code to remux videos at all. So I guess it isn't a bug but just the way it is. Maybe it will be added in the future.

ariselseng commented 9 years ago

Ah that makes sense. If this is true then it should be really simple to implement. I will use Plex for now ;)

psxlover commented 9 years ago

Even though the video is transcoded from h264 to h264 the level of the original video (5.1) is different from the target level (4.1). My guess is that at least for the linked file the reason it gets transcoded is the level of the video, not the container or the bitrate, since not a lot of devices support playing of level 5 and up h264 videos. Not sure what is the maximum level supported by browsers, but Emby's player seems to limit it to 4.1: https://github.com/MediaBrowser/Emby/blob/8b2e009bf78b3062df609cd5fbbee254a42aeb36/MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js#L386

ariselseng commented 9 years ago

@psxlover In my case, any mkv file with h264/aac that is remuxed manually to mp4 with ffmpeg -i ... -c copy ... is playing fine in emby without transcoding. But I have found no mkv that plays directly in emby without triggering transcoding.

ariselseng commented 9 years ago

@psxlover @Deihmos I just tested with a mkv file with profile high@4.0 and it was transcoded just as the others I have tried.

Deihmos commented 9 years ago

I have played h264 profile 3.1 and it still transcodes so it has nothing to do with the profile.

LukePulverenti commented 8 years ago

See here: http://emby.media/community/index.php?/topic/28474-305824-chrome-transcoding/

LukePulverenti commented 8 years ago

This has gone stable now:

http://emby.media/community/index.php?/blog/1/entry-268-emby-server-3057818-released/

ariselseng commented 8 years ago

Thank you so much. Now the web interface is usable as a plex replacement! @LukePulverenti Is there any plans for aac stream copy too? My poor i3 still has 1 core at 100% usage with only audio reencoding. Though its not a big deal, it would be fine to have as an option at least, although I understand that hls/dash streaming with different aac profiles is not entirely stable across browsers yet. Even chrome sometimes struggle with HE-AAC.

LukePulverenti commented 8 years ago

We do sometimes stream copy the audio but HE-AAC is currently excluded as direct stremable from Chrome. I have had several users send me sample files with HE-AAC that I am unable to play in Chrome.