File: stream.js

package info (click to toggle)
freej 0.10git20080824-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 13,504 kB
  • ctags: 19,398
  • sloc: ansic: 135,255; cpp: 32,550; sh: 9,318; perl: 2,932; asm: 2,355; yacc: 1,178; makefile: 1,119; java: 136; lex: 94; python: 16
file content (27 lines) | stat: -rw-r--r-- 1,026 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
/// 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(10,             64000,        0,             24000);

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

encoder.stream_host("giss.tv");
encoder.stream_port(8000);
encoder.stream_title("testing new freej");
encoder.stream_username("source");
encoder.stream_password("2t645");
encoder.stream_mountpoint("freej-test.ogg");

register_encoder(encoder);
encoder.start_stream();
//encoder.start_filesave('/mnt/hd1/3/video/luminescenza.ogg');