joyrider3774 Posted September 3, 2019 Share Posted September 3, 2019 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 Loading.mp4 3 Quote Link to comment Share on other sites More sharing options...
scutters Posted September 4, 2019 Share Posted September 4, 2019 Here's the way i might go; ACDC Premium (Stern 2012).mp4 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/ Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted September 6, 2019 Share Posted September 6, 2019 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 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 Quote Link to comment Share on other sites More sharing options...
scutters Posted September 6, 2019 Share Posted September 6, 2019 Black border can be done.. So a bit more like this; ACDC Premium (Stern 2012).MP4 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 Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted September 6, 2019 Share Posted September 6, 2019 nais. Thansk Scutters I played a bit arround to get a nice System loading for FX3 it's the default FX3 video I had ans put Joyriders loading with chroma key on top of it Pinball_FX3.MP4 2 Quote Link to comment Share on other sites More sharing options...
joyrider3774 Posted September 6, 2019 Author Share Posted September 6, 2019 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) here i overlayed the image to a table screenshot the problem is the neon is a bit transparant also but still looks ok 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 1 Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted September 6, 2019 Share Posted September 6, 2019 thanks guys ! that would be a hell of a vacation for me (only creating video's ) Quote Link to comment Share on other sites More sharing options...
joyrider3774 Posted September 6, 2019 Author Share Posted September 6, 2019 @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 out.mp4 1 Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted September 6, 2019 Share Posted September 6, 2019 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 ! Quote Link to comment Share on other sites More sharing options...
joyrider3774 Posted September 6, 2019 Author Share Posted September 6, 2019 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: out.mp4 Quote Link to comment Share on other sites More sharing options...
scutters Posted September 6, 2019 Share Posted September 6, 2019 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 0001…0020…0030…2000 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! !) Quote Link to comment Share on other sites More sharing options...
joyrider3774 Posted September 6, 2019 Author Share Posted September 6, 2019 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 out.mp4 1 Quote Link to comment Share on other sites More sharing options...
scutters Posted September 6, 2019 Share Posted September 6, 2019 Thanks, think the lower delay works well (couldn't really be sure without seeing it) Not much time to play with stuff at the moment so no chance to try the scripts Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted September 6, 2019 Share Posted September 6, 2019 I will try to make something tomorrow. Or if 1 of you want to do it, it is fine too. But I have almost all the functions, only need to arrange and sort them Quote Link to comment Share on other sites More sharing options...
joyrider3774 Posted September 6, 2019 Author Share Posted September 6, 2019 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 Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted September 6, 2019 Share Posted September 6, 2019 Nais ! Will start tommorow(no rdp to my cab where I am now ) Quote Link to comment Share on other sites More sharing options...
joyrider3774 Posted September 6, 2019 Author Share Posted September 6, 2019 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 2 Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted September 6, 2019 Share Posted September 6, 2019 Nais. This is what I had in mind too Quote Link to comment Share on other sites More sharing options...
scutters Posted September 7, 2019 Share Posted September 7, 2019 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.. 1 Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted September 7, 2019 Share Posted September 7, 2019 Wow. Nice animation! Quote Link to comment Share on other sites More sharing options...
joyrider3774 Posted September 7, 2019 Author Share Posted September 7, 2019 If you are creating the animation yourselve, maybe the loading text can be shown after the ball is flicked away like showing a letter per time when the ball passes it but not before it so behind the ball ? Like flicking the ball slowly reveals the loading text ? But it is indeed a nice animation Quote Link to comment Share on other sites More sharing options...
scutters Posted September 7, 2019 Share Posted September 7, 2019 Saw your comment too late joyrider, that might have been better than what i got, which is this; ACDC Premium (Stern 2012).MP4 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 Quote Link to comment Share on other sites More sharing options...
scutters Posted September 8, 2019 Share Posted September 8, 2019 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. ACDC Premium (Stern 2012)5M.mp4 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 Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted September 8, 2019 Share Posted September 8, 2019 Nais Mate. Looks pretty awesome. If it had a bit of black backgroud, I think I would use it in my cab. Quote Link to comment Share on other sites More sharing options...
scutters Posted September 8, 2019 Share Posted September 8, 2019 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, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.