Actually, this isn't hard to do, at least if you're running Linux. You can probably do something similar on Windows too, but I don't know how.
Install unrar
Install ffmpeg
Make symbolic links to these in the Subsonic transcode folder.
Log in to the Subsonic interface as an admin.
Add a new transcoding in Settings -> Transcoding -> Add transcoding.
Convert from: rar
Convert to: flv
Step one:
- Code: Select all
unrar p -inul %s
Step two:
- Code: Select all
ffmpeg -ss %o -i pipe:0 -async 1 -b %bk -ar 44100 -ac 2 -v 0 -f flv -vcodec libx264 -preset superfast -threads 0 -
Go to Settings -> General and add " rar" to Video files to make it recognize the .rar files.
You might want to add " -s %wx%h" in step two (before the last dash (-)) if you're using a mobile device, to lower the resolution. The problem with this is that it seems to screw up the aspect ratio, but that's another thread's problem.
This extracts the rar archive, outputs the content to stdout, pipes it to ffmpeg which transcodes it and output the finished video to the player.
It will probably work with compressed archives too, I haven't tried.
However, you can not skip in the video. You have to start at the beginning each time.
You can use Subsonic's drop down menu to skip, but this takes some time, and I suspect it transcodes everything from the beginning up to that point. Heavy load on the server.
Happy videoing!
Edit:
It seems you can skip in the video, if you don't skip too far.
As soon as you start playing, the server starts transcoding, and don't stop until everything is done. As long as you don't jump further than the transcoding has gotten, it works.
I also added " -s 640x360" to my step two, to lower the resolution and set the aspect ratio to 16:9, which most my videos are.