File: aac_channels.t

package info (click to toggle)
libmedia-convert-perl 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,416 kB
  • sloc: perl: 1,886; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 694 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/perl -w

use strict;
use warnings;

use Test::More;

use_ok("Media::Convert::Asset");
use_ok("Media::Convert::Map");
use_ok("Media::Convert::Pipe");

my $asset = Media::Convert::Asset->new(url => "t/testvids/bbb.mp4");
my $map = Media::Convert::Map->new(input => $asset, type => "channel", choice => "left");
my $output = Media::Convert::Asset->new(url => "./test.mp4", audio_codec => "aac");

eval {
        my $pipe = Media::Convert::Pipe->new(inputs => [$asset], map => [$map], output => $output, vcopy => 1, acopy => 0);
        $pipe->run;
};
if($@) {
        fail("running a map failed");
} else {
        pass("running a map succeeded");
}

unlink("test.mp4");

done_testing;