Sun Jul 29, 2012 12:45 am by augustf
To address this issue on the transcoded AVI's on my server, I adapted the Perl script Illico so kindly provided for my Ubuntu 12.04 box:
- Code:
#!/usr/bin/perl
use strict;
my $args = '';
foreach my $arg (@ARGV) {
$args = $args . "\"$arg\" ";
}
if ($args =~ /^(.*)\s\"mpeg2video\"\s(.*)$/) {
$args = $1 . ' "mpeg2video" "-vf" "pad=max(iw\,ih*16/9):max(ih\,iw/16*9):(ow-iw)/2:(oh-ih)/2:blue,setdar=4:3" ' . $2;
}
my $cmd = "/usr/bin/ffmpeg-serviio $args";
open(LOGFILE, ">>/var/log/ffmpeg-wrapper.log");
if (system($cmd) != 0) {
print LOGFILE scalar localtime . " Failed: " . $cmd . " with $?\n";
close (LOGFILE);
die "Failed\n";
} else {
print LOGFILE scalar localtime . " Success: " . $cmd . "\n";
close (LOGFILE);
}
I renamed my compiled ffmpeg to ffmpeg-serviio and named the Perl script /usr/bin/ffmpeg. Perhaps I misunderstood how this would work, but it didn't seem to have any effect on the files I have when played on my Sony KDL-46NX720, such as this one:
- Code:
ffmpeg version N-42368-gbf53863 Copyright (c) 2000-2012 the FFmpeg developers
built on Jul 26 2012 19:36:00 with gcc 4.6.3
configuration: --enable-static --disable-shared --bindir=/tmp/ffmpeg --disable-ffplay --disable-ffserver --enable-pthreads --disable-mmx --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-librtmp --pkg-config=pkg-config
libavutil 51. 64.100 / 51. 64.100
libavcodec 54. 33.100 / 54. 33.100
libavformat 54. 15.102 / 54. 15.102
libavdevice 54. 1.100 / 54. 1.100
libavfilter 3. 1.100 / 3. 1.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, avi, from 'Penn & Teller; Bullshit! - (1-01) - Talking to the Dead.avi':
Metadata:
encoder : Nandub v1.0rc2
Duration: 00:26:05.79, start: 0.000000, bitrate: 1246 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (XVID / 0x44495658), yuv420p, 576x432 [SAR 1:1 DAR 4:3], 29.97 tbr, 29.97 tbn, 29.98 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, s16, 112 kb/s
I also tested this same video on my Sony BDP-S580, and that worked exactly correctly, which I expected as the format is natively supported there.