Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/certik/record
https://github.com/certik/record
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/certik/record
- Owner: certik
- Created: 2009-06-08T05:09:15.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2011-07-11T03:38:45.000Z (over 13 years ago)
- Last Synced: 2024-11-01T07:41:45.707Z (14 days ago)
- Language: C
- Homepage: http://certik.github.com/record
- Size: 154 KB
- Stars: 12
- Watchers: 4
- Forks: 19
- Open Issues: 1
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
Record
------The record.py script uses gtk's "get_from_drawable()" function to take
screenshots and modified alsa's arecord to record the sound.More details how it works:
The arecord and aplay alsa utilities are actually one and the same program, so
it was stripped down, all signals removed, all playback removed, all header
files merged into it, then a "capture_stop" global variable was added, which if
set to 1, the main audio capture loop will end. Then it is called from cython
using nogil in it's own thread and when the user wants to end it, the
"capture_stop" is set to 1. The main python thread takes screenshots in
periodic intervals (15 fps by default) and if it's late, it skips the frame, so
that the next one is on time. All screenshots are saved to the "data" file in
the temporary directory, which is later read and converted to a set of png
images. The audio is saved to a wav file.It is then your job to create a video from it (and to convert sound to any
format you like, like ogg vorbis), it tells you some suggestions (see below).
Also the amplifier.py script is provided to amplify volume of the wav file in
case it is too quiet.Usage
-----Install the following packages in Debian/Ubuntu:
sudo apt-get install python-gtk2 libasound2-dev
and run it:
./record.py
It produces a wav file in the tmp directory (it tells you which) and a set of
png images. It also suggests you exact commands how to create videos from it,
using either mencoder or ffmpeg2theora (it's up to you).In my experience mencoder can't sync the sound and video correctly, while
ffmpeg2theora just works. If the sound is too quiet, use the amplifier.py
utility to amplify the wav file before converting it to ogg or the
"normalize-audio" program (better results) from the Debian package of the same
name (it operates *inplace* on the wav file).Convert to FLV
--------------In order to convert to FLV, so that you can play it with flowplayer (flash
player in the browser), use the script theora2flv.License
-------The arecord.c file is GPL (see alsa-utils for more info), all the other code is
BSD. The package as a whole is GPL due to arecord.c.Flowplayer
----------Example of usage:
flowplayer("player1",
"http://femhub.googlecode.com/svn/trunk/swf/flowplayer-3.1.1.swf",
{
playlist: [
{ url: "lset4.png", autoPlay: true},
{ url: "level-set.flv", autoPlay: false}
]
});