X-Git-Url: http://git.pippins.net/embedvideo/.git/static/git-logo.png?a=blobdiff_plain;f=make_mkv;fp=make_mkv;h=805a7f5d9300de309c0e5a60e6a329a7e439816a;hb=4ad705a6bce59141854f071467f734ee442c544f;hp=04557b5ef788ea6e4aacc6d789a55ed5bf4da795;hpb=1555155d39369b8dbd70c48df16724474d4e8e4b;p=videoscripts%2F.git diff --git a/make_mkv b/make_mkv index 04557b5..805a7f5 100755 --- a/make_mkv +++ b/make_mkv @@ -5,6 +5,7 @@ # Pre-requisites: # mkvtoolnix - http://www.bunkus.org/videotools/mkvtoolnix/ # ffmpeg +# avconv #################################################################################################### # Includes @@ -31,6 +32,8 @@ getopts("svqzt:o:i:h"); if(! defined $opt_t) { &usage(); die "-E- Missing required title: -t \n"; } if(! defined $opt_o) { &usage(); die "-E- Missing required argument output video names: -o <output.mkv>\n"; } if(! defined $opt_i) { &usage(); die "-E- Missing required argument input video names: -i <input,input,...>\n"; } +if(! -x $ffmpeg) { die "-E- Missing required executable for ffmpeg: $ffmpeg\n"; } +if(! -x $avconv) { die "-E- Missing required executable for avconv: $avconv\n"; } sub usage { print "usage: $0 -t <title> -o <output.mkv> -i <input,input,...>\n"; @@ -130,10 +133,10 @@ foreach my $video (sort{$videos{$a} <=> $videos{$b}} keys %videos) { my $video_mkv = $video; print " Detected interlaced video content: $video\n"; # We don't need to do this anymore since it is not an issue with the new mkvmerge - if(0 && $video_ext !~ /mkv/i) { + if($video_ext !~ /mkv/i) { $video_mkv =~ s/\.[^.]*$//; $video_mkv .= ".ffmpeg.mkv"; print " Re-muxing the interlaced video content as an mkv file: $video_mkv\n"; - my $make_mkv_cmd = "$ffmpeg -y -i \"$video\" -scodec copy -acodec copy -vcodec copy -f matroska \"$video_mkv\" >> \"$tmpfile\" 2>&1"; + my $make_mkv_cmd = "$avconv -y -i \"$video\" -scodec copy -acodec copy -vcodec copy -f matroska \"$video_mkv\" >> \"$tmpfile\" 2>&1"; if($opt_v) { print " $make_mkv_cmd\n"; } if(! defined $opt_s) { my $errno = system("$make_mkv_cmd");