Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Thu Nov 21, 2024 8:18 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: video capture plugin
Thanked: 2 time(s)  Unread post Posted: Wed Jul 18, 2012 11:32 pm 
Lifetime VIP Contributor
Lifetime VIP Contributor
User avatar



Joined: Tue Nov 23, 2010 10:51 am
Posts: 213
Location: Pandora
Been thanked: 101 time(s)
Has thanked: 66 time(s)
Contribution Points: 8650
capture video using BlueEye!
  • not designed for fullscreen games; use windowed modes
  • if you get errors, try:
    • turn framerate down
    • limit capture area
    • scale it down
    • make shorter videos
    • try a different temp format
  • please report errors that you can't correct
  • if you don't have h.264 decoder on your PC or your player won't play .mp4's, get VLC

you need ffmpeg and the plugin to use plugin is in plugin suite - see link in sig

ffmpeg install instructions
  1. download the latest static build for your OS (x86 or x64, link above)
  2. extract ffmpeg archive using 7-Zip
  3. move "\bin\ffmpeg.exe" to your "\Blue Eye Macro" folder
    - OR -
    the all-in-one updater can walk you through it

you're all set. try the sample macro:
Code:
 begin
     Speech.Say("Ready", "no")
     // activate window you want to record during pause
     Macro.Pause("2000")
     Speech.Say("Begin", "No")
     Window.Get active window id("active")
     // if active window maximized, record whole screen
     if  Window.State is maximized("{active}", "no")
          begin
               Variable.Set("x1", "0")
               Variable.Set("y1", "0")
               System.Get primary screen resolution("x2", "y2")
          end
     // else capture the current application only
     if  Variable.Does not exist("x1")
          begin
               Window.Get location("{active}", "no", "no", "x1", "y1")
               Window.Get size("{active}", "no", "w", "h")
               Variable.Evaluate (Math)("{x1} + {w}", "x2")
               Variable.Evaluate (Math)("{y1} + {h}", "y2")
          end
     Plugins.Video capture("C:\Temp", "my_video[New features demo]{sickslug}", "30g+h}", "100", "1", "{x1}", "{y1}", "{x2}", "{y2}", "10", "3")
     // after it records, ffmpeg.exe will mux in the background!
     // depending on video complexity it can take longer than capturing
     // don't touch the file until cpu usage is back to normal
     Speech.Say("Muxing", "no")
 end
 

Image


Attachments:
File comment: this was made with the settings in the sample macro above... quicktime is buggy in the browser!!!! recommend you download video instead

[ Play Quicktime file ] my_video.mp4 [ 973.09 KiB | Viewed 9594 times ]


Last edited by sickslug on Sat Nov 17, 2012 5:02 am, edited 11 times in total.
Top
 Profile  
Reply with quote  
 Post subject: Re: video capture plugin
Thanked: 1 time(s)  Unread post Posted: Thu Jul 19, 2012 6:01 am 
Lifetime VIP Contributor
Lifetime VIP Contributor
User avatar



Joined: Tue Nov 23, 2010 10:51 am
Posts: 213
Location: Pandora
Been thanked: 101 time(s)
Has thanked: 66 time(s)
Contribution Points: 8650
read on for details or troubleshooting

    newest changes
  • audio
  • manual mux
  • change pointer size
  • highlight pointer
  • remove pointer
  • move capture area to follow mouse
  • choose color for pointer highlighter
  • center capture area on mouse
  • change playback speed (ie capture@30fps, playback@60)
  • fade in/out options
  • title display
  • author display
  • custom cursor

    more i'd like to add:
  • stream directly to ffmpeg (if possible)
  • secondary audio track ("what you hear" recording will always depend on your sound card/drivers/sound settings)
  • save thumbnail to video file (or a .bat that can be customized)
  • directx input
  • default .bat creation when "manual" option used
  • blur background
  • more audio effects

thought i'd post something about performance so you have an idea what it's supposed to look like. you may notice slight lag when running a game and recording at the same time, rest of time it seems pretty smooth. if you reduce the area it's capturing or turn down the framerate it should improve as well

temp files go in your temp directory (c:\users\user\appdata\local\temp\ for me in Win7). the most important part of using this is not to touch the output video until muxing is complete. normally files are locked while being written to but because of the asynchronous ffmpeg writes that isn't dependable. wait till your CPU usage returns to normal before watching. temp files will be up to 800KB per frame depending on capture size, compression, and format. option 101 (png files) seems to save the most disk space, but the video turns out dim, as does option 102 (bmp files), which takes Rediculous amounts of hard drive space and is never recommended

the plugin cannot clear the temp files afterward because muxing takes place after the plugin finishes. i don't want the macro to wait on it since it would appear frozen and you couldn't tell when capturing is complete. you can delete the temp files manually if you want, but next run it will clear it on its own (you can also record a 0 second video after a long one to cleanup; it'll record 4 frames and delete old data)

also, do not cross streams (capturing while muxing) or you'll cut your first video short. it will be playable but short

if you want to squeeze extra smoothness into recording a game you might try setting the game's processor affinity to 1 or 2 cores, assign BEM to the others, and give the game an elevated process priority. if disk write is an issue you might try a ramdisk or turning write caching on in drive properties

you can try rerendering the video before you run the plugin again (calling plugin in a macro again will wipe files). try this at a command prompt, changing the paths and fps (where i have 24) as needed
tip: you can insert different audio as well as speed up/slow down video using this command as well! choose the manual option to skip automuxing and just run commands like this with your own options
Code:
"C:\Program Files (x86)\Blue Eye Macro\ffmpeg.exe" -f image2 -r 24 -i C:\Users\User\AppData\Local\Temp\%06d.jpg -i C:\Users\User\AppData\Local\Temp\audio.wav C:\temp\output.mp4
    command rundown
  • path of ffmpeg.exe is in quotes because it contains spaces. paths in arguments should not have quotes
  • if you still want to put this in a batch file, put it somewhere without spaces in path
  • [-r {number}] specifies the framerate you want the video to play at. set to fps of capture macro for 1:1 playback
  • the first [-i {path}] specifies the filenames of the source images
  • the second [-i {path}] specifies the audio file to include. you ought to be able to swap in a music file (or skip it to exclude sound)
  • the output file suffix (like .mp4) can be changed. .flv works fine, i wouldn't recommend .avi. there are more options depending on your machine's codecs


Attachments:
File comment: desktop capturing - note the format of command has changed
prof.png
prof.png [ 51.65 KiB | Viewed 9647 times ]
File comment: full motion capturing - note the format of command has changed
prof2.png
prof2.png [ 43.28 KiB | Viewed 9647 times ]


Last edited by sickslug on Thu Jul 26, 2012 11:43 am, edited 11 times in total.
Top
 Profile  
Reply with quote  
 Post subject: Re: video capture plugin
Thanked: 1 time(s)  Unread post Posted: Thu Jul 19, 2012 6:48 am 
Lifetime VIP Contributor
Lifetime VIP Contributor
User avatar



Joined: Mon Sep 26, 2011 9:38 am
Posts: 1703
Location: Space Australia
Been thanked: 78 time(s)
Has thanked: 6 time(s)
Contribution Points: 9994
Holy crap when the heck did you find the time to do this...

Anyway... About the sound and full screen heres what i would do

  • Fullscreen
    Id make use of gigus's directx hook dll... Theres gotta be someway for you to implement it
  • Sound
    I would most likely bodge job it using the output as the input on microsofts built in recording software... But you know your way seems to work

_________________
ImageImageImageImage
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: video capture plugin
Thanked: 1 time(s)  Unread post Posted: Thu Jul 19, 2012 11:02 am 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4525
Been thanked: 1346 time(s)
Has thanked: 133 time(s)
Contribution Points: 33209
Very very cool.

Nice job!

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
 Post subject: Re: video capture plugin
Thanked: 0 time(s)  Unread post Posted: Thu Jul 19, 2012 5:30 pm 
Lifetime VIP Contributor
Lifetime VIP Contributor
User avatar



Joined: Tue Nov 23, 2010 10:51 am
Posts: 213
Location: Pandora
Been thanked: 101 time(s)
Has thanked: 66 time(s)
Contribution Points: 8650
@dragonfiend thanks for your ideas! i've stayed away from directX because i don't want to hurt BE's stealth. maybe i'll make it optional in the 3 plugins that read from screen... something like fraps ought to have an edge in performance anyway if someone is trying to record 3d games. i mostly had in mind recording videos about making macros and such ;)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group