Jump to content
SpesoftPinballXConvert-It
Xantari

[RESOLVED] DMD does not record, seems to have improper x/y offsets

Recommended Posts

I am only able to get the playfield and backglass to record.

My DMD (LCD screen) works fine with DMDExt, VPinMame, UltraDMD, and also playing DMD videos that I have previously recorded in PinballX using an older AHK method of recording from Carny_Priest.

Was hoping to use the new feature of pinball x to make my life easier, but it seems the FFMPEG command being generated is not obeying the DMD settings I have specified in the PinballX Setup window.

Everything works in my system except DMD recording. It instead records some random area of the screen I have no idea about (also attached).

I've seen others have this same issue, but no solution.

Can someone help? This is driving me nuts.

Playfield is 3840x2160 (4K), the #3 screen is the backglass and is 1920x1080, #2 screen is DMD and is also 1920x1080.

image.thumb.png.c10d9c5895526f0d0270061f22da07b7.png

image.thumb.png.4ff79e50158ebfc5cac3ae630778a387.png

log.txt

Share this post


Link to post
Share on other sites

Please attach your pinballx.ini as well. Thanks!

Share this post


Link to post
Share on other sites

You may want to review the following thread and a few referenced within to try to get your monitor order and X-Y offsets straightened out.

 

Share this post


Link to post
Share on other sites

I'm not sure changing cables to another port is worth it since every other application works fine, even pinball X works fine and shows backglass, dmd, and playfield on proper monitors.

What is wrong is the FFMPEG capture command isn't obeying any of the entries I put in the pinball x configuration command. It puts this in:

18:10:05.1  1/2/2020:  FFMPEG.exe -f gdigrab -framerate 30 -offset_x 0 -offset_y 0 -video_size 512x128 -t 00:00:30 -i desktop -c:v h264_nvenc -an -qp 21 -pix_fmt yuv420p -movflags +faststart "C:\Pinball\PinballX\MEDIA\Visual Pinball\DMD Videos\Bad Cats.VPX.v1.0.mp4"

This isn't obeying any of my settings as you can see.

The -offset_x should not be 0. It should be 3840 (playfield X width) + 1920 (backglass X width) + 38 x (backglass offset) = 5798 for X offset

The -offset_y should not be 0 as well. It should be 300 as I told pinball X config it should be and uses to properly display the video.

Lastly, the video size should not be 512x128. It should be what I specified in the pinball x configuration program: 1880 x 500.

I plan on trying pinup popper shortly to see how it captures videos.

Share this post


Link to post
Share on other sites

Update. I manually ran what I told you was the  correct FFMPEG command and it records the DMD perfectly.

This definitely is a bug in pinball X. It doesn't calculate the window positions correctly based off of what is set in the pinball X configuration program.

C:\Pinball\PinballX>FFMPEG.exe -f gdigrab -framerate 30 -offset_x 5798 -offset_y 300 -video_size 1880x500 -t 00:00:30 -i desktop -c:v h264_nvenc -an -qp 21 -pix_fmt yuv420p -movflags +faststart "C:\Pinball\PinballX\MEDIA\Visual Pinball\DMD Videos\Bad Cats.VPX.v1.0.mp4

Share this post


Link to post
Share on other sites

Please attach a copy of your updated pinballx.ini for review.

Share this post


Link to post
Share on other sites
Posted (edited)

I only have a 2 display setup  with a real DMD, so I don't know enough about this.
But if I check your previous INI file, the size and location of your playfield, DMD  and or backglass doesn't match.

Not sure if @Tom Speirscalculates with these values the FFMpeg position, but maybe you can give that a shot and set the correct numbers in it

image.thumb.png.33fab05e0a03485ade73a3ca7bed1910.png

Edited by Mike_da_Spike
Added Tom to the post to check

Share this post


Link to post
Share on other sites

nothings changed with pinballx ini... It's all about calculating the proper X/Y offsets with FFMpeg as it doesn't know about display numbers, instead it calculates the visible desktop space by the arrangement of your monitors in windows. If I get time i'll create a diagram and program to show how it's properly calculated.

Share this post


Link to post
Share on other sites

I believe the cords may be taken from the pinmame window with VP. I need to look at this as pinmame uses external DLL by default these days. I did test this a few weeks ago and it was working for me but without using external DLL 

Share this post


Link to post
Share on other sites

To be clear, I wouldn't necessary call it a bug but obviously needs looking at.

  • Like 2

Share this post


Link to post
Share on other sites

I'm working on a sample program for you that doesn't use anything other then the coordinates defined in the pinball X setup window. I don't think we should be using anything outside of that since we need to define the X/Y and offset bounds inside of pinball X. This would make finding the proper coordinates much easier then going through pinmame (which I'm not sure how you would do).

Share this post


Link to post
Share on other sites

@Tom Speirs I created a program that will give the proper FFMpeg commands. Full source code is here: https://github.com/xantari/PinCabScreenConfigurator

There are a some other features in it right now (see documentation at the above URL), but I wanted to give you this so you could implement the fix for the FFMpeg command generation in your code base.

The main command you want to look at is the FFMPeg toolstrip command here: https://github.com/xantari/PinCabScreenConfigurator/blob/f51f0195e912c6696311fa12e5b2e98d01c40c88/PinCabScreenConfigurator/MainForm.cs#L136

You will want to take the DMD coordinates and screen configuration information from PinballX.ini and fill in the proper DisplayDetail object and it will do everything for you.

This would purely use what the user configured in the PinballX.ini file. No PinMame, DMDExt, or anything else would interfer with the details. You just specify what is your displays (Playfield, DMD, Backglass, Apron, Topper) and it does the rest.

A few other observations:

1. Only display the connected displays in the PinballX Settings program. Right now it displays display 1 through 5, even though I don't have a 4th and 5th display (see source code on how I populated the ListBox list for this)

2. The PinballX settings program just says "DIsplay 1", "Dispaly 2", etc. Look at my source code, you can show actual connected monitor EDID information and the windows display name. See how that is done in ListBox on MainForm

3. There is a screen validation function you could implement in your settings program to ensure no screens have negative offsets which would save a bunch of forum postings i'm sure, check the above source code on how that was done.

Share this post


Link to post
Share on other sites
14 hours ago, Tom Speirs said:

I am going to upload 4.07 in a minute. Please try it and post the log.

Thanks.

Tom.

Did you uploaded 4.07 ? I don't see it in the download section

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...