From: Brian West Date: Sat, 20 Jun 2015 02:48:23 +0000 (-0500) Subject: util to tag and lower vol on vids X-Git-Tag: v1.6.2~410 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21afd1b8c71d4e1d4f985fa70666e37b3b67fe4b;p=thirdparty%2Ffreeswitch.git util to tag and lower vol on vids --- diff --git a/scripts/perl/tag.pl b/scripts/perl/tag.pl new file mode 100755 index 0000000000..78c05ce338 --- /dev/null +++ b/scripts/perl/tag.pl @@ -0,0 +1,32 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use Getopt::Long; +use Data::Dumper; + + +my ($title, $artist, $file, $volume); + +GetOptions( + "title=s" => \$title, + "artist=s" => \$artist, + "file=s" => \$file, + "volume=s" => \$volume + ) or die $@; + +if (-f $file) { + my $tmp = $$; + if ($volume) { + system("avconv -i \"$file\" -vcodec copy -af \"volume=$volume\" /tmp/file$tmp.mp4"); + system("mv /tmp/file$tmp.mp4 \"$file\""); + } + if ($title && $artist) { + system("avconv -i \"$file\" -metadata artist=\"$artist\" -metadata title=\"$title\" -codec copy -vcodec copy /tmp/file$tmp.mp4"); + system("mv /tmp/file$tmp.mp4 \"$file\""); + } + +} else { + print "$file not found.\n"; +} +