Löve to Video file

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
1u4
Prole
Posts: 16
Joined: Tue May 01, 2012 6:27 am
Location: Oh no, not Finland!

Löve to Video file

Post by 1u4 »

Is there a way löve can record a user session (like a game play) to a video file -- Basically a record mode -- like how screen cast software does?

I'm currently looking into how to do a screen cap of a löve sessin with mplayer or ffmpeg, but just thought you might have a better idea.

Thanks.
There is a story of a farmer whose horse ran away. That evening the neighbors gathered to commiserate with him since this was such bad luck.
He said, "May be." Continued...
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Löve to Video file

Post by Robin »

Not really, no.
Help us help you: attach a .love.
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Löve to Video file

Post by coffee »

LOVE Framework don't have even movie playback capability. You can create however some timed function for take screenshots. I never tested this to check what potential or how fast this method can be.
https://love2d.org/wiki/love.graphics.newScreenshot.

You can and should use without problem third-party apps for recording your videogame plays of course.
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Löve to Video file

Post by Lafolie »

You want to record "love sessions"? Sounds a bit saucy to me.

You could save a screenshot every x ticks, but that's not a good idea.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
User avatar
1u4
Prole
Posts: 16
Joined: Tue May 01, 2012 6:27 am
Location: Oh no, not Finland!

Re: Löve to Video file

Post by 1u4 »

Just realised I can execute linux commands through love. I'm seeing if I can take that snapshot you suggested and pipe it to ffmpeg -- since ffmpeg can create a video from images.
There is a story of a farmer whose horse ran away. That evening the neighbors gathered to commiserate with him since this was such bad luck.
He said, "May be." Continued...
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Löve to Video file

Post by kikito »

Given that you are going to use external tools anyway, why don't you use a regular screen capturing program, like those used for creating screencasts?
Last edited by kikito on Mon May 21, 2012 12:59 pm, edited 1 time in total.
When I write def I mean function.
User avatar
1u4
Prole
Posts: 16
Joined: Tue May 01, 2012 6:27 am
Location: Oh no, not Finland!

Re: Löve to Video file

Post by 1u4 »

kikito wrote:Given that you are going to use external tools anyway, why don't you use a regular screen capturing software, like those used for creating screencasts?
...because I want to know how it works :) ...but also because looking at the apps in Linux, it may be tricky to just capture the window area and I think I would still manually have to add sound. It would be nice to automate the whole process ;)

Anyway, here's the ffmpeg code that will grab a stream of images from the disk with a little automation...

Code: Select all

	f = io.popen("ffmpeg -r 10 -b 1800 -i /home/asdf/dev/projects/love-dev/os-call/%03d.jpg /home/asdf/Desktop/love-test-1800.mp4")
	f:close()
There is a story of a farmer whose horse ran away. That evening the neighbors gathered to commiserate with him since this was such bad luck.
He said, "May be." Continued...
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

Re: Löve to Video file

Post by nevon »

1u4 wrote: also because looking at the apps in Linux, it may be tricky to just capture the window area and I think I would still manually have to add sound. It would be nice to automate the whole process ;)
Just use Kazam. It allows you to record a portion of your screen, and it can also record any pulseaudio stream.
User avatar
1u4
Prole
Posts: 16
Joined: Tue May 01, 2012 6:27 am
Location: Oh no, not Finland!

Re: Löve to Video file

Post by 1u4 »

nevon wrote:
1u4 wrote: also because looking at the apps in Linux, it may be tricky to just capture the window area and I think I would still manually have to add sound. It would be nice to automate the whole process ;)
Just use Kazam. It allows you to record a portion of your screen, and it can also record any pulseaudio stream.
Thanks for introducing me to Kazam. I'll be using that quite a lot.
There is a story of a farmer whose horse ran away. That evening the neighbors gathered to commiserate with him since this was such bad luck.
He said, "May be." Continued...
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Löve to Video file

Post by Davidobot »

Don't forget about fraps and cam studio!
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests