Jump to content
SpesoftPinballXConvert-It
Carny_Priest

Capture Videos to PinballX Media - Table, Backglass, and DMD

Recommended Posts

Let's also see how the screens have been set up. Script assumes the standard set up with DMD to the right of the BG and the BG to the right of the playfield. The top edge are all aligned on the same axis.

By the way what tables are you missing videos for?

Share this post


Link to post
Share on other sites

Missed these. Here is the script and my Windows screen setup. Note, the PF monitor shows a resolution of 2560x1440, but I have changed this to 1920x1080 to see if that would help.

My final cabinet setup will have a PF screen running 1920x1080.

Thanks.

obs script.txt

post-29094-0-31453900-1437015407_thumb.p

post-29094-0-44753100-1437015405_thumb.p

post-29094-0-97727500-1437015405_thumb.p

Share this post


Link to post
Share on other sites

Still looking through this. So far, nothing has popped out looking at the script.

Is there enough space on the drive where you have the script executable? I'm capturing and writing to interim files with basically no processing or compression so that I don't drop any frames. After the script stops capturing then I process and compress the final set of files. In other words, those interim files can get pretty big. There needs to be some free space on the drive or the script will behave as you described.

By the way, which tables do you have that are missing videos?

Share this post


Link to post
Share on other sites

In the PinballX.ini (or Settings Wizard), the FP+BAM executable should be FPLoader.exe. Did you copy Future Pinball.exe into the BAM folder? You should not do that, I think. When you run FP this way outside of PinballX and press 'Q' while in-game do you see the BAM menu? You should see it and be able to adjust the table and backglass scale and position, the render engine, the lighting, and so forth.

It looks like you are running an older version of the script that has a bug. Take a look at this post -

http://www.gameex.info/forums/topic/15207-capture-videos-to-pinballx-media-table-backglass-and-dmd/page-3#entry139563

You need to insert %FFMPEG_Path%\ before each Run instruction that calls ffmpeg.

ffmpeg is called in the Fastest Capture section and in the Post Capture Trim and Transcode section

Right now, the script is not finding where you have ffmpeg installed.

Or you can follow this guide and add ffmpeg in your PATH environment and the OS will find ffmpeg from any place you call for it.

http://www.wikihow.com/Install-FFmpeg-on-Windows

Share this post


Link to post
Share on other sites

I have over 100GB of free space on the drive where the script is launching from, so that should be okay.

As for tables I'm missing, it turns out I have a copy of most of the tables files I need at the moment, I just can't get some of the BG to show up in PBX. I have a different post open for this as well and here is what is happening:

I'm only having trouble with some FP table BG showing up in PinballX. I leave the game name as it is, for example, PinbotRC21, but the description is Pinbot. This table and many others named just like it, show the PF and BG just fine in PinballX.

Then there are others, about a dozen to this point that have a similar naming structure for Game name and Description name, but don't show the BG in PinballX. I believe I have all PF now showing for my current FP tables, so it's just these pesky dozen or so BG images not showing up in PinballX.

I have renamed the BG images, tables, both, but I still can't seem to get the BG images to show up for some tables.

The tables I currently can't get the Future Pinball BG images/videos to show in PinballX are:

Spy hunter
Metallica

AC/DC
Rolling Stones
Iron Man
Magic Castle
Masters of the Universe
Cyclone
Bubble Bobble
Spider-Man (stern)
Dark Knight
Goonies
King Kong
Junkyard Cats
Star Trek Ultimate (stern)

I'm also missing table audio and PinballX audio for:

Big Game
Bond 50
Junkyard Cats

Share this post


Link to post
Share on other sites

I changed FPLoader.exe to Future Pinball.exe a while back it works well now. This executable lives in D:\Future Pinball/BAM. When a table is playing in BAM I can press either Q or ` to see the BAM menu for table/backglass scale, lighting, etc.

I updated to the newer script as you suggested, with the %FFMPEG_Path%\ where it's needed. I also tried adding ffmpeg PATH environment to the OS, but go stuck getting the command line to accept what I was doing (following the instructions). I'm going to leave that one alone, at least for now.

When I run the script from command prompt now, the table loads and now takes about 2 minutes before it closes. I thought something was happening, but I still don't see any newly created PBX image files in the pinballX/media/future pinball folder.

I'm starting to think it has something to do with my current setup, where my PF is running at 2560x1440 resolution. I did change this screen to 1920x1080 at one point to test. Is it possible the images trying to be captured by the script can only create a file as large at 1920x1080 and/or the tables themselves can only output to 1920x1080 and therefore if I run the PF at a higher resolution, the script can't create the images it's trying to?

If I could only figure out how to get all of the FP PBX image files I downloaded from the FTP, to show up in PBX, I'd be happy.

Share this post


Link to post
Share on other sites

Thought for sure putting in the path would fix it as it is what worked for others using the script. There are places where you would need to insert the path variable in the middle of the script and again at the end.

The script will handle ultra high def. That's not a problem. I capture VP at 4k on my setup.

Ffmpeg will crash if you have setup the game to overscan for whatever reason. The position and size of the capture area must be entirely within the desktop. If any part of the capture area is outside of the desktop even by a pixel, ffmpeg will crash. Not that I saw any indication from your settings that this is what is happening, but I didn't sit down with a calculator and check everything either.

For the media not getting recognized, turn off PBX file name matching in the Settings Wizard. Then make sure the BG file name is the same as either the game name or the description field in Future Pinball.xml. The names must be absolutely identical. I'd even make sure the case is the same. Copy and paste file names if needed.

Share this post


Link to post
Share on other sites

For the media not getting recognized, turn off PBX file name matching in the Settings Wizard. Then make sure the BG file name is the same as either the game name or the description field in Future Pinball.xml. The names must be absolutely identical. I'd even make sure the case is the same. Copy and paste file names if needed.

Thanks Carny. I added the trouble tables manually inside the Game Manager, then had to rename each media file again and test one at a time. Some of them worked after a mix of renaming exactly as the Game Description or sometimes renaming the files to match the Game Name.

It took a while, but I now have all current tables loading their media files in PinballX. I still can't grab screenshots on my own, but I might come back to that at a later time.

Share this post


Link to post
Share on other sites

You will have to define near the top of the script under which system header you have VP10 defined from pinballx.ini

Ex.

system3 = System_4 ;PhysMod5

I have settings for PhysMod5 set up under the System_4 header

Otherwise, the script is agnostic about the VP version. It will still work fine with VP10.

  • Like 1

Share this post


Link to post
Share on other sites

Ah yes, thanks.

Only, I use only one xml for all VP versions by using the <AlternateExe> tag. I think I'll make a few small adjustments into a new script for this purpose. I could probably detect the vpx extension in the same way the fpt extension is detected in the script.

One other thing I noticed is that with tables using the old B2S system, the backglasses aren't closed correctly. That's a problem with batch processing, because the backglass will stay up over the backglass of the next table.

Normally, these backglasses are closed by getting focus on it and pressing ESC.

Share this post


Link to post
Share on other sites

I do have a more recent script that I use but I haven't published because it is heavily customized for my setup. I also use a single xml but I don't use the alternateexe tag. I can post it if you want it.

I don't worry too much about the old B2S staying up because I never really need to batch process tables for myself. And I have very few of those tables. I just close manually.

If you do need to auto close B2S tables then you could just nab the close Rosve sub routine from FPLaunch

Share this post


Link to post
Share on other sites

I typically run VP and FP with NVidia's DSR downsampling technology. Looks great in-game. When I capture video it is at resolutions as high as 4K which is a little hefty on file size and is a performance drag. The end result can be as high as 75Mb for a playfield video like Aliens Legacy. I'm finding that after a while the playfield screen will freeze on previews while the backglass and DMD videos, and wheel images continue to rotate through. If you are supersampling, you may want to downsample the preview videos by adding a filter to scale back down to 1920x1080 HD resolution:

Run, %FFMPEG_Path%\ffmpeg -y -i "%A_ScriptDir%\playfield.mp4" -ss 5 -to 65 -vf [in]rotate=PI:bilinear=0[middle];[middle]scale=1920:-1[out] -map 0:1 -c:v libx264 -crf 26 "%PinballX_Path%\Media\%Name%\Table Videos\%description%.f4v"

Or you could scale videos down to 1280x720 if you really want to manage file sizes.

With the filter added that 75Mb video is < 10Mb. I'm hoping that will resolve my issues with the playfield preview videos freezing up.

[edit] yep, downscaling appears to be solving my issue with previews freezing up

  • Like 1

Share this post


Link to post
Share on other sites

Carny,

Would you possibly be willing to upload your three screen video files to the FTP or somewhere else for those of us having trouble capturing our own video files?

I know I would love to use some of your video files in my cab!

Thanks!

Share this post


Link to post
Share on other sites

As stated in the first post in this thread:

The benefit is that the user no longer needs to rely on others to upload media, and that the resulting output best reflects the user's specific table configuration (e.g., layback settings, offset, graphic mods, DMD colorization, 2 screen or 3 screen B2S).

With night mod, day mod, color mod, authentic and fantasy versions of the dB2S, colorized or standard color DMDs, plus any changes I happen to make, I don't know that I have what you are looking for. I only keep one version as the best representation of that table.

Plus as soon as another version gets published whatever videos are out there are suddenly out of date. I don't have authority to delete items in the FTP so whatever I upload is there forever taking up space as far as I know.

I'd rather just help you figure out how to run the script. What are you missing, VP or FP?

  • Like 1

Share this post


Link to post
Share on other sites

Ok I finally got around to trying this out yesterday. I should have through the entire thread first:). A lot of enhancements along the way ...

Works great. Thanks!

I am attempting to write a script for vp that should walk through my PinballX xml files and record missing media. I figured out a way to take media image screenshots also. Will post some progress in the next day or two

Thanks for this! Now I can focus just on downloading wheel images

Share this post


Link to post
Share on other sites

thanks Joe, would love an updatet version of the script with that auto generate missing function.

Share this post


Link to post
Share on other sites

Users in this thread have used variations of Python or bat files to automate. Should work well with VP. Not sure about automating the FP part. Only plan I might have at this point for enhancing is adding capture for PFX2.

Sent from my iPad using Tapatalk

Share this post


Link to post
Share on other sites

To resolve performance issues, I no longer run NVidia DSR supersampling on the backglass display. Changing the backglass display to a resolution different from my playfield display revealed a bug in the capture script when capturing B2S images on the DMD display:

This line:

DMD_X:=BG_width+XDMD_X ;Reference to Top Left of Playfield screen

should be

DMD_X:=PF_width+XDMD_X ;Reference to Top Left of Playfield screen

Share this post


Link to post
Share on other sites

thanks for posting your fixes along the way.

I am making good progress on my script that walks through all the vp xml files found in pinballx.ini.

Question - is there any special reason for disabling Aero during the recording? Just want to know why it is done. Thanks

Share this post


Link to post
Share on other sites

In my laptop-based test bed, I found that I had to have aero disabled when capturing from opengl from FP. This was with some earlier tests when I was testing other screen capture solutions. I actually don't know if it is absolutely necessary for OBS. I wound up just including those lines in case a user was running with aero. For me, I always have aero disabled on my cab (Win 7).

Share this post


Link to post
Share on other sites

In general, if you don't need the various features of Aero (snap, shake, etc.), you are better off saving GPU/CPU resources.

Share this post


Link to post
Share on other sites

Alright, time to release a beta of the PBX Recorder based on Carney_Priest great work here.

With a double click, it will walk through all the VP xml files found in Pinballx, run each table and create videos and/or images based on the PinballX xml description name. You have the option to only create missing media only or re-record/overwrite all media and an option to record videos only or also create the media images. It will prompt you at the beginning each time you run it, and you can hit ESC at anytime to stop the script

You need to have ffmpeg installed. Autohotkey needs to be installed if you plan to modify the script.

The first time you run PBX_Recorder, it will prompt you for the location of PinballX, FFMPeg and a Media folder - normally PinballX\Media folder but for testing purpose pick a new folder for testing, like C:\PinballXMediaTest, before you use it on your Pinballx install. This script will on create/overwrite files in the Media folder you tell it to write to. You should do a PinballX backup just in case :)

Here is demo video. It records 60 sec videos, but for the video i reduced it to 15 sec, so you dont get bored watching it...

You can run the attached exe or run the ahk script if you have autohotkey installed.

NOTE: This has the ability to overwrite all media in the Pinballx\Media folder so you have been warned. Use this with a test media folder first and if you are happy with the results, then you can point it to your Pinballx Media folder

I may add file drag and drop support, but the intent is that you run this periodically and it finds and create all the missing media. So that really becomes unnecessary

PBXrecorder_Beta01.zip

  • Like 4

Share this post


Link to post
Share on other sites

Great stuff. I think a lot of people are looking for a solution that does not require a command line.

I assume that a recent build of ffmpeg was used to test. The latest version I'm using is 9/11. I'll test the latest build in the next day or so. I obtain my builds here:

http://ffmpeg.zeranoe.com/builds/

I use the static build, requires 7-zip to extract. Just extract to C:\ffmpeg and use the same path with the tool.

A couple of situations that might come up for users:

1. VPM DMD uses different dimensions on the 3rd display than that defined by screenres.txt. Examples, might include configuring the DMD differently for super size SEGA displays like Frankenstein, Baywatch, or Maverick. Or configuring the DMD to display overlaying a B2S. An example, would be positioning the DMD to work with The Addams Family dB2S, the one with the THING lights positioned underneath the DMD on a third display.

2. Less common, user employs some form of overscanning to maximize the size of the DMD/B2S. If ffmpeg is asked to capture any part of an image outside of the defined edges of the desktop, it will crash. There are a number of roms that have secondary playfield displays such as The Simpson's Pinball Party, Ripley's Believe It or Not!, and World Poker Tour. I can't turn off ddraw for these, and I do employ overscanning to achieve an edge to edge display on my third screen.

Right now, I just have custom code in my version of the script to handle the special cases. And I do run a custom xml to help manage some of this. It may be beyond the scope of the project to do anything beyond batch processing, but it might be good to allow for some level of customization. I'm not sure whether that would be in the form of a lookup table a user edits or adding some more interaction in the current user interface.

Well, even without customization I can see this working for the vast majority of tables, so that will be a huge time saver in any case.

  • Like 2

Share this post


Link to post
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...