linux server transcoding: experts page

General discussion about the media server. Feature requests. Hints, tips and tricks.
Locked
23646266
Posts:12
Joined:Wed Dec 20, 2006 10:43 pm
AV Hardware:Mac Pro, Macbook Pro: 10.6.3, ATV 3.0.1, Soundbridge, Noxon2,
Apple iPhone, iPad, Sony Bravia, FritzBox, Fritz!Media,
debianized LS-GL2, debianized TS-219P, XBMC, Boxee, SimplifyMedia
linux server transcoding: experts page

Post by 23646266 » Sun Jun 06, 2010 6:03 pm

Hello forum,

currently I'd like to setup my tms servers, to fully support transcoding to all my media clients.
So I want to collect the community' expertise to make it real for me and others.

This thread will hopefully collect all the information to setup video conversion's on the fly for linux servers.

greetz

=:-)f

23646266
Posts:12
Joined:Wed Dec 20, 2006 10:43 pm
AV Hardware:Mac Pro, Macbook Pro: 10.6.3, ATV 3.0.1, Soundbridge, Noxon2,
Apple iPhone, iPad, Sony Bravia, FritzBox, Fritz!Media,
debianized LS-GL2, debianized TS-219P, XBMC, Boxee, SimplifyMedia

Re: linux server transcoding: experts page

Post by 23646266 » Sun Jun 06, 2010 6:26 pm

my environment:

debian linux on a buffalo linkstation ls-gl2 and on a qnap ts-219p. I am concentrated on the qnap for now.

the clients are: an iphone, a ipad, fritz!media, sony bravis tv, chrome,safari and firefox webbrowsers.

QNAP TS-219P (debianized):

for transcoding of my media I need some utilities I got from here:

Code: Select all

http://www.debian-multimedia.org
So I changed the /etc/apt/sources.list, where I added this lines:

Code: Select all

## kirkwood multimedia
deb http://www.debian-multimedia.org squeeze main non-free
the I installed ffmpeg after importing the keyring needed for the new packages-site with:

Code: Select all

apt-get update
apt-get install debian-multimedia-keyring
apt-get install transcode 
apt-get install ffmpeg
apt-get install lame
apt-get install handbrake-cli
apt-get install vlc
Now, I think the server has most of the tools i'll ever need for conversion installed :-)

Inside the twonky server installation directory, there is the cgi-bin/ hosting all the transcoding

Code: Select all

root@st3server:/usr/local/twonkymedia/cgi-bin# ls
any2mp3.location  convert-jpeg.desc    ffmpeg-avi-flv.desc    ffmpeg-mov-flv.desc  
ffmpeg-msdvr-mpeg.desc   flac.location     flac-wav.desc    jpeg-scale.desc   thumbs-jpeg.desc
any-mp3.desc	  convert.location     ffmpeg-divx-mpeg.desc  ffmpeg-mp4-flv.desc  ffmpeg-msvideo-flv.desc 
cgi-jpegscale	  convert-readme.txt   ffmpeg-flv-mpg.desc    ffmpeg-mpg-flv.desc  ffmpeg-ts-mp4.desc	   
convert		  ffmpeg-asf-flv.desc  ffmpeg.location	      ffmpeg-mpg-wmv.desc  ffmpeg-wmv-flv.desc	    
first, the *.location files have to be edited, so the correct path for the binaries is defined
the location for each of the programs i determined with the unix command 'which'

Code: Select all

root@st3server:/usr/local/twonkymedia/cgi-bin# which ffmpeg
/usr/bin/ffmpeg
the corresponding 'ffmpeg.location' has to be modified (note, there is NO trailing '/' for the path)

Code: Select all

root@st3server:/usr/local/twonkymedia/cgi-bin# cat ffmpeg.location 
/usr/bin
this has to be done for all the *.location files!

Code: Select all

any2mp3.location  convert.location  ffmpeg.location  flac.location
the '*.desc' files describe how to transcode one filetype to an other during transcoding. The most important for now will be 'ffmpeg-ts-mp4.desc' for the ipad/iphone transcoding.

Code: Select all

root@st3server:/usr/local/twonkymedia/cgi-bin# cat ffmpeg-ts-mp4.desc
# transcode quicktime video to MP4 H264 video
#(c) 2009 by PacketVideo
exec: ffmpeg -threads 2 -i $infile -vcodec libx264 -b 7500k -refs 1 -bf 3 -acodec libfaac -ac 2 $outfile
# capabilities
from=video/*
to=video/mp4
asynchronous
priority=normal
the technical spec of the ipad, taken from its website:
## iPad Specs
  • # H.264 Video mit bis zu 720p und 30 Bildern pro Sekunde, Main Profile Level 3.1 mit AAC-LC Audio mit bis zu 160 KBit/Sek., 48 kHz,
  • # Stereo-Audio in den Formaten .m4v, .mp4 und .mov;
  • # MPEG-4 Video mit bis zu 2,5 MBit/Sek., 640 x 480 Pixel, 30 Bilder pro Sekunde, Simple Profile mit AAC-LC Audio mit bis zu 160 KBit/Sek., 48 kHz,
  • # Stereo-Audio in den Formaten .m4v, .mp4 und .mov;
  • # Motion JPEG (M-JPEG) mit bis zu 35 MBit/Sek., 1280 x 720 Pixel, 30 Bilder pro Sekunde, Audio im ulaw-Format, PCM-Stereo-Audio im .avi-Format
(WILL BE CONTINUED)

23646266
Posts:12
Joined:Wed Dec 20, 2006 10:43 pm
AV Hardware:Mac Pro, Macbook Pro: 10.6.3, ATV 3.0.1, Soundbridge, Noxon2,
Apple iPhone, iPad, Sony Bravia, FritzBox, Fritz!Media,
debianized LS-GL2, debianized TS-219P, XBMC, Boxee, SimplifyMedia

Re: linux server transcoding: experts page

Post by 23646266 » Tue Jun 08, 2010 12:30 am

Currently the transcoding with ffmpeg didn't work:
'invalid machine instruction' has been displayed, when trying to transcode .flv or .vob's.

I am looking into a different solution: HandBrakeCli.

I discovered some weird issues with the frame rates - so maybe it'l work, maybe not?

[will be continued]

=:-)f

Locked