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. My bare hosting costs are currently not met so please consider donating by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted (edited)

** OBSOLETE : Replaced by :

HI All,

I created a small program that can create (multiple) video's from your playfield video's and put an over lay on it.
The idea started when PinballX introduced loading Videos and @scutters modified his "Loading Video & Image Changer (de-randomiser) "**

With Scutters his plugin and this program (and a lot of creativity of yourself), you can create your loading video's per table.
examples :
 

 
 

The video's that are created are just short playfield videos with multiple PNG's as overlay.
This program will just grab your playfield videos folder and take all the (missing) video's in it
It requires FFMPEG.exe to operate  (not included, because not sure if it was allowed to post)

The program contains an EXE file and an INI file.
You need to setup the INI first. 
Normally you setup the INI files once, but if you want to change/add overlay's you can change it later,   but I will explain later.

Basic setup INI file :

------------------------------------------------------------------------------------------------------------------------------------------
'Global Variable settings
------------------------------------------------------------------------------------------------------------------------------------------

[Global]
LogPathLocal  = "#CWD#LOG"
LogFileName   = "CreateLaunchingVideos.log"
LogSize       =  0
LogLevel      = "LOGLVL_INFO"


[Paths]
PinballX_Path = "c:\Pinball\PinballX"
FFMPEG_Path   = "#CWD#"
Overlay_Path  = "c:\Pinball\PinballX\Media\Overlay"

[Executables]
FFMPEG_EXE   = "ffmpeg.exe"

[PINBALLX]
CabinetMode         = "True"
GenerateXMLSection1 = "VisualPinball"
GenerateXMLSection2 = "System_1"
GenerateXMLSection3 = "PinballFX3"

Setup the next sections one time :

[Global] section :

  • LogPathLocal - path for logfile. Can be only put a subdirectory , file pathname or #CWD# for current Working Directory 
  • LogFileName -  File name of the logfile
  • LogSize -  0 will overwrite everytime the log file
                       other value will be overwrite the logfile is fize is reached (kb)
  •  LogLevel - Type of logging :
                                                      LOGLVL_INFO  - Shows the least ammount of logging. Enough if all is working
                                                      LOGLVL_VERBOSE  - If you encounter errors, this mode will shows the most issues
                                                      LOGLVL_VERY_VERBOSE  - Nightmare logging mode ! Shows too much info, but handy if it is really not working

[Paths] section :

  • PinballX_path Set the correct path to your PinballX root folder
  • FFMPEG_path : Set the correct path where your FFmpeg.exe is located 
  • Overlay_path : Set the correct path where your overlay PNG's are located

[PINBALLX] section :

  • CabinetMode - True will process cabinet files,
                                 False will process desktop files
  •  GenerateXMLSection - Start the GenerateXMLSection from 1 and up. 
                                                add/remove the sections that has the names in the original Pinballx.INI in the CONFIG folder of PinballX for the emulators which you want to process the videos from
                                                In the example, I only want or the 3 entries that are defined in PinballX.ini to be processed for this script. 
                                                Modify this to your own needs, but make sure the numbering is starting from 1 to ...

You can change the login,paths and pinballx section to your own needs.

Now come the tricky part in  the INI

The INI file can be setup in 2 ways :
1) You can create 1 loading video per playfield. If you have more overlays'you can randomize the overlay per video (like the examples above)
     See example 1
2) You can create multiple video's per playfield (up to 5). With this you can create (up to) 5 different loading videos per playfield table. During launch of a table the videos will be randomized
    See example 2

Example 1

[Overlay1]
VideoLengthMs1 = 5000
ImageMask1     = "TAF%%%.png"
BitRate1       = 5

[Overlay2]
VideoLengthMs1 = 4500
ImageMask1     = "LW3%%%.png"
BitRate1       = 5

[Overlay3]
VideoLengthMs1 = 5000
ImageMask1     = "T2%%%.png"
BitRate1       = 5

[Overlay4]
VideoLengthMs1 = 6000
ImageMask1     = "loadingb%.png"
BitRate1       = 5

[Overlay1] section :

  • VideoLengthMs1 : Set the time of your loading videos in milliseconds
                                      this must be a number between 1 and 10000 (loading videos should not be that long)
  • ImageMask1 : In your overlay_path ([Paths] section) you have multiple PNG's that makes the overlay. 
                              The maskname is the name of the PNG and the % is the total digits your files has.
                               If you have for example 960 Png's You start the first PNG with  number 0. But because you need 0-950, you must start with 000.
                               For example : Test000.png. Second must be named Test001.png , third Test002.png etc
                               The mask in this example would be Test%%%.png
  • BitRate1 : Set the bitrate of the output video. Lower makes smaller files, but less quality. 3-4 is default

If you have multiple Overlay sections (with different overlays) , this program will randomly pick 1 overlay section per created video.
In my example I have 4 sections. If it needs to create a loading video, it will pick 1 of the 4 sections and uses that overlay for the video.
 

Example 2:

[Overlay1]
VideoLengthMs1 = 5000
ImageMask1     = "TAF%%%.png"
BitRate1       = 5

VideoLengthMs2 = 4500
ImageMask2     = "LW3%%%.png"
BitRate2       = 5

VideoLengthMs3 = 5000
ImageMask3     = "T2%%%.png"
BitRate3       = 5

VideoLengthMs4 = 6000
ImageMask4     = "loadingb%.png"
BitRate4       = 5

When only using section [Overlay1], but by increasing the numbers, you can create multiple videos (with different extension) for the same video
With @scutters
 plugin, it will randomize (during PBX load) one of these videos on launch,
The following numbers creates the extensions of the videos
....1 = MP4
....2 = F4V
....3 = FLV
....4 = AVI
....5 = MPEG

There are already some overlaymask that you can use (as I have in my examples and INI files):
Thanks to @joyrider3774 who started the thread and very special thanks to @scutters for his plugin and for his awesome overlays !:

TAF overlay:

LW3 overlay:

T2 overlay:

Loading overlay:
Loading.zip

Special thanks to @scutters. Scutters did the research of the FFMPEG commands that is used (I really doesn't understand the commandline ;) )
It was his idea to create multiple videos with different overlays (example 2)
He also tested this program and give his sign off 

I'm not a programmer, but like to make some things that makes life easy

Here is the latest version of the exe file and an example of the INI. Check changelog below for latest changes

 

CreateLaunchVideos V1.1.zip

CreateLaunchVideos.ini

Changelog :
Date             Version     Modified By     Comment

07/09/2019     0.1b             MdS              Started with creating video's for playfield 
11/09/2019     0.2 b            MdS              Added multiple files and randomized sections - Reported by MdS & Scutters
12/09/2019     0.5 b            MdS              Bug fixses - Reported by MdS 
12/09/2019     0.6 b            MdS              Added popup if something is wrong (with timeout) and fixed logpath with #CWD# - Reported by MdS
12/09/2019     0.7 b            MdS              Changed FFmpeg line - Reported by Scutters
12/09/2019     0.8 b            MdS              Fixed the -system- to be skipped - Reported by MdS
12/09/2019     0.9 b            MdS              Moved MPeg to 5 - Reported by Scutters
13/09/2019    0.91b            MdS              Only processing "mp4", "avi", "f4v", "mpeg" and "flv" video's - Reported by joyrider3774
13/09/2019    0.92 b           MdS             Fixed  -system-  skipped - Reported by joyrider3774
01/10/2019    1.0                MdS             Removed some typos in log and get out of Beta
20/10/2019    1.1                MdS             Added support for NVIDIA rendering

 

NOTE: If you run the exefile from the command line it will process all missing tables.
If you want to re-create all tables (you can delete them from your "loading videos" directory) or use the -f option to force to create all videos again

 

Edited by Mike_da_Spike
Set to obsolete
  • Like 1
  • Thanks 1
Posted

Is source code available (maybe on github ?) / what did your program it in ?

My bitdefender is being noisy about the executable. I'm guessing it's a false positive but i have been unable to download the executeable for now. My bitdefender keeps blocking each download

Am trying to unblock it and running a check afterwards with virustotal or something. My bitdefender has been messing with pinballx installation as well so i'm really guessing it's a false positive but want to be sure

Managed to temporary disable antivirus and upload to virustotal, there are a few others detecting the same thing but i'm mainly guessing it could be false positives,

https://www.virustotal.com/gui/file/99d2b4a577c8a3c377a7b68759e5a43d9be6e8781bbd9b577fc28c169385ea96/detection

not accusing or anything, as usually these are false positives but you never know if the the pc you compiled the exe might have been infected or you used some cracked development program but i doubt all that.

edit: it are false positives probably because of vbs to exe compilation

 

Posted
9 minutes ago, joyrider3774 said:

Is source code available (maybe on github ?) / what did your program it in ?

My bitdefender is being noisy about the executable. I'm guessing it's a false positive but i have been unable to download the executeable for now. My bitdefender keeps blocking each download

image.png.d25797ecdf6f0886529748ab59a5a4b8.png

Am trying to unblock it and running a check afterwards with virustotal or something. My bitdefender has been messing with pinballx installation as well so i'm really guessing it's a false positive but want to be sure

Managed to temporary disable antivirus and upload to virustotal, there are a few others detecting the same thing but i'm mainly guessing it could be false positives

https://www.virustotal.com/gui/file/99d2b4a577c8a3c377a7b68759e5a43d9be6e8781bbd9b577fc28c169385ea96/detection

Lol. I feel honored by all the detections :p 

this i written in vbs and compiled to exe.

Code is not on github. It is code that my colleague and me started in 2001. We build classes for logging. Registry, active directory. We made our own framework to make programming easier for ourself.

With this code we could adminitrate our complete environment.  

We still using it in a very large environment, and never got complains about virus detection.

I realy wsnt to learn visual studio, but don't have time for it(i have a lot of ideas)

 

Posted

@Mike_da_Spike it's running fine now on my system creating video's as a test. I'm amazed at what you achieved using vbs scripts etc :) i probably would have spend way too much time on it if i did it in delphi

Btw you might need to exclude thumbs.db and desktop.ini file. Somehow it detected those files and tried to create movies out of it. Those files are windows specific and contain the thumbnail database for the video's in that folder. (desktop.ini i only mentioned extra it was not detected with me but could exists also but thumbs.db was detected)

 

9/12/2019 8:20:59 PM	INFO	Proccessing Thumbs.db
9/12/2019 8:20:59 PM	INFO	Randomized overlay images found. Using section [Overlay1]
9/12/2019 8:20:59 PM	INFO	Start creating video : [Thumbs.MP4] with imagemask [TAF%%%.png] from [Overlay1] 
9/12/2019 8:20:59 PM	INFO	Found [M:\Pinball\PinballX\Media\Visual Pinball\Table Videos\Thumbs.db]
9/12/2019 8:20:59 PM	INFO	Shell.Run(["M:\Pinball\PinballX\ffmpeg.exe" -y -i "M:\Pinball\PinballX\Media\Visual Pinball\Table Videos\Thumbs.db" -r 12 -thread_queue_size 512 -i "M:\Pinball\PinballX\Media\Overlay\TAF%03d.png" -filter_complex "[0:v]scale=1920:1080[scaled];[scaled][1:v]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,fps=fps=30,vflip,hflip" -ss 00:00:00 -t 00:00:05 -an -vcodec:a libx264 -preset veryslow -b:v 1M -f MP4 "M:\Pinball\PinballX\Media\\Loading Videos\Thumbs.MP4])
9/12/2019 8:21:00 PM	INFO	Run [M:\Pinball\PinballX\ffmpeg.exe -y -i "M:\Pinball\PinballX\Media\Visual Pinball\Table Videos\Thumbs.db" -r 12 -thread_queue_size 512 -i "M:\Pinball\PinballX\Media\Overlay\TAF%03d.png" -filter_complex "[0:v]scale=1920:1080[scaled];[scaled][1:v]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,fps=fps=30,vflip,hflip" -ss 00:00:00 -t 00:00:05 -an -vcodec:a libx264 -preset veryslow -b:v 1M -f MP4 "M:\Pinball\PinballX\Media\\Loading Videos\Thumbs.MP4] returned 1
9/12/2019 8:21:00 PM	ERROR	Error during creating video : [Thumbs.MP4]
Posted

Thanks. I didn't have them in my folders, but will exluded them in the following release.

I have already a complete areay what to excluded abd will add these 2 files to.

Thanks for bringing it up !

Posted

@Mike_da_Spike downloaded latest version, is it normal that the app processes "- system -.mp4" files from system menu ?

 

09/13/2019 11:21:48 AM	INFO	Randomized overlay images found. Using section [Overlay1]
09/13/2019 11:21:48 AM	INFO	Start creating video : [- system -.MP4] with imagemask [TAF%%%.png] from [Overlay1] 
09/13/2019 11:21:48 AM	INFO	Found [C:\PinballX\Media\Visual Pinball\Table Videos\- system -.mp4]
09/13/2019 11:21:48 AM	INFO	Shell.Run(["C:\PinballX\ffmpeg.exe" -y -i "C:\PinballX\Media\Visual Pinball\Table Videos\- system -.mp4" -r 12 -thread_queue_size 512 -i "C:\PinballX\Media\Overlay\TAF%03d.png" -filter_complex "[0:v]scale=1920:1080[scaled];[scaled][1:v]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,fps=fps=30,vflip,hflip" -ss 00:00:00 -t 00:00:05 -an -vcodec:a libx264 -preset veryslow -b:v 2M -f MP4 "C:\PinballX\Media\\Loading Videos\- system -.MP4])
09/13/2019 11:22:08 AM	INFO	Run [C:\PinballX\ffmpeg.exe -y -i "C:\PinballX\Media\Visual Pinball\Table Videos\- system -.mp4" -r 12 -thread_queue_size 512 -i "C:\PinballX\Media\Overlay\TAF%03d.png" -filter_complex "[0:v]scale=1920:1080[scaled];[scaled][1:v]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,fps=fps=30,vflip,hflip" -ss 00:00:00 -t 00:00:05 -an -vcodec:a libx264 -preset veryslow -b:v 2M -f MP4 "C:\PinballX\Media\\Loading Videos\- system -.MP4] returned 0
09/13/2019 11:22:08 AM	INFO	Succesfully created video : [- system -.MP4]

 

Am currently letting it redo everything on my cabinet, my cab is much slower than my main pc so will be a while but it's only once as the app detects video's already done which is great so in future it will only have to do newly added tables :)

Posted

Hmmm... I should skip the - system - (see your previous log). It doesnt hurt, because system is not used. But must recheck the code.

As I said: I'm not a programmer :P.

Posted
10 minutes ago, Mike_da_Spike said:

Hmmm... I should skip the - system - (see your previous log). It doesnt hurt, because system is not used. But must recheck the code.

As I said: I'm not a programmer :P.

No problem only noticed it as it was the first file it did but if it's not used with scutters plugin i leave it in otherwise it would recreate the file each time :) 

and btw scripting is a form of programming, you did a good job :)

Posted
4 minutes ago, joyrider3774 said:

No problem only noticed it as it was the first file it did but if it's not used with scutters plugin i leave it in otherwise it would recreate the file each time :) 

- sytstem - videos will be ignored by the plugin (unless you rename to the actual system name), so shouldn't cause an issue.

  • Like 1
Posted

Uploaded version 1.0
I noticed I had some textual logging issues (typos... :P ). Removed those and put out of Beta. Thanks to all who tested it and believed in me

  • Like 1
Posted

Uploaded version 1.1
Added support for NVIDIA GPU rendering. In my case the video's generated 55% faster.
Not sure if people still using this, after implementing GIF overlay in PinballX. 

 

  • Thanks 1
Posted
10 minutes ago, Mike_da_Spike said:

Uploaded version 1.1
Added support for NVIDIA GPU rendering. In my case the video's generated 55% faster.
Not sure if people still using this, after implementing GIF overlay in PinballX. 

 

I am!, i'm an nvidia user too so this should be great for me. Thanks Mike 

  • 7 months later...
Posted

because it does not work I followed all the steps, I put all the png files in the overlay folder, attach the log file and the ini,
my videos tables are F4v I converted one to mp4 and nothing does not record the videos. with the ffmepg I recorded all my videos and I record them perfectly and I also recorded short 5s videos I put them in the loadind videos folder and they work well with the PBXLoadingImage V2_3
sorry for my english i speak spanish

CreateLaunchingVideos.log CreateLaunchVideos.ini

Posted

Sorry, I forgot that there are places in Spanish to solve problems of this type, but they provide you with a paid installation and maintenance service to solve them.

Posted

@dewo I will look into your issue. My first thought when looking into your issue it is caused by the f4v playfields you have.

I only tested it with mp4 playfields, so not sure.

Let me get back to you in a few hours

 

Posted
2 hours ago, dewo said:

Sorry, I forgot that there are places in Spanish to solve problems of this type, but they provide you with a paid installation and maintenance service to solve them.

Not sure what you exactly mean, but my programs are for free and support is free too. So any site that asking money for my program or support is not good.

Because I'm not a developer,  I only ask patience to sort things out if there is an issue.

Posted

@dewo 

I checked the command line with a .f4v file and that is working for me.
So that's not the issue.

Can you open a command prompt and run the next command :

C:\PinballX\ffmpeg.exe -y -i "C:\PinballX\Media\Visual Pinball\Table Videos\Xenon (Bally 1980).f4v" -r 12.8 -thread_queue_size 512 -i "C:\PinballX\Media\Overlay\T2%03d.png" -filter_complex "[0:v]scale=1920:1080[scaled];[scaled][1:v]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,fps=fps=30,vflip,hflip" -ss 00:00:00 -t 00:00:05 -an -vcodec:a h264_nvenc -b:v 5M -f MP4 "C:\PinballX\Media\\Loading Videos\Xenon (Bally 1980).MP4"

 

Just want to know if this is creating the video or that you get an error
can you post the output ?

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...