File: record.js

package info (click to toggle)
freej 0.10git20100110-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 32,080 kB
  • ctags: 22,705
  • sloc: cpp: 156,254; ansic: 25,531; sh: 13,538; perl: 4,624; makefile: 3,278; python: 2,889; objc: 1,284; asm: 1,125; ruby: 126
file content (31 lines) | stat: -rw-r--r-- 918 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/// simple example script for streaming
/// do any action above here and then include the code below to stream
// don't forget to edit it with your streaming authentication

// create a jack audio input
//                    port name     buffer size  samlerate
//audio = new AudioJack("alsaplayer", 2048,        44100);
// in case the port named is not already present:
// you should connect the input manually using jack

// create a video encoder object
//    values 1-100         video quality  video bitrate  audio quality  audio_bitrate
encoder = new VideoEncoder(50,             64000,        0,             0);

kbd = new KeyboardController();
register_controller( kbd );


// add the audio channel in the video encoded
//encoder.add_audio(audio);

//encoder.start_stream();

kbd.pressed_s = function() {
 encoder.stop_filesave();
 delete encoder;
}

kbd.pressed_r = function() {
 register_encoder(encoder);
}