/usr/share/perl5/SReview/CodecMap.pm is in sreview-common 0.3.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | package SReview::CodecMap;
use strict;
use warnings;
use Exporter 'import';
our @EXPORT_OK=qw/detect_to_write/;
my %writemap = (
'vorbis' => 'libvorbis',
'vp8' => 'libvpx',
'vp9' => 'libvpx-vp9',
'h264' => 'libx264',
'hevc' => 'libx265',
'opus' => 'libopus',
);
open CHECK_FDK, "ffmpeg -hide_banner -h encoder=libfdk_aac|";
if(<CHECK_FDK> !~ /is not recognized/) {
$writemap{aac} = 'libfdk_aac';
}
close CHECK_FDK;
sub detect_to_write($) {
my $detected = shift;
if(exists($writemap{$detected})) {
return $writemap{$detected};
} else {
return $detected;
}
}
1;
|