Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output vidRecorder buffer to file? #81

Open
hendos43 opened this issue Mar 13, 2020 · 3 comments
Open

Output vidRecorder buffer to file? #81

hendos43 opened this issue Mar 13, 2020 · 3 comments

Comments

@hendos43
Copy link

This actually already exists! but i hadnt mentioned it because i wasn't sure about the api/possibly has some bugs.

// run this line to start recording
vidRecorder.start()

// stop recording
vidRecorder.stop()

// set the output video as a source
s0.init({src: vidRecorder.output})

// display the source
src(s0).out()

Originally posted by @ojack in https://github.com/ojack/hydra/issues/26#issuecomment-417385237

Is there a way of taking the video file currently stored in the buffer and simply writing it out to a file? It feels like this would be much more controlled and smoother than taking a screen recording etc. If not, how are you able to produce such smooth and accurate output videos?

Either this, or is there a way to pass some parameters to the screencap(); function something like the saveFrame(); function in Processing for compiling into a video file afterwards? By parameters, I mean something that can suppress the dialog box for path and attribute a file name so that it can be placed in a loop?

I am loving Hydra, thank you for all your work on it!

@hendos43
Copy link
Author

P.S. I'm talking about atom-hydra, actually...

@ojack
Copy link
Member

ojack commented May 29, 2020

Hmmm I have done this locally from atom using the local file system, but haven't added to atom-hydra. The vidRecoder has terrible quality so I was exporting frames similar to in processing; the only thing is that it doesn't run in realtime.

@tonio-m
Copy link

tonio-m commented Jul 25, 2021

@ojack hey olivia, thats just about what I was trying to do. How exactly are you exporting the canvas drawings frame by frame?
Did you use ccapture.js inside some render loop, or had to actually change source code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants