[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 » Sat Jun 10, 2017 19:38

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: 315
Joined: Mon Sep 22, 2014 09:30
GitHub: theraven262
IRC: the_raven_262 Raven262 Corvus262 corvus
In-game: the_raven_262 Raven262 Nevermore

Re: [ClientMod] Automatically take screenshots [record]

by the_raven_262 » Sat Jun 10, 2017 19:44

Minetest gifs incoming.
I guess it can't go really wrong.
[amber] [conjuration] [warzone] | Why is #minetest-mod-dev so empty?
 

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

Re: [ClientMod] Automatically take screenshots [record]

by TumeniNodes » Sat Jun 10, 2017 20:02

WOW! This is really cool red!
a csm with positive features..., who knew? :P
I'm not your buddy, guy...
 

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

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

Re: [ClientMod] Automatically take screenshots [record]

by Nathan.S » Sun Jun 11, 2017 02:11

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
 

Zurul_HD
Member
 
Posts: 45
Joined: Mon Apr 25, 2016 12:26
Location: Somewhere dark and rainy ...
GitHub: Zurul
IRC: Zurul
In-game: Zurul

Re: [ClientMod] Automatically take screenshots [record]

by Zurul_HD » Sun Jun 11, 2017 12:29

Pretty cool.
Servers i play on: Yggdrasil, Projekt Hirnfrei, IhrFussel's Server.
 

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

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

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

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

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 » Fri Jun 16, 2017 20:05

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: 315
Joined: Mon Sep 22, 2014 09:30
GitHub: theraven262
IRC: the_raven_262 Raven262 Corvus262 corvus
In-game: the_raven_262 Raven262 Nevermore

Re: [ClientMod] Automatically take screenshots [record]

by the_raven_262 » Fri Jun 16, 2017 20:11

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.
[amber] [conjuration] [warzone] | Why is #minetest-mod-dev so empty?
 

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

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

User avatar
the_raven_262
Member
 
Posts: 315
Joined: Mon Sep 22, 2014 09:30
GitHub: theraven262
IRC: the_raven_262 Raven262 Corvus262 corvus
In-game: the_raven_262 Raven262 Nevermore

Re: [ClientMod] Automatically take screenshots [record]

by the_raven_262 » Sat Jun 24, 2017 18:03

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

[amber] [conjuration] [warzone] | Why is #minetest-mod-dev so empty?
 

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

User avatar
DS-minetest
Member
 
Posts: 1026
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [ClientMod] Automatically take screenshots [record]

by DS-minetest » Sun Jun 25, 2017 07:38

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

Afaik it puts them to your screenshot path.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

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

Re: [ClientMod] Automatically take screenshots [record]

by azekill_DIABLO » Sun Jun 25, 2017 12:56

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...
 

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

Re: [ClientMod] Automatically take screenshots [record]

by BBmine » Sun Jun 25, 2017 17:58

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: 7461
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [ClientMod] Automatically take screenshots [record]

by azekill_DIABLO » Mon Jun 26, 2017 15:26

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)
 

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

Re: [ClientMod] Automatically take screenshots [record]

by BBmine » Wed Jun 28, 2017 13:21

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: 7461
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [ClientMod] Automatically take screenshots [record]

by azekill_DIABLO » Wed Jun 28, 2017 13:22

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!
 

User avatar
muhdnurhidayat
Member
 
Posts: 292
Joined: Wed Nov 16, 2016 22:55
Location: Shah Alam, Selangor, Malaysia
GitHub: MuhdNurHidayat
IRC: muhdnurhidayat
In-game: muhdnurhidayat

Re: [ClientMod] Automatically take screenshots [record]

by muhdnurhidayat » Thu Jul 19, 2018 09:26

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)
[ Full signature ] - UTC+8 here, contributing to Minetest Wiki. I'm muhdnurhidayat in IFS (mod), HOMETOWN & others. / Twitter / MT Offtopic ✂️- - - - - -

You just read my profile, right?
Because these few texts of signature only appear on profile page as the texts are cut in signature. xD
 

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

User avatar
muhdnurhidayat
Member
 
Posts: 292
Joined: Wed Nov 16, 2016 22:55
Location: Shah Alam, Selangor, Malaysia
GitHub: MuhdNurHidayat
IRC: muhdnurhidayat
In-game: muhdnurhidayat

Re: [ClientMod] Automatically take screenshots [record]

by muhdnurhidayat » Fri Jul 20, 2018 08:35

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.
[ Full signature ] - UTC+8 here, contributing to Minetest Wiki. I'm muhdnurhidayat in IFS (mod), HOMETOWN & others. / Twitter / MT Offtopic ✂️- - - - - -

You just read my profile, right?
Because these few texts of signature only appear on profile page as the texts are cut in signature. xD
 

Next

Return to Client-side modding



Who is online

Users browsing this forum: No registered users and 0 guests