OK, I got Chromecast working with Serviio transcoding to matroska while using the "Google AllCast" profile provided by mightymouse2045 earlier in this tread.
It requires a bit of hack, but it works. I saw a similar work around for a different Serviio limitation, check out the following for some related background on the work around:
viewtopic.php?f=11&t=2956&start=30#p34000The work around uses perl and the "ServiioService.exe.vmoptions" file (not sure if the feature to use "Dffmpeg.location" in ServiioService.exe.vmoptions was removed in Serviio version 1.4, but it definitely works in 1.3.1).
- On windows, install ActivePerl -->
http://www.activestate.com/activeperl/downloads (for example in C:\Perl\)
- Edit "ServiioService.exe.vmoptions" file and change the Dffmpeg.location variable to use a ffmpeg wrapper in perl script, like this:
(use your own Serviio install path)
- Code:
-Xmx512m
-Dffmpeg.location="c:\perl64\bin\perl.exe c:\progra~1\Serviio\serviio-ffmpeg.pl"
- Create a perl script for example on "c:\progra~1\Serviio\serviio-ffmpeg.pl" folder path, contains the following code:
- Code:
#!perl
use strict;
my $args = '';
foreach my $arg (@ARGV) {
$args .= "\"$arg\" ";
}
# replaces mpegts with matroska
if ($args =~ /^(.*)\s\"mpegts\"\s(.*)$/) {
$args = $1 . ' "matroska" ' . $2;
}
my $cmd = "\"C:\\Program Files\\Serviio\\lib\\ffmpeg.exe\" $args";
open(LOGFILE, ">>C:\\Program Files\\Serviio\\ffmpeg-wrapper.log");
print LOGFILE scalar localtime . " Starting: " . $cmd . "\n";
if (system($cmd) != 0) {
print LOGFILE scalar localtime . " Failed: " . $cmd . " with $?\n";
close (LOGFILE);
die "Failed\n";
} else {
print LOGFILE scalar localtime . " Succeeded: " . $cmd . "\n";
close (LOGFILE);
}
The above work around has worked for all videos that I've tried: avi, mkv, mp4, mov. Plays both the video and audio in sync with no stuttering of play back.
The only issue that I've seen is the length of the movie is shown at over 347 hours for all movies, so determining how much time is remaining in the movie would be difficult.
It seems ffmpeg has no problems transcoding to matroska and most modern players have no problems playing matroska, I'm not sure why Serviio does not allow it.