Jump to content

Recommended Posts

Bloodred

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.

  • Like 6
Link to comment
Share on other sites

  • 1 month later...
Bloodred

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Bloodred

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

Link to comment
Share on other sites

CarlosLima
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?

Link to comment
Share on other sites

Bloodred

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.

Link to comment
Share on other sites

CarlosLima

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

Link to comment
Share on other sites

Bloodred

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

  • Like 1
Link to comment
Share on other sites

  • 4 months later...
KMBanana

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.
Link to comment
Share on other sites

Bloodred

 

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.

Link to comment
Share on other sites

Bloodred

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.
Link to comment
Share on other sites

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

Link to comment
Share on other sites

Bloodred

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
Link to comment
Share on other sites

Bloodred

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Bloodred

Thanks! I downloaded the source and tried to build it, but VS (2015) won't even open the project. It's saying something the default XML namespace needing to be the MSBuild XML namespace, but I'm not familiar with MSBuild or with what it's trying to tell me. It's probably best I wait for an update on NuGet, that way it should also be easier for me to update the client in the future too.

 

Namespace changes shouldn't be too much trouble to fix, as long as the actual API has remained similar at least in terms of general design.

Edited by Bloodred
Link to comment
Share on other sites

Bloodred

I see. I assume that if I were to use NuGet, that would still work fine with 2015, since I'm not doing the project building in that case, right?

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