Jump to content


Photo

Emby External Player Launcher

Emby External Player Launcher EmbyExternalPlayerLauncher E2PL MPC-HC external external player

  • Please log in to reply
70 replies to this topic

#1 Bloodred OFFLINE  

Bloodred

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:27 AM

Posted 14 March 2017 - 05:37 PM

58c84addd2901_newlogo_bold_2561.png

Emby External Player Launcher (E2PL)

 

 

Emby External Player Launcher is a simple and pretty basic .NET application that connects an external video player to an Emby server as a playback device. MPC-HC is currently supported, MPC-BE should work as well and more players may be coming in the future. E2PL lets you play videos from your Emby library straight to MPC-HC, provides remote control support for essential commands and will automatically sync viewing progress to your library.

 

I wrote E2PL for my own personal use, I wanted to watch videos using MPC-HC on my Windows desktop while also keeping everything nicely synchronized with my Emby library, which I access from multiple devices. I simply leave E2PL running in the background, use the Emby web interface to select it as a playback device and play videos. I decided to also release it since it may be useful to other people as well.

 

General features:

  • Play videos from your Emby library in MPC-HC
  • Automatic viewing progress synchronization
  • Resuming in-progress videos
  • Remote control: E2PL will translate essential remote control commands from the Emby web interface to MPC-HC (stop, pause/unpause, seek and volume control are supported)
  • Easy to run: no special install required, simply run the program
  • Doesn't get in the way: E2PL only appears as a tray icon and works in the background once configured
  • Free and open source: anyone can contribute or have a look at the source (GPLv3 licensed)

E2PL uses direct playback in order to launch MPC-HC, the videos have to be stored on your PC or on a network share that can be accessed. The Emby server itself isn't involved in the playback process, which also means that transcoding isn't supported.

 

Where to get it:

On GitHub. There is more detailed information available in the ReadMe as well as the source code and pre-built binary versions you can simply download from the Releases section.

If you just want to download it, click here and get the latest release.

 

Make sure to read the ReadMe for some instructions.

 

Support:

If you're using E2PL and are experiencing issues, let me know and I'll try to help. As for further development, I will very likely keep E2PL working with new versions of Emby if compatibility breaks since I'm using it myself. I may also look into adding support for mpv and Mono/Linux in the future, but I have no specific plans at this point.

 

Using E2PL and have a suggestion or some feedback? Let me know.


  • Overseer, Natilus13, Kmark40 and 2 others like this

#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 134446 posts
  • Local time: 09:27 PM

Posted 14 March 2017 - 05:41 PM

Very cool, thanks !



#3 Bloodred OFFLINE  

Bloodred

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:27 AM

Posted 14 March 2017 - 05:46 PM

I already wrote it, thought I may as well post it too.  :)



#4 dosullivan84 OFFLINE  

dosullivan84

    Member

  • Members
  • 21 posts
  • Local time: 02:27 AM

Posted 16 April 2017 - 10:16 AM

Anychance you could write up something that launches other programs like desktop apps? 



#5 Bloodred OFFLINE  

Bloodred

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:27 AM

Posted 16 April 2017 - 10:35 AM

Could you give me a bit more info on what you're trying to do? My goal was to get video playback working, I take it you want to launch a desktop application that's not a video player? Depending on what you want to do it may or may not be easy/simple/quick to implement.



#6 CarlosLima OFFLINE  

CarlosLima

    Advanced Member

  • Members
  • 470 posts
  • Local time: 10:27 PM
  • LocationSao Paulo

Posted 16 April 2017 - 10:58 AM

I read all this topic and also in GitHub and was only a doubt. Use the external player for Emby will deliver better quality in the image or add support to some format that Emby can not reproduce?
Thank you for your comment.


#7 Bloodred OFFLINE  

Bloodred

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:27 AM

Posted 16 April 2017 - 11:33 AM

E2PL doesn't do any playback by itself, it just launches a desktop video player for you.

 

For quality - The player is MPC-HC (Media Player Classic Home Cinema) and it does provide better image quality than playing video in a browser. This is the fault of the browser, not because of Emby though, browsers just aren't as good as dedicated video players.

 

As for formats - Emby should play pretty much everything in the browser since it will automatically transcode unsupported formats. MPC-HC however will play pretty much everything natively and directly, which again means better quality (transcoding slightly degrades the video).



#8 CarlosLima OFFLINE  

CarlosLima

    Advanced Member

  • Members
  • 470 posts
  • Local time: 10:27 PM
  • LocationSao Paulo

Posted 16 April 2017 - 11:51 AM

Excellent response expected, thank you. It is more than justified the use of your project, because video quality is everything.
A noob question. Should each client install the MPC-HC or my machine to take advantage of E2PL features?


#9 Bloodred OFFLINE  

Bloodred

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:27 AM

Posted 16 April 2017 - 12:04 PM

If you want to use it on multiple computers, then yes each computer should have both E2PL and MPC-HC installed. Each computer should also have access to a file share of the videos on the server. This is required because MPC-HC will read the video files directly without involving the Emby Server application.

 

The file shares would usually be done via Windows sharing, or using Samba if your server computer runs Linux. If the server machine is some NAS appliance or something like that - it should also have its own feature for this, file sharing for Windows is pretty much universally supported as far as I know.



#10 CarlosLima OFFLINE  

CarlosLima

    Advanced Member

  • Members
  • 470 posts
  • Local time: 10:27 PM
  • LocationSao Paulo

Posted 16 April 2017 - 12:07 PM

I got it, thanks. I figured I could install on Emby Server and all connected clients would benefit, without the need for local installation.



#11 Bloodred OFFLINE  

Bloodred

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:27 AM

Posted 16 April 2017 - 01:07 PM

I see. E2PL is actually exclusively local, it doesn't modify anything on the server other than updating the viewing progress for the user.


  • CarlosLima likes this

#12 KMBanana OFFLINE  

KMBanana

    Advanced Member

  • Members
  • 131 posts
  • Local time: 09:27 PM

Posted 15 September 2017 - 03:34 PM

Just started using it and this is great!  

 

The Play/Pause functionality doesn't seem to work for me though.  I can stop the video or skip around in it, hitting Play/Pause just turns the button green and nothing happens.  Got this in the error log.  

[19 ] ERROR EmbyExternalPlayerLauncher.Emby.Logging.EmbyLogger - Error in OnMessageReceivedInternal
Newtonsoft.Json.JsonSerializationException: Error converting value "PlayPause" to type 'MediaBrowser.Model.Session.PlaystateCommand'. Path 'Data.Command', line 1, position 96. ---> System.ArgumentException: Requested value 'PlayPause' was not found.


#13 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 134446 posts
  • Local time: 09:27 PM

Posted 15 September 2017 - 05:34 PM

Looks like it will need an update to support that command.



#14 Bloodred OFFLINE  

Bloodred

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:27 AM

Posted 15 September 2017 - 06:52 PM

 

Just started using it and this is great!  

I'm glad to hear it's useful to you!

 

Yeah, it looks like there's no PlayPause in the old library version I'm using, this should be easy to fix. I've been able to reproduce the issue using the Android app as a remote control and I expect to have a fix out shortly.



#15 Bloodred OFFLINE  

Bloodred

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:27 AM

Posted 16 September 2017 - 10:29 AM

Well, looks like I spoke a bit too soon and it's not quite a simple "update & add PlayPause" job as the latest ApiClient library seems to have significant changes in the way connection to a server is done.

 

First of all, a sort of workaround until I can get everything fixed:

@KMBanana I assume pausing and unpausing isn't working for you since you're using a phone app as a remote control. It does however work from the server's own web interface, since it's issuing separate Pause and Unpause commands instead of the newer PlayPause, at least on 3.2.30.0 which is up to date right now for me.

 

I suggest you just use your smartphone's browser instead of the app to navigate to the server's web interface and use that as a remote instead. This should hopefully work for you until I get a proper fix out.

 

@Luke I'm running into some issues with newer library versions. I'm not a .NET dev by trade so I hope you can bear with me a little.

  1. I was using BaseItemDto.ResumePositionTicks in order to start playback at the correct position if the item has already been watched partway through. This is now gone in newer library versions. I see there is a BaseItemDto.CompletionPercentage available, but this never has any value, even if the item has been played half way through. Am I doing something wrong? How am I supposed to get an equivalent of the old ResumePositionTicks?
  2. I think I'm having some issues due to the different library versions. I'm getting them from NuGet. It seems that MediaBrowser.ApiClient has not been updated since a year ago, so I was already using the latest version (3.0.640). MediaBrowser.Common however has last been updated this month (3.0.748). Are these the versions I should be using? The very new Common package does not seem to be compatible with the old ApiClient package, but I require a new Common version in order to get PlayPause. If I update Common to 3.0.748 I get cryptic compile-time errors such as: Reference to type 'IDevice' claims it is defined in 'MediaBrowser.Model', but it could not be found. I'm getting this simply when trying to create an ApiClient instance and as far as I can tell this sort of error pops up when different assembly versions are not compatible. Am I doing something wrong here, which package versions should I be using, and where should I get them if not NuGet? I did manage to hack something together with Common v3.0.705 but I'm getting the feeling this isn't how things should be done properly, so I'd love a bit of help with this.


#16 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 134446 posts
  • Local time: 09:27 PM

Posted 16 September 2017 - 10:56 AM

You should stick to the model version that the latest apiclient depends on, rather than updating the model separately.

#17 Bloodred OFFLINE  

Bloodred

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:27 AM

Posted 16 September 2017 - 11:08 AM

Yeah, that's what I thought, but the latest ApiClient release on NuGet is so old that PlaystateCommand does not contain PlayPause and as such the JsonSerializationException KMBanana posted above pops up and I cannot properly add support for PlayPause. Is there some other place where I can get a newer ApiClient?


Edited by Bloodred, 16 September 2017 - 11:09 AM.


#18 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 134446 posts
  • Local time: 09:27 PM

Posted 16 September 2017 - 11:15 AM

Not yet, we just haven't updated it yet.



#19 Bloodred OFFLINE  

Bloodred

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:27 AM

Posted 16 September 2017 - 11:35 AM

OK then, I suppose I'll just wait for a new version to release a proper version of E2PL with a new library version.

 

What about ResumePositionTicks or equivalent functionality? I could release a "beta" version of E2PL using Common 3.0.705 and the old client which still appears to work for this use case, just as a stopgap in the meantime. I don't really want to release it without resuming support though, since that's a pretty useful feature (even to my own personal use of E2PL).



#20 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 134446 posts
  • Local time: 09:27 PM

Posted 16 September 2017 - 12:08 PM

That's under user data now. Anyway i haven't pushed a nuget update yet, but i updated the apiclient repo if you want to build it. Just be aware most namespaces have changed.







Also tagged with one or more of these keywords: Emby External Player Launcher, EmbyExternalPlayerLauncher, E2PL, MPC-HC, external, external player

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users