Record more than 45 seconds of audio or video on the XO laptop

Technology

240Seconds

If you go into the Record activity on the XO laptop, you’ll find that you can only record a maximum of 45 seconds of video and audio. But since almost everything in this little green wonder is written in Python, it’s very easy to fix this. Open up the Terminal activity, cd to /usr/share/activities/Record.activity, and then use su to become root:

$ cd /usr/share/activities/Record.activity
$ su
#

Now, make a backup copy of constants.py:

# cp constants.py constants.py.orig

Open constants.py in vi, and look for these lines:

	DURATION_15 = 15
	DURATION_30 = 30
	DURATION_45 = 45

Add the following line right after the DURATION_45 line (you can put whatever you want instead of 240–this is the number of seconds):

	DURATION_240 =240

Next, find these lines:

	DURATIONS.append(DURATION_15)
	DURATIONS.append(DURATION_30)
	DURATIONS.append(DURATION_45)

And add the following line right after the DURATION_45 line:

	DURATIONS.append(DURATION_240)

Stop the Record activity if it’s already running, restart it, and you’ll now have an option to record for more than 45 seconds.

What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.

Tagged
Discuss this article with the rest of the community on our Discord server!

ADVERTISEMENT

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 16th iteration!

Prices Increase in....

Days
Hours
Minutes
Seconds
FEEDBACK