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

Loading videos


joyrider3774

Recommended Posts

just for when the bug / problem / cause has been found with video's not displaying for first table loaded,  I already created a loading video for my system it's 1920x1080 if you run in portrait i included the seperate images (1080x1920) to create a video (or first gif to convert to video online) in this zip file:  loading.zip the video itselve (although rotated in 1920x1080 resolution) is included in the zip also. You can also use one of the images as a loading image

Here's the preview. The dots change every second and it works well if the video is played repeatedly / in a loop (what pinballx does with loading video's)

Do note loading video's in pinballx are not rotated so you have to create them as how you would see them normally without rotation so below's video is good if you run in landscape mode (270° rotation) they don't have to be in same rotation as playfield videos

feel free to share your loading video's in this topic

  • Like 3
Link to comment
Share on other sites

Here's the way i might go;

It's a table video rotated with a slightly transparent overlay. My test .bat file at the moment is;

CD "C:\Pinballx\media\visual pinball\table videos"
for /R %%f in (*.f4v) do (
"C:\Pinballx\ffmpeg" -i "%%f" -i "C:\Pinballx\media\Loading Videos\LoadingOverlayTrans.png" -filter_complex "[1]scale=4000:-1;[0] overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,vflip,hflip" -codec:a copy "C:\Pinballx\media\Loading Videos\%%~nf.mp4" -y
 )

Which assumes you have ffmpeg.exe in the pinballx folder and the LoadingOverlayTrans.png (attached) in the Loading Videos folder and then loops through table videos rotating them, adding the overlay (centred) and sizes the overlay width (in this case to 4000, which would need to reduce for 1080*1920 videos).  Open notepad, paste (amend as required) code above and save as a .bat file rather than .txt and then run. Obviously you can change out the LoadingOverlayTrans.png to whatever you want.

Might be easier ways to do it (i get lost in all the parameters available for ffmpeg), and could probably do with wrapping up in an exe or something to make it more friendly / configurable.  And, for PinballX to load these so they match the table being loaded i'll have to finish off the plugin for v3.60, pretty close to that now.

LoadingOverlayTrans.zip

EDIT - Plugin  https://www.gameex.info/forums/topic/23127-plugin-pinballx-loading-video-image-changer-de-randomiser-v2/

Link to comment
Share on other sites

Hey guys,
I'm terrible in visual stuff ...  But also played arround (And make some programs witg FFMpeg)
Not sure if it is possible, but I want to know if we can create the following :
 

  • Take Video from table folder - This can be done
  • Make an overlay that makes something like this (only the black part)  - Can be done, but I don't know how

image.thumb.png.0554c96164d112141b95466366fa7d0e.png

  • And with make another overlay with the loading video of @joyrider3774. - I hope this can be done
  • Select only 5-10 seconds (that do-able)  - This can be done

If this can be done, I can write a nice program that will do this for missing tables

Link to comment
Share on other sites

Black border can be done..

So a bit more like this;

BlackBorder circle attached as well as this version of the overlay. Just paste the border into a new layer & drag the black border around to resize over a loading image to get the effect you want and merge the layer down.

To animate the overlay would be possible i guess, but i'd need to read a bit more on ffmpeg. Maybe an overlay image sequence.

Images.zip

Link to comment
Share on other sites

maybe these images (loading.zip ) can work to create your initial thought it contains the 5 images (1920x1080) with the black gradient around the edges and loading text. I also included the gimp xcf file, The text came from https://flamingtext.com/logo/Design-Neon?fontname=alien+league and you basically write a "...Loading..." text and then in gimp duplicate it as a layer and remove the dots where needed going from no dots to 3 dots back to 1 dot (as next image if video reloads is no dots again). The Text is not 100% the same as i can't remember the initial settings i used for my 1st video.

Here's an example picture (it's transparant but not sure how well this would work with overlaying on video's)
loadingb4.thumb.png.d48638edbff67d0e874e27b67458c817.png

here i overlayed the image to a table screenshot the problem is the neon is a bit transparant also but still looks ok

BallyBeachBeauty.thumb.png.915cdda264aa640a738becc8eeac9373.png

Unfortuantly i have no idea how you can make each image display 1 second and then repeat again when overlaying this with the table video's in ffmpeg.

And i like the Pinball fx3 system video

  • Thanks 1
Link to comment
Share on other sites

@Mike_da_Spike I managed to get ffmpeg.exe going with table video's the 6 transparant images i had uploaded in my previous post.

Taking a table video and vertically / horz flipping, then displaying each image 1 second as an overlay and limiting the video to 6 seconds (because i have 6 images). Results in this as an example video

this was the long command test.mp4 is the table video in the orientation pinballx expects it to be (when using 270° landscape). then the 6 loading images (in the format the video will be displayed on the screen, like not rotated) i display for a second out.mp4 is the output. I'm not sure about the map parameters and about audio but it works for my video i tested with. it's not perfect because i can see a flicker sometimes when the new image loads but  Maybe someone can improve it as i don't really see that flicker in the original video not sure if my ffmpeg.exe is the cause (i took the latest version). Also it assumes table video's and images supplied are all same size (1920x1080 in my case)
 

C:\Game Recordings\visual pinball recording ffmpeg>ffmpeg -i test.mp4 -i loadingb1.png -i loadingb2.png -i loadingb3.png -i loadingb4.png -i loadingb5.png -i loadingb6.png -filter_complex "[0]vflip,hflip[v0];[v0][1]overlay=x=0:y=0:enable='between(t,0,1)'[v1];[v1][2]overlay=x=0:y=0:enable='between(t,1,2)'[v2];[v2][3]overlay=x=0:y=0:enable='between(t,2,3)'[v3];[v3][4]overlay=x=0:y=0:enable='between(t,3,4)'[v4];[v4][5]overlay=x=0:y=0:enable='between(t,4,5)'[v5];[v5][6]overlay=x=0:y=0:enable='gt(t,5)'[v6]" -map "[v6]" -map 0:a? -ss 00:00:00 -t 00:00:06 out.mp4 -y

it resulted in such video which i took as an example video, it plays well again when repeated / loopend
 

  • Like 1
Link to comment
Share on other sites

Awesome. Need to check it, but what a long string ! I use a pretty recent version of ffmpeg, but the Syntax is always magic for me.

But with this I can create a script that will generate loading tables for 6 seconds from the playfield folder. Today not at my cab, but have some time tommorow.

Thanks both of you guys !

 

Link to comment
Share on other sites

i fixed the flickering by specifing 1000 th's of a second and making sure ending and starting value is not the same so no 2 images are displayed at the same time

This is the command to get no flickering

 

C:\Game Recordings\visual pinball recording ffmpeg>ffmpeg -i test.mp4 -i loadingb1.png -i loadingb2.png -i loadingb3.png -i loadingb4.png -i loadingb5.png -i loadingb6.png -filter_complex "[0]vflip,hflip[v0];[v0][1]overlay=x=0:y=0:enable='between(t,0,0.9999)'[v1];[v1][2]overlay=x=0:y=0:enable='between(t,1,1.9999)'[v2];[v2][3]overlay=x=0:y=0:enable='between(t,2,2.9999)'[v3];[v3][4]overlay=x=0:y=0:enable='between(t,3,3.9999)'[v4];[v4][5]overlay=x=0:y=0:enable='between(t,4,4.9999)'[v5];[v5][6]overlay=x=0:y=0:enable='gt(t,4.9999)'[v6]" -map "[v6]" -map 0:a? -ss 00:00:00 -t 00:00:06 out.mp4 -y


example output:

Link to comment
Share on other sites

I like it!, but maybe 0.5sec delay on the overlays, so it shows a bit more animation?

Also, as my playfield videos are 5sec i don't think it'll work right for me :(

But... add a couple of extra dots and (i think) 5sec could work with 0.5sec delays (if my finger counting is correct)

Might be a way round listing all the loading.pngs;

From http://hamelot.io/visualization/using-ffmpeg-to-convert-a-set-of-images-into-a-video/

To take a list of images that are padded with zeros (pic0001.png, pic0002.png…. etc) use the following command:

ffmpeg -r 60 -f image2 -s 1920x1080 -i pic%04d.png -vcodec libx264 -crf 25  -pix_fmt yuv420p test.mp4

where the %04d means that zeros will be padded until the length of the string is 4 i.e 0001002000302000 and so on. If no padding is needed use something similar to pic%d.png or %d.png.

Would need adjusting but %d is promising

 

(i'm also starting to think that you guys don't like the abduction font i use!... No taste! :P!)

Link to comment
Share on other sites

have not played with that yet but it would require to create new images also not sure if you have to keep specifying these parts for each image "[v0][1]overlay=x=0:y=0:enable='between(t,0,0.9999)'[v1];[v1][2]overlay=x=0:y=0:enable='between(t,1,1.9999)'[v2]"  it basically tells ffmpeg to display image 1 between second 0 and 0.9999 on position 0,0 as overlay then goto next step V1 where i start next overlay image from 1 and display till 1.999. i don't know if that can be made variabele so you don't have to repeat it for each image. as I'm no fmpeg expert, and basically used google and a bit of trial and error. 0.5 increments could work. But you can use the same steps / site as i did to create such logo. I only took your black borders gradient image and resized to 1920x1080 and put logo in the center using gimp then duplicated the layer with all the dots and started removing them so i get an incremental image with all dots being displayed.

also with your table video's change the between statements to use 0.75 or 0.5 seconds adjust the -ss 00:00:00 -t 00:00:06 statement (to cut 6 seconds of input video) accordingly based on your timeframe and nr of images (6 images time 0.75 is 4.5 seconds total) although i'm not sure SS and t can use lower values than seconds, have not tried

A script or program can probably be created to generate the ffmpeg commands based on nr of input images and timeframe per image or max time of video dived by nr of images



edit: Here's the command i used to test it (seems to work), you get normally a new dot every 0.75 seconds and loading video max length should be 4.5 seconds so should work with your 5 second table video's

C:\Game Recordings\visual pinball recording ffmpeg>ffmpeg -i test.mp4 -i loadingb1.png -i loadingb2.png -i loadingb3.png -i loadingb4.png -i loadingb5.png -i loadingb6.png -filter_complex "[0]vflip,hflip[v0];[v0][1]overlay=x=0:y=0:enable='between(t,0,0.7499)'[v1];[v1][2]overlay=x=0:y=0:enable='between(t,0.75,1.4999)'[v2];[v2][3]overlay=x=0:y=0:enable='between(t,1.5,2.2499)'[v3];[v3][4]overlay=x=0:y=0:enable='between(t,2.25,2.9999)'[v4];[v4][5]overlay=x=0:y=0:enable='between(t,3,3.7499)'[v5];[v5][6]overlay=x=0:y=0:enable='gt(t,3.7499)'[v6]" -map "[v6]" -map 0:a? -ss 00:00:00 -t 00:00:04.5 out.mp4 -y

it's possible to specify milliseconds like this HH:MM:SS.xxx  according to this stackoverlfow page https://stackoverflow.com/questions/23171937/ffmpeg-video-editing-command-in-milliseconds-timestamp

this is result

  • Like 1
Link to comment
Share on other sites

btw i modified my commando to center the images against the video like in the original command used as i had some video's that were lower resultion. I'm not sure how i can scale it to be same size as the video. Currently it still expects images and video's to be same size. Although i had video's that were lower size but not by much and overlay now gets positioned in center. The loading text is just a bit bigger then compared to same size video's. but if using 4k video's you should probably scale the images first. Or if using mixed resolution video's we should find a way to scale the images to be same size as the video.

I basically switched overlay=x=0:y=0 with overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2

CD "C:\Game Recordings\visual pinball recording ffmpeg\Table Videos"
for /R %%f in (*.*) do (
"C:\Game Recordings\visual pinball recording ffmpeg\ffmpeg" -i "%%f" -i "C:\Game Recordings\visual pinball recording ffmpeg\loadingb1.png" -i "C:\Game Recordings\visual pinball recording ffmpeg\loadingb2.png" -i "C:\Game Recordings\visual pinball recording ffmpeg\loadingb3.png" -i "C:\Game Recordings\visual pinball recording ffmpeg\loadingb4.png" -i "C:\Game Recordings\visual pinball recording ffmpeg\loadingb5.png" -i "C:\Game Recordings\visual pinball recording ffmpeg\loadingb6.png" -filter_complex "[0]vflip,hflip[v0];[v0][1]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:enable='between(t,0,0.7499)'[v1];[v1][2]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:enable='between(t,0.75,1.4999)'[v2];[v2][3]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:enable='between(t,1.5,2.2499)'[v3];[v3][4]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:enable='between(t,2.25,2.9999)'[v4];[v4][5]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:enable='between(t,3,3.7499)'[v5];[v5][6]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:enable='gt(t,3.7499)'[v6]" -map "[v6]" -map 0:a? -ss 00:00:00 -t 00:00:04.5 -codec:a copy "C:\Game Recordings\visual pinball recording ffmpeg\Loading Videos\%%~nf.mp4" -y
)


I'm currently creating my loading video's using it :)

Link to comment
Share on other sites

Loading video's created, uploaded them back to my cabinet and created a little video to show it. Its an almost seamless loading experience now especially if you don't hide pinballx backglass. Here's a video on how it loads on my cabinet with a few tables. Also due to the blackness in the loading video's from the overlay the video's generated are very small i had created 427 videos and they only take about 250 mb in size total that's less than a megabyte per video for 4.5 seconds. With the previous attempt it was around 800 mb for the same amount of videos
 

 

  • Like 2
Link to comment
Share on other sites

Classic pinball animation anyone (TAF)?, had a bit of time last night and thought i'd give something else a go. Still need to sort out timings and clean up my images, as this is a work in progress (maybe) only pasting a gif in the post. What do you think, worth continuing?, would it need 'loading' text somewhere as well?. Thanks..

ACDC.gif.3f1f7a362f814ce16507b7e91557396f.gif

 

  • Like 1
Link to comment
Share on other sites

Saw your comment too late joyrider, that might have been better than what i got, which is this;

If i'm honest the animation doesn't stand up to very close scrutiny on a 4k screen, but as a loading screen i'm happy as i won't be looking much. To get smooth playback on my system i had to limit quite a few options as well (playback could stutter on table loading, normally just before it fully loaded - when i assume because VPX is doing it's heaviest work). So it's limited to HD, with bitrate reduced for smooth play. On the plus side this has reduced file size significantly too.

Batch like;


CD "C:\Pinballx\media\visual pinball\table videos"
for /R %%f in (*.*) do (
"C:\Pinballx\ffmpeg" -i "%%f" -r 15 -i "C:\Pinballx\media\Loading Videos\g_%%02d.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" -an -vcodec:a libx264 -preset veryslow -b:v 2M "C:\Pinballx\media\Loading Videos\%%~nf.mp4" -ss 00:00:00 -t 00:00:04.8 -y
 )

A few things on the command (note -i'm not an expert!);

g_%02d - this works to apply the image sequence, g_00 to g_72 (the 02 indicating padded to two digits with 0's)

scale - as said above, forced to 1920*1080. 

preset veryslow - i'm not too worried about one off file creation time. Maximum compression

an - remove any audio (just in case)

r - set frame rate, i used number of images / duration   (here  73 / 4.8 ~ 15). Duration is <5sec as my table videos are 5sec only.

b:v - set video bitrate, 2M is acceptable for this

 

Sequence images (all 1920*1080) attached as zip if you want to use them. They were based on a gif i found http://www.devicers.com/project/the-greatest-pinball-machines/

At some stage i'll cleanup the images and update here, just wanted to get smooth playback for now. Edit - found a better source, will re-do

ImageSequence.zip

Link to comment
Share on other sites

Here's version2 of addams family style loading screen (better images sourced from NetzZWerg's excellent colourisation http://vpuniverse.com/forums/topic/3746-the-addams-family-colorization/, if you're not using it you should!). This version should loop better as well.

Pretty much the same ffmpeg command as before, except : for some reason this runs smooth for me at higher bitrate so b:v now 5M (file size bigger too as a consequence), and as image sequence is 60 frames with r set at 15 that means 4sec total,  set t to 00:00:04.0  File names different as well so input i changed to TAF%%03d.png. 

Image sequence attached.

ImageSequence.zip

Link to comment
Share on other sites

I like a bit more of a table preview i guess... but, if you used the black border circle from post 4 to get a black background you like in a 1920*1080 image, you could paste the images to a new layer and merge down in paint.net or gimp to get what you want. Would be 60 images to do so a lot of copy, paste, merge and saving, but could be done,

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