Jump to content

Play via DLNA from within the Emby app


Maugrim

Recommended Posts

Maugrim

I recently bought a Sony KD-75XE9005 that is giving me a hard time trying to play movies via the Emby Android TV app. Many of my movies stutter and/or doesn't show any picture if they have a high bitrate. Telling the client to keep the transcoded bitrate really low like 15-20 Mb/s often works but then the quality suffers. The same movie is sometimes transcoded and sometimes remuxed etc.

 

This have made me try DLNA via the Movie app that is factory installed on the TV and this works much much better. The downside of this is that the interface on the TV looks like s..t compared to the Emby app and using the Emby app on my phone "casting (DLNA)" to the TV works but the it's hard when one wants the rest of the family in the process of picking movies.

 

If one could "cast" to the TV from inside the Emby Android TV app I would get the best of the two worlds; Sonys optimized DLNA player with an Emby interface
 

Link to comment
Share on other sites

Now I have done a some additional testing. First I tried via the Emby Android TV app and after that i used (via DLNA) the Movies app that came with the TV.

 

One thing that is clearly visible is that the Emby app want to transcode far to often. If I use DLNA nearly all of the movies doesn't put any load on the PC running the server, only on my file server.

 

The Emby server runs on a NUC with an Intel Core i5-4250U CPU and 8 GB RAM.

 

I have attached the server logs and I also uploaded from within teh Emby app 22:45 (user Media)

 

 

Movie: 300
App 20:25: stutters one "picture" every third second at most
DLNA 21:34: no cpu
 
Movie: Tintin
App 20:27: ffmpeg 98% CPU but plays smooth
DLNA 21:37: gives me unsupported video format
 
Movie: Avengers
App 20:29: ffmpeg 24%
DLNA 21:37: no cpu but can't choose subs
 
Movie: The Bourne Ultimatum
App 20:30: Dialog Playback error. 2 processes 30% CPU each that has to be killed manualy
DLNA 21:39: no cpu
 
Movie: Despicable me 3
App 20:34: ffmpeg 24%
DLNA 21:41: no cpu
 
Movie: Dunkirk
App 20:37: 2 ffmpeg processes (5-10%) until I choose subs when a third process starts craving 50% CPU 
DLNA 21:42: no cpu
 
Movie: Frozen
App 20:41: ffmpeg 13% until I choose subs after that one at 16% and one at 50% 
DLNA 21:43: no cpu
 
Movie: The Hobbit: An unexpected Journey
App 20:45 (and 20:46): ffmpeg 95% and after choosing sub 2 processes and Playback error dialog. Yes in that dialog gives me 4 ffmpeg processes and and a choppy playback without subs
DLNA 21:45: unsupported video
 
Movie: Pacific rim
App 20:51: 2 ffmpeg 15 and 3 %. Subs gives 3 ffmpeg 50/10/3%
DLNA 21:46: no cpu
 
Movie: Polar express h264high 9,8 Mb/s
App: nothing happens at first try (20:56). Next try 20:57 also gives nothing on screen
DLNA 21:48 : no cpu but can't choose sub
 
Movie: Polar express VC1
App 20:59: no cpu usage on server but picture is 1 frame per 3 second and no sound
DLNA 21:50: no cpu 
 
Movie: Thor
App 21:00: ffmpeg 20%. With subs 2 ffmpeg 45 and 20% CPU. One ffmpeg dies after a minute and the one left wants 40% CPU
DLNA 21:51: no cpu
 
Movie: Thor The dark world
App 21:05: ffmpeg 20% Choosing subs gives me 2 ffmpeg 16/1%
DLNA 21:53: no cpu
 
Movie: Planet Earth II
App 21:11: 2 ffmpeg 15/2 but "picture" stuck after 10-15 seconds.  
DLNA 21:55: no cpu
 
Movie: Jason Bourne
App 21:14: ffmpeg 15% but picture stuck after 10-15 seconds
DLNA 21:56: no cpu
 
Movie: Arrival
App 21:17: ffmpeg 30% but stuck picture
DLNA 21:58: no cpu 
 
Movie: Deadpool
App 21:19: ffmpeg 5%. With subs Playback error dialog and 4 ffmpeg 100% CPU
DLNA 22:01: Dialog "Cannot play video"
 
Movie: The Martian
App 21:23: no cpu. First thre attempts to choose subs didn't result in subs?!? 
DLNA 22:02: no cpu
 
Movie: Pirates of the Caribbian Dead men tell no tales
App 21:29: ffmpeg 25% but picture updates hardly ever
DLNA 22:05: no cpu
 
Movie: Rouge one
App 21:30: ffmpeg 96% but picture updates hardly ever
DLNA 22:06: Dialog "Cannot play video"
 
TV Series: Stranger things
App 21:32: no cpu even with subs
DLNA 22:07: no cpu
 
 

 
 

 

logs.zip

Link to comment
Share on other sites

There was no playback in the log you sent from the app unfortunately.

 

However, looking at one of the sessions from the server side I can see that one transcode likely resulted from an error trying to play the item directly.  Also, it looks like you have qsv enabled but not the hardware to support it?

[h264_qsv @ 000001979d999840] No device available for encoder (device type qsv for codec h264_qsv).
[h264_qsv @ 000001979d999840] Selected ratecontrol mode is not supported by the QSV runtime. Choose a different mode.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

This particular item (Hobbit) is going to require audio conversion because it is DTS which your TV doesn't support.

Link to comment
Share on other sites

  • 2 weeks later...

I forgot to mention that I have a Denon AVR and hence expect audio passthrough. I have hardware decoding/encoding via Quick Sync enabled.

​As you can see from my listing above almost everything works without any transcoding/remuxing if I watch via DLNA which makes me think that Emby (or at lest Emby on Sonys flavor of Android TV) makes the wrong decisions on what to output. According to an document I found (https://docs.google.com/document/d/1EPzlq_ipIPMCDoMqMgDl0IuKmTsMoZHeKKwE_zxbFUk/pub) 3rd party apps face big problems on Sonys implementation.

​If Emby could utilize Sonys player almost all my media problems would direct play with audio passthrough.

 

​From what understand browsing the DLNA and Android TV forums Emby struggles with deciding what is eligible for direct play and audio passthrough because bad drivers/wrong information from APIs.

 

Have you considered building an app that ignores answers from the platform and blindly tries to play media encoded with all permutations of audio/video codecs and let the user give feedback on what in works on there particular system?

 

If that isn't feasible how about Emby as a DLNA "proxy" on at least Sonys Android TV platform?

Link to comment
Share on other sites

​From what understand browsing the DLNA and Android TV forums Emby struggles with deciding what is eligible for direct play and audio passthrough because bad drivers/wrong information from APIs.

 

Hi.  Where did you see this?

 

I'm not aware of any situations where we are doing this incorrectly at this time.  However, there are certainly some situations where a TV markets "support" for a particular thing but that support may not actually be provided to apps in the Android platform.

Link to comment
Share on other sites

Movie: 300
stutters one "picture" every third second at most
 
Movie: Tintin
ffmpeg 98% CPU gives dialog Playback error when I choose subs. Starts playing after 30 seconds without my intervention but without subs. If I the choose Yes in the dialog it taks like 30-40 seconds before playback starts
 
Movie: Avengers
ffmpeg 24%
 
Movie: The Bourne Ultimatum
Starts with one ffmpeg 65% CPU. Choosing subs makes that 2 ffmpeg processes (100%) a Playbackerror dialog. Without choosing it plays 15 sekunds then pauses for a couple of seconds (and no subs)
 

​At this time there is a ffmpeg process that reads from the network at 500 Mbps that isn't interested in being killed which makes me restart the Emby server before continuing

Movie: Despicable me 3
one ffmpeg 24% with subs
 
Movie: Dunkirk
ffmpeg 100% CPU and some stutter 

 

This is actually worse than before! Compare this to the same movies played via DLNA (with Emby as DLNA server) in post #3 that didn't put any load at all on my server (and played flawless apart from Tintin)

 

I tried to upload the client logs from the app but I got a dialog stating the app wasn't responding.

 

 

 

 

logs.zip

Link to comment
Share on other sites

I think all of these issues are due to a combination of DTS-ES audio and internal ass subs.

 

Is this basically the makeup of all these items?

Link to comment
Share on other sites

I think all of these issues are due to a combination of DTS-ES audio and internal ass subs.

 

Is this basically the makeup of all these items?

 

General           : \\NASSE\Filmer\300 (2006)\300 (2006) BDRemux VC-1 HiighCode- PublicHD.mkv

Format            : Matroska at 17.3 Mb/s

Length            : 14.1 GiB for 1 h 56 min 38 s 742 ms

Video #0          : VC-1 at 16.3 Mb/s

Aspect            : 1920 x 1080 (1.778) at 23.976 fps

Audio #0          : AC-3 at 640 kb/s

Infos             : 6 channels, 48.0 kHz

Language          : en

Text #0           : UTF-8

Language          : en

Text #1           : VobSub

Language          : ar

Text #2           : VobSub

Language          : bg

Text #3           : VobSub

Language          : zh

Text #4           : UTF-8

Language          : hr

Text #5           : UTF-8

Language          : cs

Text #6           : UTF-8

Language          : da

Text #7           : UTF-8

Language          : nl

Text #8           : UTF-8

Language          : et

Text #9           : UTF-8

Language          : fi

Text #10           : UTF-8

Language          : fr

Text #11           : UTF-8

Language          : de

Text #12           : VobSub

Language          : el

Text #13           : VobSub

Language          : he

Text #14           : UTF-8

Language          : hu

Text #15           : UTF-8

Language          : id

Text #16           : VobSub

Language          : ko

Text #17           : UTF-8

Language          : lv

Text #18           : UTF-8

Language          : lt

Text #19           : UTF-8

Language          : no

Text #20           : UTF-8

Language          : pl

Text #21           : UTF-8

Language          : pt

Text #22           : UTF-8

Language          : ro

Text #23           : UTF-8

Language          : ru

Text #24           : UTF-8

Language          : sr

Text #25           : UTF-8

Language          : sl

Text #26           : UTF-8

Language          : es

Text #27           : VobSub

Language          : th

Text #28           : UTF-8

Language          : tr

Text #29           : VobSub

Language          : uk

Text #30           : UTF-8

Language          : vi

 
General           : \\NASSE\Filmer\The Adventures of Tintin (2011)\The.Adventures.of.Tintin.2011.1080p.BluRay.DTS-ES.x264-ESiR.mkv

Format            : Matroska at 12.7 Mb/s

Length            : 9.49 GiB for 1 h 46 min 51 s 819 ms

Video #0          : AVC at 11.0 Mb/s

Aspect            : 1920 x 816 (2.353) at 23.976 fps

Audio #0          : DTS at 1 509 kb/s

Infos             : 7 channels / 6 channels, 48.0 kHz

Language          : en

Text #0           : ASS

Language          : en

Text #1           : ASS

Language          : fr

Text #2           : ASS

Language          : nl

Text #3           : ASS

Language          : ro

 

General           : \\NASSE\Filmer\The Avengers (2012)\The Avengers 2012 BluRay 1080p AVC DTS-HD MA 7.1 x264-ETRG.mkv

Format            : Matroska at 15.2 Mb/s

Length            : 15.2 GiB for 2 h 22 min 54 s 902 ms

Video #0          : AVC at 10 000 kb/s

Aspect            : 1920 x 1080 (1.778) at 23.976 fps

Audio #0          : DTS at 5 217 kb/s / 1 509 kb/s

Infos             : 8 channels / 6 channels, 48.0 kHz

Language          : en

 
and external subtitle (srt)
 
General           : \\NASSE\Filmer\The Bourne Ultimatum\The Bourne Ultimatum.mkv

Format            : Matroska at 33.3 Mb/s

Length            : 26.8 GiB for 1 h 55 min 19 s 382 ms

Video #0          : VC-1 at 29.1 Mb/s

Aspect            : 1920 x 1080 (1.778) at 23.976 fps

Audio #0          : DTS at 4 208 kb/s / 1 509 kb/s

Infos             : 6 channels, 48.0 kHz

Text #0           : ASS

 

General           : \\NASSE\Filmer\The Bourne Ultimatum\The Bourne Ultimatum.mkv

Format            : Matroska at 33.3 Mb/s

Length            : 26.8 GiB for 1 h 55 min 19 s 382 ms

Video #0          : VC-1 at 29.1 Mb/s

Aspect            : 1920 x 1080 (1.778) at 23.976 fps

Audio #0          : DTS at 4 208 kb/s / 1 509 kb/s

Infos              : 6 channels, 48.0 kHz

Text #0           : ASS

 

and external subs (sub)

 

General           : \\NASSE\Filmer\Dunkirk (2017)\Dunkirk.2017.REMUX.1080p.BluRay.AVC.DTS-HD.MA.5.1-iFT.mkv

Format            : Matroska at 34.9 Mb/s

Length            : 26.0 GiB for 1 h 46 min 38 s 273 ms

Video #0          : AVC at 32.5 Mb/s

Aspect            : 1920 x 1080 (1.778) at 23.976 fps

Audio #0          : DTS at 2 411 kb/s / 1 509 kb/s

Infos             : 6 channels, 48.0 kHz

Language          : en

Text #0           : PGS

Language          : en

Text #1           : PGS

Language          : fr

Text #2           : PGS

Language          : es

Text #3           : PGS

Language          : pt

 
Link to comment
Share on other sites

The couple I looked at were transcoding for one reason or another (e.g. unsupported audio) and then had an internal sub selected so that meant that it had to be extracted or burned in.

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