Kodi Community Forum

Full Version: Using mplayer as external player for WMV (?)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
On the various hardware I use, the built in video player in XBMC doesn't appear to work perfectly with WMV files containing VC-1 encoded video streams. Because of this I'd like to try using mplayer (or perhaps ffplay) as an external video player with XBMC, perhaps only for WMV files. I have two questions about this:

1) Does anyone have an good working example of a playercorefactory.xml file that invokes mplayer as an external player that they could share with me? I'm sure that others have done this already, so I'd prefer not to try to re-invent this particular wheel.

2) I'm real curious about how (or whether) various kinds of playback controls get implemented in scenarios where XBMC invokes an external video player. Specifically, will all of the buttons on my generic cheapie Saxony[tm] IR remote (model VCR-1100) still function as they currently do? I'm most particularly interested to know whether the pause, small skip forward (left button), big skip forward (up button), small skip back (right button), and big skip back (down button) playback controls will continue to work once I am using an external video player, and/or how these can be made to work with an external player (e.g. mplayer).

Thanks in advance for any answers.
mplayer should work well. You can specify keypresses other than the default for mplayer by specifying a control file, eg
Code:
##
## MPlayer input control file
##

RIGHT seek +10
LEFT seek -10
- audio_delay 0.100
+ audio_delay -0.100
q quit
> pt_step 1
< pt_step -1
ENTER pt_step 1 1

I would simply line mplayer's controls up with the keypresses xbmc expects. Then your remote should work as it does in xbmc.

For example 'q' normally exits playback in mplayer, 'x' exits playback in xbmc. So setup mplayer's input control file so that 'x' exits instead of 'q'.

Many keys do similar things. right and left arrow will skip forward and back, although the amounts may be different. See http://www.mplayerhq.hu/DOCS/HTML/en/control.html

I have assumed that your remote is of the type that emulates a keyboard and sends a keypress. If not you may have to delve into lirc configuration, but it will still be possible.

My own remote has switchable keymaps, and if were doing this I would start mplayer with a command like:

Code:
/usr/local/bin/sapphire_keymap.sh /etc/sapphire/keymap.mplayer
/usr/bin/mplayer (whatever else is needed)
/usr/local/bin/sapphire_keymap.sh /etc/sapphire/keymap.default
Thanks for the response nickr.

I looked into this possible combo (XBMC+MPlayer) a bit more last night and even managed to cook up a version of playercorefactory.xml that kinda/sorta worked for me, but there are a couple of two or three issues that would seem to make this combo less than ideal... at the present moment at least:

1) Whereas both you and also the MPLayer online documentation give good guidance regarding how to set up LIRC so as to get it to transliterate IR remote control button presses into things that XBMC will "do the right thing" with, and despite the fact that I am fundamentally more comfortable working on/under UNIX, the test setup I was trying to use last night had XBMC+MPlayer running under _Windows 7_ and on that platform, there is no guidance whatsoever provided for how to get the remote buttons properly recognized by Mplayer. (And on that platform, a small subset of the remote buttons do seem to do pretty much what you would expect, but even the pause and stop buttons do not work, and in fact those two, among many others, have no effect at all.)

I am going to be joining the MPlayer users mailing list and I will be asking about this issue.

2) Although quite minor, what I saw occurring when I tried using XBMC+MPlayer on top of Windows 7 was substantially less "seamless" than just using XBMC's built-in player. Specifically, when starting playback, rather than a seamless transition, one sees XBMC first getting minimized into the system tray, and then, a fraction of a second later, one sees MPlayer pop up and start playing. No big deal, but as I say, just not nearly as seamless, visually, as using the in-built player.

3) Far more importantly... and please do correct me if I am wrong about this... it appears to me that when using an external player with XBMC, one loses all of the niceties of XBMC's on-screen display (OSD) stuff. When I am using the in-built player and watching a video, I can nudge the mouse control thingy on the remote and the OSD, in all its glory, will pop up and overlay the video currently playing, giving me all manner of useful information and controls. But as I've mentioned above, MPlayer on Windows doesn't grok those buttons on the remote. Also, it appears to me that when using MPlayer as an external player, there isn't even a cursor to nudge!

All things considered, I think I'm going to abandon my idea of trying to use MPlayer as an external player, and instead just try to dig in and find out what exactly is causing XBMC's internal player to have trouble positioning within files containing VC-1 streams. (I have already filed a formal bug report on this issue.)
Windows, don't use it for this sort of stuff, so don't have a clue sorry.

Minimisation etc - not sure whether there is a work around for this.

You certainly won't get the OSD, that is part of XBMC.