Kodi Community Forum
[WINDOWS] External Player Support Thread - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
---- Thread: [WINDOWS] External Player Support Thread (/showthread.php?tid=43511)



- antalm - 2009-01-26

Jester Wrote:Upped XBMCSetup-Rev17368-jester-ext.exe

This is with mobyuk's latest patch....

External player works perfectly with this patch (as alt-tab)
Thanks moby & jester


- timdog82001 - 2009-01-26

THX-UltraII Wrote:Also, is it possible to play trailers (.mov's) that are in a separte folder before a movie starts?

I'm not sure how well it all works if you're trying to use the external player, but nuka's Home Theater script does what you're looking for (though it streams them off the internet rather than out of a folder)


- THX-UltraII - 2009-01-26

thxz for all help until now! @digitalhigh, thxz for your pm, ill come back to this asap but i m trying to get mpchc work first, that s my main priority.

so ive made a .xml file called advancedsettings.xml and the file looks like this:

<advancedsettings>
<fullscreen>true</fullscreen>
<video>
<defaultplayer>externalplayer</defaultplayer>
</video>
<externalplayer>
<filename>C:\Program Files\mpchc\mplayerc.exe</filename>
<args>/F</args>
<forceontop>true</forceontop>
<hidexbmc>true</hidexbmc>
<hideconsole>false</hideconsole>
<hidecursor>false</hidecursor>
</externalplayer>
</advancedsettings>


mpc hc gives me the following error:

unrecognized switch(es) found in command line string:

C:\Program Files\mpchc\mplayerc.exe /F C:\Documents and Settings\HD 1080p movies\PulpFiction.mpg

usage: mplayerc.exe "pathname" (switches)

and than some other not so important lines i think


what am i doing wrong?


- digitalhigh - 2009-01-26

I believe the switch should be /fullscreen or /full, I'm not home to check my version, or I'd tell you for sure.


- Darkjasper - 2009-01-26

This is awesome, I was having issues with the default player doing mkv files. And was looking else were for a app to run on my tv which is a second output from my computer. This makes every thing work now. Just need to figure out why it still freezes while browsing....


- User 42580 - 2009-01-26

Do any of guys know if there is a command in MPC-HC to amke it close after playing a video?


- digitalhigh - 2009-01-27

Should be something in the settings where you define what to do after playback.

A box marked "close". Wink


- moby-uk - 2009-01-27

Discaciate Wrote:Do any of guys know if there is a command in MPC-HC to amke it close after playing a video?

digitalhigh Wrote:Should be something in the settings where you define what to do after playback.

A box marked "close". Wink

I don't _think_ that persists across runs. Your externalplayer config should include:
Code:
<args>/close</args>



- RandomXBMCUser - 2009-01-27

MPC works just fine with the current build, now if only externalplayer would default dvds. Is there a way to trick XBMC into thinking DVD directories should be sent externally by default?


- ixian - 2009-01-27

Thanks Moby and Jester! Works perfect for me with both Moby's build and the new one Jester put up - VistaSP1x32, AMD 780G system.

Anyone have any pointers on mapping the remote with Eventghost? I'm using a media center remote, looking to map the controls to Mplayer-hc when it's launched, but a little lost so far with Eventghost. Any fingers in the right direction would be appreciated.


- BlueSpam - 2009-01-27

ixian Wrote:Thanks Moby and Jester! Works perfect for me with both Moby's build and the new one Jester put up - VistaSP1x32, AMD 780G system.

Anyone have any pointers on mapping the remote with Eventghost? I'm using a media center remote, looking to map the controls to Mplayer-hc when it's launched, but a little lost so far with Eventghost. Any fingers in the right direction would be appreciated.

I just set this up this evening, so my solution may not be the best but here's what I did:

Two folders in EventGhost, one with your XBMC plugin events mapped to the remote (default enabled), and the other with MPC events mapped (default disabled). Then, a global folder that's always enabled. In the global folder, two macros: one that disables the XBMC events and enables the MPC ones when a taskCreated event fires for mplayerc, and another one that does the reverse when a taskDestroyed event fires. I also made sure to do a FindWindow and bring to front for XBMC on the latter event since after MPC returned XBMC was coming back with the taskbar overlapping.


- THX-UltraII - 2009-01-27

digitalhigh Wrote:I believe the switch should be /fullscreen or /full, I'm not home to check my version, or I'd tell you for sure.

hi m8, i don t understand what you are saying. do i need to change something in the .xml file?


- ashlar - 2009-01-28

Jester, I'll try your latest build. In case everything works fine, it would be great to have it back in SVN.
My final goal would be to skip the external player altogether, but in the meantime I need to test all the developments in DVDplayer and as long as external player stays outside... we are at the mercy of your (infinitely appreciated) time. Smile


- navy1978 - 2009-01-29

Hi, forgive me for my poor english...
I follow your istructions:
i create a fil e: advancedsettings.xml

<advancedsettings>
<video>
<defaultplayer>externalplayer</defaultplayer>
</video>
<externalplayer>
<filename>C:\Programmi\Mplayer\mplayer.exe</filename>
<args>-fs</args>
<forceontop>true</forceontop>
<hidexbmc>true</hidexbmc>
<hideconsole>false</hideconsole>
<hidecursor>false</hidecursor>
</externalplayer>
</advancedsettings>




and put it in my :

C:\Documents and Settings\User\Dati applicazioni\XBMC\userdata\

directory, but my xbmc work normally and use it's default player....
My version is the last downloaded from xbmc officila site (8.10) yesterday...

Whene i rigth.click on a movie i can't see an entry that permit me to select the external player player...

this is my log file:

43 T:4032 M:1299877888 NOTICE: Starting XBMC, Platform: Windows XP Professional Service Pack 3 build 2600. Built on Nov 13 2008 (compiler 1500)
02:26:43 T:4032 M:1299877888 NOTICE: AMD Athlon™ 64 X2 Dual Core Processor 5000+
02:26:43 T:4032 M:1299877888 NOTICE: Desktop Resolution: 1280x960 32Bit at 60Hz
02:26:43 T:4032 M:1299877888 NOTICE: Q is mapped to: E:\Programmi\XBMC
02:26:43 T:4032 M:1299877888 NOTICE: The executable running is: E:\Programmi\XBMC\XBMC.exe
02:26:43 T:4032 M:1299877888 NOTICE: Log File is located: C:\Documents and Settings\User\Dati applicazioni\XBMC\xbmc.log
02:26:43 T:4032 M:1299877888 NOTICE: -----------------------------------------------------------------------
02:26:43 T:4032 M:1299857408 NOTICE: Setup SDL
02:26:43 T:4032 M:1298853888 NOTICE: load settings...
02:26:43 T:4032 M:1298841600 NOTICE: Mapping drive P to C:\Documents and Settings\User\Dati applicazioni\XBMC\userdata
02:26:43 T:4032 M:1298837504 NOTICE: loading C:\Documents and Settings\User\Dati applicazioni\XBMC\userdata\guisettings.xml
02:26:43 T:4032 M:1298264064 NOTICE: Getting hardware information now...
02:26:43 T:4032 M:1298264064 NOTICE: Checking resolution 10
02:26:43 T:4032 M:1298264064 NOTICE: Setting autoresolution mode 12
02:26:43 T:4032 M:1298231296 NOTICE: Loaded advancedsettings.xml from C:\Documents and Settings\User\Dati applicazioni\XBMC\userdata\advancedsettings.xml
02:26:43 T:4032 M:1298206720 NOTICE: Getting hardware information now...
02:26:43 T:4032 M:1298206720 NOTICE: Checking resolution 10
02:26:43 T:4032 M:1298206720 NOTICE: Setting autoresolution mode 12
02:26:43 T:4032 M:1298235392 NOTICE: C:\Documents and Settings\User\Dati applicazioni\XBMC\userdata\sources.xml
02:26:43 T:4032 M:1282457600 NOTICE: start dvd mediatype detection
02:26:43 T:4032 M:1282441216 NOTICE: initializing playlistplayer
02:26:43 T:4032 M:1282433024 NOTICE: DONE initializing playlistplayer
02:26:43 T:4032 M:1282412544 NOTICE: load default skin:[MediaStream]
02:26:43 T:4032 M:1275277312 ERROR: Window Translator: Can't find window settingscategory
02:26:43 T:4032 M:1275269120 ERROR: Error evaluating boolean expression !Window.Previous(0) + !Window.Previous(SettingsCategory) + !Window.Previous(1001) + !Window.Previous(130) + !Window.Previous(34)
02:26:44 T:4032 M:1272864768 NOTICE: Updating video library on startup
02:26:44 T:4032 M:1272590336 NOTICE: Updating music library on startup
02:26:44 T:4032 M:1272332288 NOTICE: initialize done
02:26:44 T:4032 M:1272377344 NOTICE: Running the application...
02:26:44 T:4032 M:1271853056 NOTICE: ES: Starting event server
02:26:44 T:620 M:1271779328 NOTICE: ES: Starting UDP Event server on 127.0.0.1:9777
02:26:44 T:620 M:1271562240 NOTICE: UDP: Listening on port 9777
02:26:44 T:1324 M:1268191232 NOTICE: My Videos: Scanning for video info using worker thread, operation took 00:00
02:26:44 T:2992 M:1268146176 NOTICE: My Music: Scanning for music info using worker thread, operation took 00:00
02:26:57 T:4032 M:1257033728 WARNING: CUtil::GetMatchingSource... no matching source found for [Plugin Video]
02:27:00 T:4032 M:1255227392 ERROR: Keymapping error: no such action '-' defined
02:27:05 T:4032 M:1250672640 ERROR: Keymapping error: no such action '-' defined
02:27:06 T:4032 M:1257713664 ERROR: Keymapping error: no such action '-' defined
02:27:07 T:4032 M:1257684992 ERROR: Keymapping error: no such action '-' defined
02:27:07 T:4032 M:1255964672 NOTICE: DVDPlayer: Opening: E:\Film\DEJA VU CORSA CONTRO IL TEMPO.avi
02:27:07 T:4032 M:1255952384 WARNING: CDVDMessageQueue:Tongueut MSGQ_NOT_INITIALIZED
02:27:07 T:3900 M:1255931904 NOTICE: Creating InputStream
02:27:07 T:3900 M:1255907328 NOTICE: Creating Demuxer
02:27:08 T:3900 M:1238806528 NOTICE: Opening video stream: 0 source: 256
02:27:08 T:3900 M:1238806528 NOTICE: Creating video codec with codec id: 13
02:27:08 T:3900 M:1238437888 NOTICE: Creating video thread
02:27:08 T:3900 M:1238421504 NOTICE: Opening audio stream: 1 source: 256
02:27:08 T:3900 M:1238409216 NOTICE: Finding audio codec for: 86020
02:27:08 T:2164 M:1238302720 NOTICE: running thread: video_thread
02:27:08 T:3900 M:1238294528 NOTICE: Creating audio thread
02:27:08 T:3900 M:1238274048 WARNING: CDVDPlayer::CheckContinuity - stream wrapback detected (2)
02:27:08 T:3900 M:1238274048 WARNING: CDVDPlayer::CheckContinuity - resyncing due to stream wrapback (2)
02:27:08 T:988 M:1238237184 NOTICE: running thread: CDVDPlayerAudio:Tonguerocess()
02:27:08 T:988 M:1239048192 NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 48000, no pass-through
02:27:08 T:988 M:1238269952 WARNING: CWin32DirectSound::AddPackets - buffer underrun
02:27:08 T:2164 M:1237921792 NOTICE: fps: 25.000000, pwidth: 704, pheight: 304, dwidth: 703, dheight: 304
02:27:08 T:2164 M:1237913600 NOTICE: Display resolution AUTO : 1280x960 (Full Screen) (12)
02:27:08 T:2164 M:1237909504 WARNING: Upscale: selected algorithm 1
02:27:08 T:4032 M:1237815296 NOTICE: GL: Selecting YUV 2 RGB Progressive Shader
02:27:08 T:4032 M:1235787776 NOTICE: GL: NPOT texture support detected
02:27:08 T:988 M:1245007872 WARNING: CWin32DirectSound::AddPackets - buffer underrun
02:27:28 T:4032 M:1240313856 NOTICE: Storing total System Uptime
02:27:28 T:4032 M:1240313856 NOTICE: Saving settings
02:27:28 T:4032 M:1240268800 NOTICE: stop all
02:27:28 T:4032 M:1240268800 NOTICE: ES: Stopping event server
02:27:28 T:620 M:1240268800 NOTICE: ES: UDP Event server stopped
02:27:28 T:4032 M:1240297472 NOTICE: stop dvd detect media
02:27:28 T:4032 M:1240326144 NOTICE: stop player
02:27:28 T:4032 M:1240330240 NOTICE: CDVDPlayer::CloseFile()
02:27:28 T:4032 M:1240317952 NOTICE: DVDPlayer: waiting for threads to exit
02:27:28 T:3900 M:1240317952 NOTICE: CDVDPlayer::OnExit()
02:27:28 T:3900 M:1240317952 NOTICE: DVDPlayer: closing audio stream
02:27:28 T:3900 M:1240317952 NOTICE: Closing audio stream
02:27:28 T:3900 M:1240317952 NOTICE: waiting for audio thread to exit
02:27:28 T:988 M:1240317952 ERROR: CDVDAudio::AddPackets - failed to add leftover bytes to render
02:27:28 T:988 M:1240317952 NOTICE: Closing audio device
02:27:28 T:988 M:1240514560 NOTICE: thread end: CDVDPlayerAudio::OnExit()
02:27:28 T:3900 M:1240596480 NOTICE: Deleting audio codec
02:27:28 T:3900 M:1240596480 NOTICE: DVDPlayer: closing video stream
02:27:28 T:3900 M:1240596480 NOTICE: Closing video stream
02:27:28 T:3900 M:1240596480 NOTICE: waiting for video thread to exit
02:27:28 T:2164 M:1240596480 NOTICE: thread end: video_thread
02:27:28 T:3900 M:1242480640 NOTICE: deleting video codec
02:27:28 T:3900 M:1243934720 NOTICE: CDVDPlayer::OnExit() deleting demuxer
02:27:28 T:3900 M:1252720640 NOTICE: CDVDPlayer::OnExit() deleting input stream
02:27:28 T:4032 M:1252757504 NOTICE: DVDPlayer: finished waiting
02:27:28 T:4032 M:1252761600 NOTICE: CDVDPlayerVideo::~CDVDPlayerVideo - uninitting video device
02:27:28 T:4032 M:1252765696 NOTICE: stop sap announcement listener
02:27:28 T:4032 M:1252765696 NOTICE: clean cached files!
02:27:28 T:4032 M:1252757504 NOTICE: unload skin
02:27:28 T:4032 M:1260118016 NOTICE: stop python
02:27:28 T:4032 M:1260118016 NOTICE: stopped



can you help me please?
thaks in advance...

Navy1978


success to use chinese filename - taxigps - 2009-01-29

Jester Wrote:that might work, i'll try it out in my next build as we are still working on improving the externalplayer bits....

I find the reason why trans the wrong string to external player. Because chinese windows use Unicode,and XBMC use UTF-8.

I modify the code like is:

Quote:void CExternalPlayer::ExecuteAppW32(const char* strPath, const char* strSwitches)
{
CLog::Log(LOGNOTICE, "%s: %s %s", __FUNCTION__, strPath, strSwitches);

STARTUPINFOW si;
PROCESS_INFORMATION pi;
memset(&si, 0, sizeof(si));
memset(&pi, 0, sizeof(pi));
si.cb = sizeof(si);
si.dwFlags = STARTF_USESHOWWINDOW;

int wcsLen = ::MultiByteToWideChar(CP_UTF8, NULL, strPath, strlen(strPath), NULL, 0);
wchar_t* WstrPath = new wchar_t[wcsLen + 1];
::MultiByteToWideChar(CP_UTF8, NULL, strPath, strlen(strPath), WstrPath, wcsLen);
WstrPath[wcsLen] = '\0';

wcsLen = ::MultiByteToWideChar(CP_UTF8, NULL, strSwitches, strlen(strSwitches), NULL, 0);
wchar_t* WstrSwitches = new wchar_t[wcsLen + 1];
::MultiByteToWideChar(CP_UTF8, NULL, strSwitches, strlen(strSwitches), WstrSwitches, wcsLen);
WstrSwitches[wcsLen] = '\0';

if (g_advancedSettings.m_externalPlayerHideconsole)
{
si.wShowWindow=SW_HIDE;
}
else
{
si.wShowWindow=SW_SHOW;
}
int ret = CreateProcessW(WstrPath, (LPWSTR) WstrSwitches, NULL, NULL, FALSE, NULL,
NULL, NULL, &si, &pi);

delete []WstrPath;
delete []WstrSwitches;

......

This work fine!!!!!


This forum uses Lukasz Tkacz MyBB addons.