Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. Thank you for your support. Tom Speirs

Patreon

[PLUGIN] PinballX Media Player


scutters

Recommended Posts

Some might prefer the excellent table audio files from gStAv https://www.gameex.info/forums/topic/13893-table-sound-when-browsing-tables  in both PinballX Wheel & Attract modes, but if you want to additionaly / optionally play a selection of music files and/or videos in the PinballX front end then read on as this plugin might be for you..

What Does It Do

Using Windows Media Player (WMP) the plugin will let you play media files from a specified folder whilst in PinballX. It will pause playback when tables are selected and then resume on table exit, or just on entry and exit of Attract Mode. Although originally intended as a music only player, it uses WMP and as that can also can also play videos i added an optional visible WMP window. The default mode is audio only, but if displaying a WMP window then that is hidden when playback is paused. 

So is it a Jukebox?

  • V1 No - but if want to play random media (music or video) when you wander away from the cabinet for a few minutes (i.e. PinballX Attract Mode starts) then you can, or you can have them playing all the time whilst in wheel mode.
  • V2  In PinballX Attract Mode? - Pretty much yes (depending on your definition), same as V1 outside PinballX Attract Mode.

To Use The Plugin

1/ download the attached zip and extract the files into your PinballX\Plugins\ folder (use PBXMediaPlayerV2_1_1.zip for pinballx v3.47 and later)
2/ Unblock the files if required (https://www.limilabs.com/blog/unblock-dll-file) 
3/ Open PinballX\PluginManager.exe, enable the Media Player plugin.
4/ Still in PluginManager, Select the Media Player plugin and click Configure. You'll get a message first time while an ini file is created for the plugin (in the Plugins folder).
5/ Optional - If you intend to use a visible player then you may also want to install the BackGlass Skin.zip (see https://www.gameex.info/forums/topic/22325-plugin-pinballx-media-player/?do=findComment&comment=187793)

After this the plugin is enabled and will be configured with default values as screenshot below.

 

If you want to view / change the configuration information, go through PluginManager Configure again. The screen below should show. Hopefully the options are fairly self-explanatory, but a brief description follows..

Config.png.933b6eadab939b4a9f6a37afaca8330d.png

Media
Location - Click the ... button to browse and select a media folder
Include Sub Folders - Checkbox, check if your media is nested in sub folders under the main location
Volume - Slider bar.
Exit Table / Enter Attract Mode Behaviour - Resume last file from where it was left on table selection, or start next
Shuffle - Checkbox, select to play media in random order
Attract Mode Only Playback = Checkbox, check to disable playback in manual wheel navigation
Launch Visible Media Player
Player opens in own window - Checkbox, if not checked the plugin will play audio only regardless of content. Check this box if you want a visible window displayed in 'Now Playing' view.
Fullscreen - Checkbox, select if you want windows media player to open in fullscreen mode 

Tips

PinballX Audio

For Attract Mode only media playback try muting PinballX in Attract Mode (PinballX Settings -> Attract Mode -> Mute Audio = Yes).

If you're not running the plugin in Attract Mode only (so always on when in the PinballX Wheel) you may want to back up and then remove normal PinballX audio files, like Startup Sounds & Table Audio to avoid multiple sounds playing over each other.

Audio Volume

If playing with no visible WMP window then this will control all PinballX volume as the plugin is using an internal player, however if using a visible window it will control the volume of the media you're playing only (PinballX audio level will not be affected)

Visible Player

Best suited for cab owners with > 1 screen

Open Windows Media Player on its own first, switch to the Now Playing view (bottom right of screen) then move / position & resize the player on to the screen you'll want it visible on. Right click on it and select Always Show Now Playing On Top. Right Click again and select the view you want for music files (if not playing video) visualisations etc. Close the player and it should default to those settings when opened by the plugin, although the window may resize automatically for video playback if fullscreen is not selected. 

Visible player is not compatible with PinballX Fullscreen exclusive, in PinballX display settings set Full Screen Windowed = Yes

 

Additional Notes For Version 2 (Requires PinballX V3.47 or later)

Adds Attract Mode media navigation for skipping tracks, playback modes and playlists. New functions are available ONLY if PinballX is in Attract Mode.

Navigation Button / Keys used (as mapped in pinballx settings)

left - skip back
right - skip forward
page/nudge left - change playback mode
page/nudge right - skip to next in mode, or if in Play All mode toggle shuffle on/off (overriding default shuffle mode in plugin config)
instructions - if using visible player (via plugin config) switch in and out of full screen for videos etc.
pause in game - pause playback (if you have a pause in game button mapped in pinballx). Press again or skip to next track to resume
Any other button / key - exit attract mode (disabling media player navigation until pinballx reenters into attract mode)

Navigation button presses are accompanied by either a beep (skip) or a voice detailing current mode or selection.

Player Modes Loop

All (start) →  Artist  →  Album 
    ↑                                       ↓
Playlist   ← Decade ← Genre 

During attract mode if the page/nudge left button/key (usually left magna save) is pressed the player mode will be changed as shown in the loop above based on mp3 / wma ID3 tag values, if the current track doesn't have a specific tag for the file then that mode will be unavailbale and the player will skip to the next valid mode. Likewise, if no playlists are found then that mode will skipped.

During playback modes other than All the page/nudge right button/key (usually right magna save) can be used to skip to the next value found for that mode, i.e. next artist, next album, next playlist etc.

Playlists

Playlists for the media player are simple text files, to use them create a MediaPlayerPlayLists folder under \Pinballx\Plugins\ and then create playlist.txt files (the playlist file names can be whatever you want, they just have to be txt files). Add playlist entries to the txt file(s) as file paths, e.g.

C:\Pinball Vids\Metallica Pinball from Stern.mp4
C:\Pinball Vids\Kiss Pinball 2015.mp4
etc..

Note that for playlists the location of the files does not have to be under the plugins main media folder they can be anywhere with a valid path. On my system i have the plugin config pointing at C:\Music\ and subfolders, but then use C:\Pinball Vids\ for a video playlist.

To create large playlists i'd recommend using FileListCreator to save time, it's free and allows you to easily drag and drop files or folders to build a list which can be copied to clipboard or saved as a playlist. Note, if you do use this tool that you'll need to change the default format, basically uncheck all boxes under the Columns drop downs on the right hand side so the output preview is just file path & name. See also https://www.gameex.info/forums/topic/22325-plugin-pinballx-media-player/?do=findComment&comment=188275 for settings you can just load.

Other Stuff

No changes to ini file or plugin config in V2 so just copy over V1 if you have that or install as in original notes above.

If you have thousands of media files the plugin may slow down pinballx startup when first run as it reads mp3 tag data. To improve this a cache file of media data is created under the plugins folder by the plugin, that file is used on following starts to remove the delay and will be recreated if you add more media files.

 

Notes

The plugin was built and tested on Win10, but i have now tested on Win11 and it (and the WMP skin) still works (but you may need to enable Windows Media Player Legacy in windows features)

I think i got all the main media formats covered that windows media player can play back, but i may have missed some. If the player doesn't find some of your files (and they work in windows media player) then please let me know.

 

Any issues

Please have a look at \Pinballx\Plugins\PBXMediaPlayer_log.txt, if it's something obvious the detail should be in there. If an error has occurred playing a specific file then confirm it can be opened in Windows Media Player (if you can't play a file in WMP then the plugin can't either). 
Otherwise, please reply attaching your PBXMediaPlayer_log.txt, PBXMediaPlayer.ini, Pinballx.ini & log.txt files as well as the issue description.

 

Thanks

To @wrd1972@simbamame for help testing the plugin on their systems. Also thanks to @Tom Speirsand @Adultery for pinballx and the plugin template used, and Perry Butler for the excellent mp3 tag reader library i used in Version 2

 

16/06/2019 Update - Attached Backglass Skin.zip

This is a skin for windows media player that is more in keeping with a pinball theme than the default media player. Use of this with the plugin is entirely optional and is intended mainly for users playing audio only files who want  track information to be displayed on a backglass screen over the backglass video. More information  https://www.gameex.info/forums/topic/22325-plugin-pinballx-media-player/?do=findComment&comment=187793. To install you'll need to unzip the 'Backglass Skin.zip' file and then install the Digir___0.ttf font file (used by the skin) - double click that and then click install. Next step is to install the Windows Media Player (WMP) skin by double clicking the PBX Backglass.wmz file, that should bring up a View Now option which will open WMP and allow you to position the track info on screen by dragging it to position. Close WMP and then select to use a visible player in the plugin via plugin manager. 

 

29/06/2019 Update - Plugin Version 2 attached.

Requires PinballX V3.47 or later.  Notes updated. Version 1 left as attachment for anyone who doesn't want the new features or for whatever reason doesn't want to update PinballX. See https://www.gameex.info/forums/topic/22325-plugin-pinballx-media-player/?do=findComment&comment=188154 for quick demo.

12/09/2019 Update - Plugin Version 2.1 attached

Allows disabling of media navigation keys/buttons via config/ini. Enabled by default.

12/09/2019 Update - Plugin Version 2.1.1 attached

Added Pause playback. Changed to .net 4.0.

 

V1 (PinballX versions up to V3.47)

PBXMediaPlayer.zip

 

V2 (PinballX versions from V3.47)

Backglass Skin.zip

PBXMediaPlayerV2_1_1.zip

  • Like 3
Link to comment
Share on other sites

This looks like an awesome addition! Is it possible to add an option to select the monitor you want it to play videos or visualizations. Some may be fine if it defaults to the playfield, while most may want it to display to the backglass.

Link to comment
Share on other sites

2 hours ago, Draco1962 said:

This looks like an awesome addition! Is it possible to add an option to select the monitor you want it to play videos or visualizations. Some may be fine if it defaults to the playfield, while most may want it to display to the backglass.

Thanks Draco.. I passed the buck with the player position to Windows!, I've hopefully clarified the Tips section in first post a bit, basically you need to open windows media player on its own outside pinballx, switch to now playing view and then drag it to the screen you want it on before closing it. When the plugin opens it it'll open on that screen.

Link to comment
Share on other sites

  • 2 weeks later...

I've created a simple WMP skin for use with this plugin to display track information - scrolling artist, track & album information in a more backglass friendly way than the WMP default skin. It is text only with no video or visualisation area so that is all it will display regardless of whether playing a video or music file, although video/visualisation can be made visible by selecting Full Screen in the plugin (which in turn will hide the track information bar of the skin).

Example;

inuse.png.6581ebe1c23a523b443c6a64a9b23609.png

I'll add the download zip to the first post.

To install you'll need to unzip the 'WMP Backglass Skin.zip' file and then install the Digirtu_.ttf font file (used by the skin) - double click that and then click install. Next step is to install the WMP skin by double clicking the Backglass LED.wmz file, that should bring up a View Now option which will open WMP and allow you to position the track info bar on screen by dragging it to position. Close WMP and then select to use a visible player in the plugin via plugin manager. 

Depending on how you have the plugin configured the track information should be visible on top of the backglass video either when you next start pinballx, or when it enters attract mode.

I'm open to suggestions on tweaks to the skin if you have any.. splitting track, band, album details out to separate boxes, different font etc. 

EDIT 16/06/2019

This version of the WMP skin is now superseded by new version https://www.gameex.info/forums/topic/22325-plugin-pinballx-media-player/?do=findComment&comment=187384, i'll remove from the 1st post and attach it here instead so still it's available if for some reason you prefer it to the new one!

WMP Backglass Skin.zip

  • Like 2
Link to comment
Share on other sites

New and improved WMP skin, attached to first post. This version has a video window so will display that if media has video content.

audio.thumb.png.b410efac691d6cc877946812aab2026b.pngvideo.thumb.png.511f44f57b2a49293307d01dce7037e8.png

To install you'll need to unzip the 'Backglass Skin.zip' file and then install the Digir___0.ttf font file (used by the skin) - double click that and then click install. Next step is to install the Windows Media Player (WMP) skin by double clicking the PBX Backglass.wmz file, that should bring up a View Now option which will open WMP and allow you to position the track info on screen by dragging it to position. Close WMP and then select to use a visible player in the plugin via plugin manager. 

Link to comment
Share on other sites

Plugin Version 2 now released. Notes updated and zip attached in first post.

Quick vid of the plugin and backglass skin in use below. It's just a screen recording of my backglass so no commentary (as i must be one of the few people still not using a smart phone) but includes the navigation sounds/speech, from just before Attract Mode starting, showing a few media navigation button presses, skipping tracks, changing playback mode etc and showing video playback in and out of full screen, ending exiting attract mode, should give an idea of how it can look working with a visible media player selected in config.

Note, media navigation keys/buttons will work without a visible player as well (except the fullscreen toggle option - because you need it visible for that, obviously!)

 

  • Like 1
Link to comment
Share on other sites

@Mike_da_Spike

Cheers Mike, i'm pretty happy with it... i have the cab in the 'man-cave office' so i can boot it up and have music playing in the background and then quickly jump in for a quick game when i get a chance.

Don't know why, but the best of the carpenters just never seems to come up for me on random play! :lol:

 

  • Haha 1
Link to comment
Share on other sites

1 minute ago, scutters said:

Holiday, September?

If you've already got mp3's i bet you could set this up in less than 15mins!

Time friend, time. If I had 15 min... someone ask me to make a cleanup program too...

My grandkids also need attention.

My cab is on the attic and its too warm there to do anything.

Plan is also to completely reconfigure the arcade cabinet. Time..  if we had more of it :cheers:

Link to comment
Share on other sites

For anyone building large playlists via the drag drop functionality in File List Creator here's a profile that can be loaded to get the correct format output.

Go to Settings in FileListCreator and select Load or Save or Load Settings and select Load Profile and load the file attached. Also check the Save automatically on closing checkbox while on that screen and you should be sorted for settings each time you open it in future.

PlayListSettings.fls

  • Thanks 1
Link to comment
Share on other sites

Small update to the Windows Media Player Backglass Skin to fix scands/umlauts (whatever you want to call them) now updated in first post attachment.

The font used doesn't handle those characters well so the skin now swaps out offending characters.

Was;

image.png.476035893f369f912f7b654df87666e7.png

Now;

image.png.e005e4d43aa226fc10ae703efac97e69.png

If you already have the previous version of the skin installed you'll need to extract the wmz file from the zip but before double clicking it open WMP, right click on it and 'switch to library' view to allow the skin to install. To install from scratch follow instructions in first post.

Link to comment
Share on other sites

  • 4 weeks later...

Guys, if you don't want to walk over to the pincab to navigate through the media you're playing then you can add a flirc usb (https://flirc.tv/more/flirc-usb)

Added one to my cab and it works like a charm, you can use an old remote control you have laying around and map the remote buttons to pinballx keys

For £20 it's a pretty easy way to add remote control functionality to the media player plugin / pinballx / pc.

just make sure the remote you use doesn't also affect any other devices you're using (playfield / backglass tv's etc)

Link to comment
Share on other sites

  • 2 weeks later...

Updated to V2.1.1 - attached to first post

Added pause playback function, maps to whatever you have set in PinballX pause in game key/button. Playback resumes if pressed again or if music navigation button pressed (e.g. skip)

And here's a quick video showing navigation using a remote control (using the Flirc V2). Apologies for poor quality etc

 

Link to comment
Share on other sites

  • 4 months later...
13 minutes ago, Wiesshund said:

I set up your plug in, this is cool.
i took some old 80's music videos and made them look like a DMD.
This will be cool, when i get a cabinet together

Awesome, looks great!

:cheers:

Link to comment
Share on other sites

  • 2 months later...

Just a quick note on performance. This plugin uses windows media player, i noticed occasionally WMP cpu use could spike up to around 10%. If this is an issue on your setup, or you just don't like it, the fix for me was to get rid of the WMPs internal track library and its updating;

  • With WMP closed locate %LOCALAPPDATA%\Microsoft\Media Player\CurrentDatabase_400.wmdb   (may have a different number at the end)
  • With windows media closed, rename that file to CurrentDatabase_400.oldwmdb (or whatever you like) as a backup
  • With notepad create a new empty file to replace it, and then just rename it as CurrentDatabase_400.wmdb (or whatever number you had)
  • Open WMP, go to options, player settings, uncheck Add local media files to library when played.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...