File: mp2enc

package info (click to toggle)
libvideo-capture-v4l-perl 0.224-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 572 kB
  • ctags: 563
  • sloc: ansic: 4,924; perl: 2,746; makefile: 57; sh: 22
file content (40 lines) | stat: -rwxr-xr-x 545 bytes parent folder | download | duplicates (8)
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
32
33
34
35
36
37
38
39
40
#!/usr/bin/perl

use Video::Capture::V4l;
use Video::RTjpeg;

$|=1;
$SIG{PIPE} = 'IGNORE';

$stream = "/tmp/vstream";
require $stream;

my $mode = $channels > 1 ? "s" : "i";
my $br = 192;

$audioencode = "/root/cvt/mpeg_movie-1.6.0/audio_in/encode";
$ENV{MPEGTABLES} = "/root/cvt/mpeg_movie-1.6.0/audio_in/tables";

system "dd", "if=$outprefix.a", "of=$outprefix.pcm", "conv=swab";

open ENC, "| $audioencode" or die;
print ENC <<EOF;
$outprefix.pcm
$outprefix.mp2
$rate
2
$mode
1
$br
n
n
n
n
n
n
EOF
close ENC;

exit;
unlink "$outprefix.pcm";