[ClientMod] Automatically take screenshots [record]

red-001
Member
Posts: 205
Joined: Tue Jan 26, 2016 20:15
GitHub: red-001
IRC: red-001

[ClientMod] Automatically take screenshots [record]

by red-001 » Post

This mod automatically takes screenshots for making timelapses
Usage - Chatcommands
  • .start <delay> ; command for starting a timelapse, delay is optional if not set it's set to 20 seconds or the last value used.
  • .stop ; Stops taking a timelapse
Usage - Creating a timelapse from the images
If you are on linux and have ffmpeg installed you can use this to generate a timelapse with 10 different images being displayed a second

Code: Select all

cat *.png | ffmpeg -r 10 -f image2pipe -i - timelapse.mp4
Example timelapse
Image
Get
github
Download
Warning! No matter what you are doing don't set delay to a value lower then 1 and it's not recommended you set it to anything lower then 10
Last edited by red-001 on Sun Jun 11, 2017 08:47, edited 1 time in total.

User avatar
the_raven_262
Member
Posts: 343
Joined: Mon Sep 22, 2014 09:30
GitHub: theraven262
IRC: [Discord unfortunately] corvus262

Re: [ClientMod] Automatically take screenshots [record]

by the_raven_262 » Post

Minetest gifs incoming.
I guess it can't go really wrong.

User avatar
TumeniNodes
Member
Posts: 2943
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [ClientMod] Automatically take screenshots [record]

by TumeniNodes » Post

WOW! This is really cool red!
a csm with positive features..., who knew? :P
A Wonderful World

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: [ClientMod] Automatically take screenshots [record]

by ExeterDad » Post

+100
One of the neatest things I've seen yet! Nice work :D

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: [ClientMod] Automatically take screenshots [record]

by Nathan.S » Post

Cool, nice work. I'll probably try this out.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

u19318

Re: [ClientMod] Automatically take screenshots [record]

by u19318 » Post

Pretty cool.

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [ClientMod] Automatically take screenshots [record]

by texmex » Post

That's interesting! Perhaps ffmpeg can be tweaked to output GIFs directly?

red-001
Member
Posts: 205
Joined: Tue Jan 26, 2016 20:15
GitHub: red-001
IRC: red-001

Re: [ClientMod] Automatically take screenshots [record]

by red-001 » Post

probably but I don't know much about ffmpeg.

BBmine
Member
Posts: 3476
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins
Location: USA

Re: [ClientMod] Automatically take screenshots [record]

by BBmine » Post

Really good news for Youtubers like me!

BBmine
Member
Posts: 3476
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins
Location: USA

Re: [ClientMod] Automatically take screenshots [record]

by BBmine » Post

Wait, not lower than 1, but not lower than 10 either? #confuzzled.

red-001
Member
Posts: 205
Joined: Tue Jan 26, 2016 20:15
GitHub: red-001
IRC: red-001

Re: [ClientMod] Automatically take screenshots [record]

by red-001 » Post

lower then 10 isn't a great idea but lower then 1 will basically break your client with the amount of lag it will cause.

User avatar
the_raven_262
Member
Posts: 343
Joined: Mon Sep 22, 2014 09:30
GitHub: theraven262
IRC: [Discord unfortunately] corvus262

Re: [ClientMod] Automatically take screenshots [record]

by the_raven_262 » Post

red-001 wrote:lower then 10 isn't a great idea but lower then 1 will basically break your client with the amount of lag it will cause.
Tested it myself, no its not a screen recorder nor it was meant to be.

BBmine
Member
Posts: 3476
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins
Location: USA

Re: [ClientMod] Automatically take screenshots [record]

by BBmine » Post

Too bad. I guess it'd be nice for a timelapse video of the spawn of a server.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [ClientMod] Automatically take screenshots [record]

by azekill_DIABLO » Post

this is awesome! but it would need something to export in video.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
the_raven_262
Member
Posts: 343
Joined: Mon Sep 22, 2014 09:30
GitHub: theraven262
IRC: [Discord unfortunately] corvus262

Re: [ClientMod] Automatically take screenshots [record]

by the_raven_262 » Post

azekill_DIABLO wrote:this is awesome! but it would need something to export in video.
red-001 wrote: If you are on linux and have ffmpeg installed you can use this to generate a timelapse with 10 different images being displayed a second

Code: Select all

cat *.png | ffmpeg -r 10 -f image2pipe -i - timelapse.mp4

BBmine
Member
Posts: 3476
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins
Location: USA

Re: [ClientMod] Automatically take screenshots [record]

by BBmine » Post

I have a question, where does it put the screenshots?

User avatar
Desour
Member
Posts: 1472
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [ClientMod] Automatically take screenshots [record]

by Desour » Post

BBmine wrote:I have a question, where does it put the screenshots?
Afaik it puts them to your screenshot path.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [ClientMod] Automatically take screenshots [record]

by azekill_DIABLO » Post

the_raven_262 wrote:
azekill_DIABLO wrote:this is awesome! but it would need something to export in video.
red-001 wrote: If you are on linux and have ffmpeg installed you can use this to generate a timelapse with 10 different images being displayed a second

Code: Select all

cat *.png | ffmpeg -r 10 -f image2pipe -i - timelapse.mp4
yes, but .. okay i'm on windows that why i ask...
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

BBmine
Member
Posts: 3476
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins
Location: USA

Re: [ClientMod] Automatically take screenshots [record]

by BBmine » Post

azekill_DIABLO wrote:
the_raven_262 wrote:
azekill_DIABLO wrote:this is awesome! but it would need something to export in video.
red-001 wrote: If you are on linux and have ffmpeg installed you can use this to generate a timelapse with 10 different images being displayed a second

Code: Select all

cat *.png | ffmpeg -r 10 -f image2pipe -i - timelapse.mp4
yes, but .. okay i'm on windows that why i ask...
Just get Linux xP

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [ClientMod] Automatically take screenshots [record]

by azekill_DIABLO » Post

i have a linux, i'm just too lazy to transfer the files xD

hey, also, i did a simpler version of this which takes 10-11 screenshots per second! works well! (with a small res, 1 hour of video== 1GB)
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

BBmine
Member
Posts: 3476
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins
Location: USA

Re: [ClientMod] Automatically take screenshots [record]

by BBmine » Post

azekill_DIABLO wrote:i have a linux, i'm just too lazy to transfer the files xD

hey, also, i did a simpler version of this which takes 10-11 screenshots per second! works well! (with a small res, 1 hour of video== 1GB)
How'd you do that?? Did you do .start 0.1?

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [ClientMod] Automatically take screenshots [record]

by azekill_DIABLO » Post

BBmine wrote:
azekill_DIABLO wrote:i have a linux, i'm just too lazy to transfer the files xD

hey, also, i did a simpler version of this which takes 10-11 screenshots per second! works well! (with a small res, 1 hour of video== 1GB)
How'd you do that?? Did you do .start 0.1?
my code is simple...
i started a loop with register_globalstep and then i made it take a screenshot at everystep (every 0.1 approx)

it's not the code from the mod but it's highly inspired from ti!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
mnh48
Member
Posts: 310
Joined: Wed Nov 16, 2016 22:55
GitHub: mnh48
IRC: MNH48
In-game: mnh48
Location: Kuala Lumpur, Malaysia
Contact:

Re: [ClientMod] Automatically take screenshots [record]

by mnh48 » Post

azekill_DIABLO wrote:
the_raven_262 wrote:
azekill_DIABLO wrote:this is awesome! but it would need something to export in video.
red-001 wrote: If you are on linux and have ffmpeg installed you can use this to generate a timelapse with 10 different images being displayed a second

Code: Select all

cat *.png | ffmpeg -r 10 -f image2pipe -i - timelapse.mp4
yes, but .. okay i'm on windows that why i ask...
Get the windows build of ffmpeg from here: https://ffmpeg.zeranoe.com/builds/
(That build is linked from ffmpeg official website, so it should be reliable enough)
Choose "Release build", then choose which bit your Windows is using, and choose Static, then click "Download Build"

Extract the downloaded zip file to somewhere and please note the full path to the bin folder
Go to the folder containing all images that you want to use, move any images you don't want out from the folder
Click on that bar that wrote current path, write cmd and enter
Now, command prompt will start with current path set as default, run this command:

Code: Select all

type *.png | "<path to ffmpeg bin folder>\ffmpeg.exe" -r 10 -f image2pipe -i - timelapse.mp4
For example on my end I set to 5 picture per 1 second and output as timelapse2.mp4:

Code: Select all

type *.png | "V:\Programs\ffmpeg-4.0.1-win64-static\bin\ffmpeg.exe" -r 5 -f image2pipe -i - timelapse2.mp4
You ask, what is "type"? Read here: https://en.wikipedia.org/wiki/TYPE_(DOS_command)

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [ClientMod] Automatically take screenshots [record]

by Linuxdirk » Post

Why not simply record with OBS and set frame rate for the video to 5 FPS?

User avatar
mnh48
Member
Posts: 310
Joined: Wed Nov 16, 2016 22:55
GitHub: mnh48
IRC: MNH48
In-game: mnh48
Location: Kuala Lumpur, Malaysia
Contact:

Re: [ClientMod] Automatically take screenshots [record]

by mnh48 » Post

Linuxdirk wrote:Why not simply record with OBS and set frame rate for the video to 5 FPS?
I'm just telling them how to do it in that way if they want, and the 5FPS is just my testing to ensure the command actually worked...

I personally use my screenshot tool which could also capture GIF and short MP4...
Image

For a long video, I use OBS as usual...
OBS is indeed very useful for recording and especially for streaming, I could put almost anything I want into it, including dynamic text files.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest