Jump to content



Photo
* * * * * 4 votes

PBX Recorder - automatically capture PinballX playfield, backglass, dmd videos and images

pbxrecorder ffmpeg media pack record ffmpeg media video screenshot

  • Please log in to reply
386 replies to this topic

#161 wrd1972

wrd1972

    Authoring Padawan

  • Platinum Supporter
  • 2,265 posts
  • Location:Central KY. USA

  • Flag: United States of America

  • Favorite Pinball: Funhouse

Posted 08 April 2016 - 03:36 PM

Thanks for the assistance Joe and more-so for this awesome program. It has always been a terrific PITA for me to manage PBX media. This can do it automatically while I sleep.

 

Two more questions:

 

Lets say I want to simply revise PF vids for only two tables. Would the best way to do this be to delete the two PF vids from the PBX media folder and let your program simply find the two missing vids?

Also, whats the difference between MP4 and F4V?


My VP Pincab /MAME Arcade  Specs: Dell T3400 workstation with Core2 Quad core 3.0GHZ (Q9650) CPU - 8GB of RAM - Nvidia  GTX 970

40" PF Sony gaming LED TV, Dual 21" Dell monitors in the backbox - Pinscape dual boards - Full DOF - Full MAME arcade support.


#162 MisterB

MisterB

    Hobbyist

  • Platinum Supporter
  • 32 posts

  • Flag: ---------

  • Favorite Pinball: STTNG

Posted 09 April 2016 - 01:50 PM

gtxjoe - One additional suggestion for improving error handling during long-running capture sessions.  I was occasionally receiving those annoying "<AppName> has stopped working" messages from Windows, which the script could not handle.  The message would remain displayed for subsequent table launches and would be captured in the recordings / screen grabs.

 

I overcame this issue by disabling the error messages via the registry, following directions from here: https://www.raymond....ws-server-2008/.  Note that you need to disable both of the keys mentioned to fully disable the error handling functionality.

 

You may want to consider a user selectable option in your script to modify the registry to turn these Windows 'features' off - at least while the script is running.  It could restore the defaults (or previous values) once the script is completed.

 

Again, thank you for this great tool.  Looking forward to trying out the beta today!



#163 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,153 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 09 April 2016 - 03:06 PM

wrd1972, There are 4 recording modes. Yes, Deleting a media file will allow it to be re-recorded, except when using the 2nd recording mode option (which will not re-record unless all media related to that table is deleted)

 

MisterB, thanks for the tip. Yes, this will probably take care of the occasional Stern rom crash.  I may just disable this setting at start and re-enabled upon exit or abort

 

Someone had asked about recording audio also.  Most tables when started do not make any sounds, or if it did it was a 2 second audio clip and that was it, so it was not really worth recording audio also.  Now that the 1.4 beta allows you to pause the start of the recording, I guess you could actually pause the recorder, coin up, start the game and play the table during the recording.  I can look into at adding this an option



#164 Carny_Priest

Carny_Priest

    Pinball Fan

  • Members
  • PipPipPipPip
  • 1,258 posts
  • Location:Austin, TX

  • Flag: United States of America

  • Favorite Pinball: EATPM

Posted 09 April 2016 - 04:05 PM

Audio - it would not be difficult to add

 

http://www.gameex.in...&comment=138203

 

The user may have to manually enable their driver's output recording. Maybe there is a way to do that programmatically but hardware differs by system. In this early script, the user would have to exactly identify the audio device by name. The capture routine simply passes along the audio stream as-is without re-encoding. In the transcode step, you can encode it anyway that is generally suitable.

 

I've never went so far as to worry about how best to encode the audio stream with quality. I never use audio on preview. I usually have my cabinet on and PinballX is like my screensaver when I'm not playing.



#165 wrd1972

wrd1972

    Authoring Padawan

  • Platinum Supporter
  • 2,265 posts
  • Location:Central KY. USA

  • Flag: United States of America

  • Favorite Pinball: Funhouse

Posted 12 April 2016 - 05:04 AM

Well crap. I finally got the PF vids to record but now I can get the backglass to record. Similar problem as before...the crawl makes i to the end then promptly goes to the next table in the list. None of the minutia as before when the PF vids were recording. Running a fresh download of 1.3.

 

Here is the log:

April 12,2016 01:05:23
Version 1.3beta

Monitor Count: 3,  Primary Monitor: 1
Monitor 1: 1920x1080 (\\.\DISPLAY1)
Monitor 2: 3280x1355 (\\.\DISPLAY2)
Monitor 3: 3280x587 (\\.\DISPLAY3)

Pinballx.ini
4
C:\PINBALLX
2
0
1
0
0
0
0
0
60
0

Identify all VP XML files...
VP System #1:
C:\PINBALLX\Databases\Visual Pinball\Visual Pinball.xml
C:\VISUAL PINBALL
C:\Visual Pinball\Tables
vpinball-9.9.1-plunger-mods.exe

VP System #2:
C:\PINBALLX\Databases\Tables_DMD_14segment VP10\Tables_DMD_14segment VP10.xml
C:\Visual Pinball
C:\VISUAL PINBALL\Tables_DMD_14segment
VPinballX.exe

VP System #3:
C:\PINBALLX\Databases\Tables_Alpha Numeric_VP10\Tables_Alpha Numeric_VP10.xml
C:\Visual Pinball
C:\VISUAL PINBALL\Tables_Alpha Numeric
VPinballX.exe

VP System #4:
C:\PINBALLX\Databases\Tables_DMD_14segment VP9PM\Tables_DMD_14segment VP9PM.xml
C:\Visual Pinball
C:\VISUAL PINBALL\Tables_DMD_14segment
vpinball-Physmod5-plunger-mods.exe

VP System #5:
C:\PINBALLX\Databases\Tables_Alpha Numeric_VP9PM\Tables_Alpha Numeric_VP9PM.xml
C:\Visual Pinball
C:\VISUAL PINBALL\Tables_Alpha Numeric
vpinball-Physmod5-plunger-mods.exe

VP System #6:
C:\PINBALLX\Databases\Tables_DMD_14segment VP9\Tables_DMD_14segment VP9.xml
C:\Visual Pinball
C:\VISUAL PINBALL\Tables_DMD_14segment
vpinball-9.9.1-plunger-mods.exe

VP System #7:
C:\PINBALLX\Databases\Tables_Alpha Numeric_VP9\Tables_Alpha Numeric_VP9.xml
C:\VISUAL PINBALL
C:\VISUAL PINBALL\Tables_Alpha Numeric
vpinball-9.9.1-plunger-mods.exe

Skipping this system: .xml

Skipping this system: .xml

Skipping this system: .xml

Skipping this system: .xml

Skipping this system: .xml

Skipping this system: .xml

Skipping this system: .xml

Total number of VP systems found: 7

Working on Visual Pinball.xml (01:06:20)

Screenres.txt

Values used for media capture (height/width forced to even values)
VirtualScreenWidth = 3280
TotalScreenWidth   =  
PF_width           = 0         
PF_height          = 0        
BG_width           = 0         
BG_height          = 0        
DMD_width          = 0     
DMD_height         = 0       
DMD_X_offset       =            
DMD_Y_offset       =             
-----------------------------------------
DMD_tot_offset     =             
DMD_orig_width     =         

Big Game (Stern 1980)
Table file not found: C:\Visual Pinball\Tables\16-9 Big Game.vpt or 16-9 Big Game.vpx
Table disabled in xml: C:\Visual Pinball\Tables\16-9 Big Game.vpx

Road Kings (Williams 1986)
Table file not found: C:\Visual Pinball\Tables\Road Kings VP9 FS.vpt or Road Kings VP9 FS.vpx
Table disabled in xml: C:\Visual Pinball\Tables\Road Kings VP9 FS.vpx

Working on Tables_DMD_14segment VP10.xml (01:06:22)

Screenres.txt
1920
1080
1360
1440
3
0
0
800
400
0
0
0

Values used for media capture (height/width forced to even values)
VirtualScreenWidth = 3280
TotalScreenWidth   = 2720 
PF_width           = 1920         
PF_height          = 1080        
BG_width           = 1360         
BG_height          = 1440        
DMD_width          = 800     
DMD_height         = 400       
DMD_X_offset       = 0           
DMD_Y_offset       = 0            
-----------------------------------------
DMD_tot_offset     = 1920            
DMD_orig_width     = 800        

Angry Birds (JP Salas)
MISSING: BackGlass Video
Launching table: VPinballX.exe -play C:\VISUAL PINBALL\Tables_DMD_14segment\Angry Birds (JP Salas).vpx
Video and screenshot capture (01:06:57)
Recording "C:\PBXRecorder_x64\bg.mkv"
Convert Videos to f4v if video was captured (01:07:05)
Table done (01:07:08)

Attack From Mars (Bally 1995)
MISSING: BackGlass Video
Launching table: VPinballX.exe -play C:\VISUAL PINBALL\Tables_DMD_14segment\Attack From Mars (Bally 1995).vpx
 


Edited by wrd1972, 12 April 2016 - 05:11 AM.

My VP Pincab /MAME Arcade  Specs: Dell T3400 workstation with Core2 Quad core 3.0GHZ (Q9650) CPU - 8GB of RAM - Nvidia  GTX 970

40" PF Sony gaming LED TV, Dual 21" Dell monitors in the backbox - Pinscape dual boards - Full DOF - Full MAME arcade support.


#166 TT11

TT11

    Pinball Fan

  • Members
  • PipPipPipPip
  • 643 posts
  • Location:Maitland AUSTRALIA

  • Flag: Australia

  • Favorite Pinball: Bally Kiss & Playboy, Stern Kiss & Playboy

  • 360 Gamer Tag: PoundedElliepup

Posted 12 April 2016 - 11:27 PM

Would PBXrecorder be useful for a Hyperpin installation?



#167 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,153 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 12 April 2016 - 11:46 PM

Regarding Hyperpin, I would need one or more people to beta test a Hyperpin version. I am familiar with Hyperpin but haven't used Hyperpin in a long time.  I think there are only a few script changes needed to get it up and running.

 

If anyone wants to get Hyperpin working,  I would need a example of someone's Hyperpin\Databases folder and HyperPin\Settings folder and then also let me know where media goes,  I think Hyperpin has a dedicated Table Images folder, Table Videos folder, but I think Backglass videos and images all go into a Backglass images folder.  I don't think DMD images or videos work.



#168 yagesz

yagesz

    Enthusiast

  • Platinum Supporter
  • 303 posts
  • Location:Wyoming

  • Flag: United States of America

  • Favorite Pinball: TAF, TSPP, Metallica, CV

Posted 13 April 2016 - 12:12 AM

If i remember. Hyperpin doesnt support backglass video

Sent from my SM-G935P using Tapatalk

#169 wrd1972

wrd1972

    Authoring Padawan

  • Platinum Supporter
  • 2,265 posts
  • Location:Central KY. USA

  • Flag: United States of America

  • Favorite Pinball: Funhouse

Posted 13 April 2016 - 01:28 AM

Joe,

Any idea why I can record table videos. But not Backglass videos?

Using 1.4


My VP Pincab /MAME Arcade  Specs: Dell T3400 workstation with Core2 Quad core 3.0GHZ (Q9650) CPU - 8GB of RAM - Nvidia  GTX 970

40" PF Sony gaming LED TV, Dual 21" Dell monitors in the backbox - Pinscape dual boards - Full DOF - Full MAME arcade support.


#170 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,153 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 13 April 2016 - 02:43 AM

Not documented but Hyperpin does support backglass videos :)

 

wrd1972,

- Try running PBXR as admin.  

- Based on your log, it should be recording 60 sec video, but ffmpeg is only running 8 secs at most, so it is not happy with some parameter.

- If running as admin does not work, try this attached debug version.  Let it try to process at least one table then when it loads a new table, hit ESC to stop PBXR.  There will now be a file called , backglassrecordtest.bat

   Double click on it and it will run ffmpeg and try to do 60 sec recording.  See what the errors are and report back.

- If that fails also, zip up that file and attach it and also a screenshot of your windows 3 monitor layout from Control Panel\All Control Panel Items\Display\Screen Resolution

Attached Files


Edited by gtxjoe, 13 April 2016 - 02:45 AM.


#171 wrd1972

wrd1972

    Authoring Padawan

  • Platinum Supporter
  • 2,265 posts
  • Location:Central KY. USA

  • Flag: United States of America

  • Favorite Pinball: Funhouse

Posted 13 April 2016 - 12:27 PM

Okay I figured out the issue. Its a another case were I am doing something custom and a bit out of the norm. Sory of my life. :)

 

I have two 19" TVs in my back box. My backglass image is set up in VP to span those two monitors to make a larger overall image that you can normally get on a single TV or monitor. PBXR did not like the screen res I had to span those two TVs. When I set scren res to a single TV, it recorded fine like intended.

 

So my next question might be a PinballX question. Can PBX show a spanned backglass as the backglass image or video? Might need to go to the Gammex forum for that one.


My VP Pincab /MAME Arcade  Specs: Dell T3400 workstation with Core2 Quad core 3.0GHZ (Q9650) CPU - 8GB of RAM - Nvidia  GTX 970

40" PF Sony gaming LED TV, Dual 21" Dell monitors in the backbox - Pinscape dual boards - Full DOF - Full MAME arcade support.


#172 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,153 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 13 April 2016 - 03:50 PM

I would tell PBX you have 3 screens, playfield, backglass, and dmd.  In your case the "dmd" is really the DMD plus part of the stretched backglass.

Then you would customize PBXrecorder to record the 3 screen videos simultaneously to record the playfield, backglass AND DMD (really DMD and bottom part of backglass)

 

You need to modify how PBXrecorder to not use screenres.txt but a different file with desired video sizes 
 
- Copy the PBXrecorder_1.3.ahk from the PBXRecorder_x64\AHK script\ and put it in the PBXRecorder_x64 so you can modify it.
- Since you have screenres.txt set up to stretch B2S screens across multiple monitors, You will need to have PBXR use a different screenres.txt file  so it only records content on each screen, not accross multiple screens.
        - Open the ahk file, do a search and replace and change screenres.txt to PBXRscreenres.txt.  PBXR will now record based on the PBXRscreenres.txt files
- Now create the custom PBXRscreenres.txt to record the entire screen of each monitor (playfield, backglass, dmd) as desired.  Put a copy of this file in all of your VP table folders
- Run the modified ahk file


#173 TT11

TT11

    Pinball Fan

  • Members
  • PipPipPipPip
  • 643 posts
  • Location:Maitland AUSTRALIA

  • Flag: Australia

  • Favorite Pinball: Bally Kiss & Playboy, Stern Kiss & Playboy

  • 360 Gamer Tag: PoundedElliepup

Posted 13 April 2016 - 10:40 PM

Regarding Hyperpin, I would need one or more people to beta test a Hyperpin version. I am familiar with Hyperpin but haven't used Hyperpin in a long time.  I think there are only a few script changes needed to get it up and running.

 

If anyone wants to get Hyperpin working,  I would need a example of someone's Hyperpin\Databases folder and HyperPin\Settings folder and then also let me know where media goes,  I think Hyperpin has a dedicated Table Images folder, Table Videos folder, but I think Backglass videos and images all go into a Backglass images folder.  I don't think DMD images or videos work.

I'd be happy to send my Hyperpin folders etc.  How would this best be accomplished GTXJOE ??



#174 wrd1972

wrd1972

    Authoring Padawan

  • Platinum Supporter
  • 2,265 posts
  • Location:Central KY. USA

  • Flag: United States of America

  • Favorite Pinball: Funhouse

Posted 14 April 2016 - 01:00 AM

Joe,

I dont think I can have the spanned image on the lower monitor. I think this is a PBX limitation. Could I be wrong?


My VP Pincab /MAME Arcade  Specs: Dell T3400 workstation with Core2 Quad core 3.0GHZ (Q9650) CPU - 8GB of RAM - Nvidia  GTX 970

40" PF Sony gaming LED TV, Dual 21" Dell monitors in the backbox - Pinscape dual boards - Full DOF - Full MAME arcade support.


#175 yagesz

yagesz

    Enthusiast

  • Platinum Supporter
  • 303 posts
  • Location:Wyoming

  • Flag: United States of America

  • Favorite Pinball: TAF, TSPP, Metallica, CV

Posted 14 April 2016 - 01:02 AM

Wierd idea... can you just make it register as a dmd 3 monitor cab and run videos on all of the.

Sent from my SM-G935P using Tapatalk

#176 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,153 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 14 April 2016 - 01:17 AM

TT11 - attach your hyperpin settings and databases folder to a post or PM me a dropbox link

 

wrd - Forget about the spanned B2S thing you do across multiple monitors, for a moment...

PBX Recorder can record 3 simultaneous videos for 3 monitors.  PinballX can display those 3 simultaneous videos on 3 monitors, so why wouldn't it work?

Setup up that custom PBXRscreenres.txt file to record each monitor with 1920x1080 dimensions.  Tell Pinballx your playfield is 1920x1080, your backglass is 1920x1080 and your DMD is 1920x1080 and you should be all set.



#177 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,153 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 15 April 2016 - 12:42 AM

Attn: Hyperpin users

 

HyperRecorder beta now attached.  You need to download and unzip the PBXrecorder 1.3 download from the 1st post in this thread, and then add the HyperRecorder files to it.

 

I tested it on my cab and PF and BG image screenshots work fine

I tested .f4v videos and the video would not play in Hyperpin (I get black screen for f4v videos).  And .mp4 files are ignored by Hyperpin.

 

Try this and report back if the .f4v videos work in your setup.  I don't have any codecs installed for Hyperpin - not even sure if it required it or not, so let me know.  If these .f4v videos do not work on anyone's setup, I will look at changing it the older codec for recording.

 

UPDATED Hyperpin BETA with ffmpeg command line fix ( -pix_fmt yuv420p ).  f4v videos are working on my old Hyperpin install

Attached Files


Edited by gtxjoe, 17 April 2016 - 03:22 AM.


#178 Carny_Priest

Carny_Priest

    Pinball Fan

  • Members
  • PipPipPipPip
  • 1,258 posts
  • Location:Austin, TX

  • Flag: United States of America

  • Favorite Pinball: EATPM

Posted 15 April 2016 - 01:49 AM

Might try to add a pixel format switch to the capture instruction:

 

Run, "%FFMpegPath%\ffmpeg" -y -t %RecTime% -rtbufsize 1500M -f gdigrab -framerate 30 -offset_x 0 -offset_y 0 -video_size %PF_width%x%PF_Height% -i desktop -pix_fmt yuv420p -vcodec libx264 -preset ultrafast -qp 0 -threads 8 "%A_ScriptDir%\playfield.mkv",,Hide UseErrorLevel

 

The default for libx264 is yuv444p allowing for full range color capture. The LAV filters recommended for PinballX can handle this. Many other codecs cannot. Changing to yuv420p should be supported by just about everything. Reds/oranges may appear a little washed out on the resulting videos. I noticed it more with DMD captures however. This is less of an issue as HyperPin does not support DMD videos, but we'll see if 2-screen users notice. 

 



#179 gtxjoe

gtxjoe

    VPF Veteran

  • VIP
  • 5,153 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness, AbraCadabra



Contributor

Posted 15 April 2016 - 01:58 AM

Hey there Carny - I did an initial test of that but it did not work on my cab.  Will try adding this also on the conversion from mkv to f4v step but will try that tomorrow...



#180 sasa12345

sasa12345

    Enthusiast

  • Members
  • PipPipPip
  • 250 posts

  • Flag: ---------

  • Favorite Pinball: indiana jones

Posted 15 April 2016 - 03:59 PM

mpc-hc only black recorded video
with VLC all ok,
I just have to be to work with FP
Gtxjoe  thank you for everything that is great
:otvclap:






Also tagged with one or more of these keywords: pbxrecorder ffmpeg, media pack, record, ffmpeg, media, video, screenshot