ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Video-Capture-V4l/examples/mp2enc
Revision: 1.1
Committed: Fri May 5 20:21:53 2000 UTC (26 years, 4 months ago) by pcg
Branch: MAIN
CVS Tags: rel-0_9, rel-0_902, HEAD
Log Message:
Initial check-in

File Contents

# User Rev Content
1 pcg 1.1 #!/usr/bin/perl
2    
3     use Video::Capture::V4l;
4     use Video::RTjpeg;
5    
6     $|=1;
7     $SIG{PIPE} = 'IGNORE';
8    
9     $stream = "/tmp/vstream";
10     require $stream;
11    
12     my $mode = $channels > 1 ? "s" : "i";
13     my $br = 192;
14    
15     $audioencode = "/root/cvt/mpeg_movie-1.6.0/audio_in/encode";
16     $ENV{MPEGTABLES} = "/root/cvt/mpeg_movie-1.6.0/audio_in/tables";
17    
18     system "dd", "if=$outprefix.a", "of=$outprefix.pcm", "conv=swab";
19    
20     open ENC, "| $audioencode" or die;
21     print ENC <<EOF;
22     $outprefix.pcm
23     $outprefix.mp2
24     $rate
25     2
26     $mode
27     1
28     $br
29     n
30     n
31     n
32     n
33     n
34     n
35     EOF
36     close ENC;
37    
38     exit;
39     unlink "$outprefix.pcm";
40