bpjacobsen Posted March 12, 2015 Author Share Posted March 12, 2015 I ran the snippet you provided and it did create a playfield.mkv file. So I'm guessing the lack of mkv file in the folder with the script is my culprit but I'm not sure. Can you please verify and if so, where do I get this file? Just for giggles, I put the playfield.MKV file I generated in there and when I ran the script, the MKV disappeared. Strange. still no videos in the folders. Sorry to be clueless but if you could just point me in the right direction on obtaining the proper MKV files that would be much appreciated. Thanks Link to comment Share on other sites More sharing options...
Content Provider CarnyPriest Posted March 12, 2015 Content Provider Share Posted March 12, 2015 Can you post your screenres.txt? Sent from my iPad using Tapatalk Link to comment Share on other sites More sharing options...
bpjacobsen Posted March 12, 2015 Author Share Posted March 12, 2015 Here is the screenres and video prefs. I tried making the backglass size the same as play field but that just distorts it. The settings were based on the recommended settings on one of the forums. Seems to work fine. Is there supposed to be .mkv file in the folder I'm running the script from? You had asked if the interim mkv file was in the folder from which I'm running the script. Thanks Link to comment Share on other sites More sharing options...
Content Provider CarnyPriest Posted March 12, 2015 Content Provider Share Posted March 12, 2015 Here is the screenres and video prefs. I tried making the backglass size the same as play field but that just distorts it. The settings were based on the recommended settings on one of the forums. Seems to work fine. Is there supposed to be .mkv file in the folder I'm running the script from? You had asked if the interim mkv file was in the folder from which I'm running the script. Thanks Hmm, well, I have a 3 screen setup and I see now that the DMD/LED video is still going to be captured for 2 screen setups. I wonder if that sets up a conflict as the area is already being captured for the backglass. I wouldn't think so, but maybe. What you can do is comment out the lines: If DMD_width > 0 Run, ffmpeg -t 70 -rtbufsize 1500M -f gdigrab -framerate 30 -offset_x %DMD_X% -offset_y %DMD_Y% -video_size %DMD_width%x%DMD_height% -i desktop -vcodec libx264 -preset ultrafast -qp 0 -threads 8 "%A_ScriptDir%\dmd.mkv",,Hide UseErrorLevel the mkv file is not something you need it is the video output produced by the capture after running that ffmpeg command from the command line. In the trim and transcode section I have the script run ffmpeg to process the video from the capture into its final form useble within PinballX and writes it to the appropriate media folder. I was just checking to see that the command you were testing actually produced a video. You could even play that mkv file in a media player like VLC to see if you had successfully captured your desktop. Link to comment Share on other sites More sharing options...
bpjacobsen Posted March 13, 2015 Author Share Posted March 13, 2015 I don't get why this is not working for me. The table with backglass runs for like 20 seconds then it stops. No videos. Can you please check the attached file and let me know if there is anything wrong? Also, see the screenshot and let me know if I am running the command correctly? I would assume so since the table does fire up. This is odd. (had to change ext to txt so I could upload) capscreens.txt Link to comment Share on other sites More sharing options...
bpjacobsen Posted March 13, 2015 Author Share Posted March 13, 2015 I assume to comment out the line you just enter a ; correct? Link to comment Share on other sites More sharing options...
bpjacobsen Posted March 13, 2015 Author Share Posted March 13, 2015 I also set the DMD to hidden since I'm not using 3 screens yet. I don't really care about having a DMD video quite honestly. The only reason I am trying to do this is because I have about 15 or so tables for which no BG and/or table video is available on vp forums or vp universe. Would be nice to get this working anyway so I have it when needed. Thanks again for all of your assistance. I wish I had more knowledge of this. I feel like I am so close. Link to comment Share on other sites More sharing options...
Content Provider CarnyPriest Posted March 13, 2015 Content Provider Share Posted March 13, 2015 Sorry, I wasted some of your time here with this. There's a bug in the script. I have you assign your path to ffmepg.exe but I didn't put that path in the program call. It always worked for me because I have my PATH environment set to include the ffmpeg folder. Here's what to do: Only set the path to ffmpeg (don't include the executable) FFMPEG_Path = c:\pinball\FFMPEG static\bin and also put %FFMPEG_Path% in front of each ffmpeg call. So, the instruction would look like this: Run, %FFMPEG_Path%\ffmpeg -t 70 -rtbufsize 1500M -f gdigrab -framerate 30 -offset_x 0 -offset_y 0 -video_size %PF_width%x%PF_height% -i desktop -vcodec libx264 -preset ultrafast -qp 0 -threads 8 "%A_ScriptDir%\playfield.mkv",,Hide UseErrorLevel Also if you don't want a DMD Video, comment out both of these lines: ; If DMD_width > 0 ;Run, %FFMPEG_Path%\ffmpeg -y -i "%A_ScriptDir%\dmd.mkv" -ss 5 -to 65 -c:v libx264 -crf 26 "%PinballX_Path%\Media\Future Pinball\DMD Videos\%description%.f4v",,UseErrorLevel As long as you are just running one version of Visual Pinball, this should work fine. Or if you are using multiple VP versions and happen to have it set in your ini exactly like mine - PhysMod5 under System_4 and PhysMod2 under System_9 then it will work. If you are using multiple VP versions check your ini and overwrite the System_? with your ini headers. Updated script here if you need it: http://www.gameex.info/forums/topic/15207-capture-videos-to-pinballx-media-table-backglass-and-dmd/#entry139563 Link to comment Share on other sites More sharing options...
Content Provider freneticamnesic Posted March 13, 2015 Content Provider Share Posted March 13, 2015 awesome Link to comment Share on other sites More sharing options...
bpjacobsen Posted March 14, 2015 Author Share Posted March 14, 2015 Well, closer, but still no cigar. It created a backglass video file but no table video file. But the backglass video file won't play when I load pinballx. Just a black screen. Does it matter that I don't use Future Pinball? Or should the script not include all that FP stuff? Thanks again. Link to comment Share on other sites More sharing options...
Content Provider CarnyPriest Posted March 14, 2015 Content Provider Share Posted March 14, 2015 No, it should not matter if you don't use FP. What program it uses to capture is deduced from the filename extension that you enter. Do you use the Shark Codec package that is linked at the PinballX home page? It is recommended. If you don't want to use the Shark package, there is an extra parameter you will probably need to add to those ffmpeg capture instructions. There will be a reduction in quality but I've only really noticed it with DMD captures, so it will probably be OK. http://www.gameex.info/forums/topic/15207-capture-videos-to-pinballx-media-table-backglass-and-dmd/page-3#entry138655 I'm not sure why you would get a backglass video and not a table video also. If you edited the script on your own, make sure that you have %FFMPEG_Path% include the percent signs check for misspelling. You also need to have a \ backslash between %FFMPEG_Path% and ffmpeg. You are telling the operating system exactly where on your drive to find ffmpeg.exe As always, with every program or dll that we use for anything pinball related, run as administrator/make sure everything is unblocked. This includes VP, VPM, ffmpeg, and the compiled script executable Check to make sure the script has not hanged. Use Task Manager to see if the script process is still running or ffmpeg. If you do find playfield.mkv or bg.mkv files in the same folder where you are running your script. Delete those out before you run the script again. The script is supposed to delete these files out on its own as part of cleaning up after itself. It's a good sign that you are at least getting some output. Did the backglass file have the file name that you were expecting? Link to comment Share on other sites More sharing options...
bpjacobsen Posted March 14, 2015 Author Share Posted March 14, 2015 one step closer! So I installed Shark codecs then set the FFmpeg exe files to run as admin. had the same issue as before where it generated no videos and ran for 20 seconds. So Unchecked run as admin and now I have the backglass video and it plays! However, still no table video. Very strange. So close yet so close. ) Link to comment Share on other sites More sharing options...
bpjacobsen Posted March 14, 2015 Author Share Posted March 14, 2015 Hip Hip Horray!! I just tried it for Bone busters and got two perfect videos that play in PinballX. Whaaaaahoooo! So I wonder why it won't create the table video for X-Men? I just want to say thanks a million for working with me on this. I am floored. I was starting to give up on myself. lol. You are a genius!! Link to comment Share on other sites More sharing options...
bpjacobsen Posted March 14, 2015 Author Share Posted March 14, 2015 ugh! Just tried Mr and Mrs Pacman. Same issue. no table video but backglass video works fine. What do you thing the issue might be with tables? Link to comment Share on other sites More sharing options...
bpjacobsen Posted March 14, 2015 Author Share Posted March 14, 2015 Wonder if this issue is why they were not available in the first place? Link to comment Share on other sites More sharing options...
bpjacobsen Posted March 14, 2015 Author Share Posted March 14, 2015 Oh brother! I spoke too soon. Now everytime I run this, instead of the f4v file being the backglass, it is taking a video of the folder contents of the pinballx\backglass videos folder. And I think I may have already had a table video for bone busters so that's why I thought it created it. So still no table videos and now for whatever reason after working for a few, the backglass file is not the backglass. it's the folder they are in. very weird. See attached screenshot and notice that cirqus voltaire is a bunch of thumbnails of the backglass video folder. Link to comment Share on other sites More sharing options...
bpjacobsen Posted March 14, 2015 Author Share Posted March 14, 2015 tried restarting, This is insane. Why did it successfully create a couple backglass videos and now with no changes made, it is making a video of my desktop or folder where the videos are? Makes no sense. I did not change a thing when that started happening that I am aware of. And still no table videos. Link to comment Share on other sites More sharing options...
bpjacobsen Posted March 14, 2015 Author Share Posted March 14, 2015 OK, I figured out the backglass issue. capscreens.exe was still running in task mgr and I had to kill it. Then I noticed the bg.mkv files are not being deleted automatically. No biggie. Now if I can just figure out the table video part. Link to comment Share on other sites More sharing options...
bpjacobsen Posted March 14, 2015 Author Share Posted March 14, 2015 Hmm, I wonder why capscreens.exe is not being properly terminated? have to end task everytime. Link to comment Share on other sites More sharing options...
bpjacobsen Posted March 14, 2015 Author Share Posted March 14, 2015 Ok, now it seems like the .exe is terminating properly. who knows. Let me know your thoughts on the table video issue. backglass videos seem to be producing and playing fine now. Link to comment Share on other sites More sharing options...
Content Provider CarnyPriest Posted March 14, 2015 Content Provider Share Posted March 14, 2015 Is the folder with your backglass videos open while you are capturing? That is, it is open behind the b2s screen when you are running? And the program is capturing the desktop instead of the b2s window? The script should be automatically shutting down Aero if it is open. That should solve that issue. What OS are you running? If you are getting a backglass video at the end then you must be able to see ffmpeg doing the transcode after it automatically closes down VP. If you have a window open showing the contents of the folder from which you are running the script, you should see the interim file bg.mkv. That's the one for your backglass video. There should also be a playfield.mkv file for the table capture. Do you see the playfield.mkv during the transcode step? Doing the captures simultaneously might require a somewhat beefy PC. What are your PC specs? Sent from my iPad using Tapatalk Link to comment Share on other sites More sharing options...
bpjacobsen Posted March 15, 2015 Author Share Posted March 15, 2015 Should not be any problem. I have windows 8.1 on a quad core I7 processor. I have yet to see the playfield.mkv file be generated. Only the BG. The BG works fine now. I might try commenting out the BG lines and see if it creates the table video by itself. Thanks Link to comment Share on other sites More sharing options...
Content Provider CarnyPriest Posted March 15, 2015 Content Provider Share Posted March 15, 2015 I'm using W7 x64. I don't have W8 to test. I could see ffmpeg crashing if the offset, width, or height was such that ffmpeg was being asked to capture outside the boundary of your desktop. You could try taking that instruction that generates playfield.mkv and hard code the capture area. It should be: -offset_x 0 -offset_y 0 -video_size 1920x1080 Run it from the command line and see if it crashes with an error message or if it creates a video of your main screen. Do you have your multiple screens set up in the standard way? Both screens landscape. Backglass to the rights of the playfield screen. Top edges of each screen are aligned. Sent from my iPad using Tapatalk Link to comment Share on other sites More sharing options...
bpjacobsen Posted March 15, 2015 Author Share Posted March 15, 2015 Hey, guess what! I actually came up with a plan that worked for once! So I commented out all the references to BG.MKV so as to only do the table video. It worked! Didn't have to hard code the playfield area dimensions either. Let's see if the rest of them work now. Don't know why it would not do both but I'm not complaining. Thanks again for your help. I will copy and paste this whole thread to a doc for reference. Link to comment Share on other sites More sharing options...
bpjacobsen Posted March 15, 2015 Author Share Posted March 15, 2015 Well, I'm finally done! Thanks again for sticking with me on this and your patience.. You rock!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.