Transcoding

From Twonky

Jump to: navigation, search

Enabling Video Transcoding

Initially, the video format check boxes on the Transcoding page will be greyed out. To enable them, do the following:

For Debian based distros (Ubuntu/Debian/Kbuntu/Xandros/DSL etc)

  • Install ffmpeg: apt-get install libavcodec-unstripped-51 libavdevice-unstripped-52 libavformat-unstripped-52 libavutil-unstripped-49 libpostproc-unstripped-51 libswscale-unstripped-0 ffmpeg

Note: Installing the unstripped libraries as in the above step insures that MKVs will transcode, otherwise the transcode will fail because mpeg2video will be missing. If while running that last command the install fails because of a missing package, do an apt-cache search libavcodec (replace libavcodec with whatever package it says is missing - this way you can see if perhaps you need *-unstripped-52 rather that 51, etc).

  • Open /usr/local/twonkymedia/cgi-bin/ffmpeg.location in your editor and replace c:/ffmpeg with /usr/bin
Note

NOTE:: It is necessary to run the mediaserver in the foreground for transcoding to work properly. If you are using the supplied Twonky startup script, you need to remove the -D from the line around line 94 that reads "$TWONKYSRV -D"

  • Reboot the device: reboot
  • Open the web interface (http:\\MY-SHEEVA-IP:9000) and navigate to the Transcoding page.
  • Check the desired transcoding options.

More on MKV Files

For MKVs to transcode, you need to place a .desc file in twonkymedia's cgi-bin folder.

  • Create the file /usr/local/twonkymedia/cgi-bin/ffmpeg-mkv-mpeg.desc
  • Set the new file's permissions to 644.
  • Inside the file, paste the following:

exec: ffmpeg -threads 2 -i $infile -vcodec mpeg2video -sameq -acodec copy -f vob -copyts -y $outfile

# capabilities

from=video/x-matroska

to=video/mpeg

synchronous

priority=idle

  • On the transcoding page in the web interface, make sure mpeg2 is checked.
  • Restart the media server or reboot the device: reboot

Enabling Audio Transcoding

Twonky Server can transcode audio on-the-fly if your client does not support a specific codec. Most NAS devices are more than capable of transcoding audio with minimal delay. I use FLAC to WAV transcoding to stream lossless audio to my PS3 (which does not support FLAC natively). See here for more details on this (the principle can be used to transcode anything to anything else).

Twonkymedia 5.x Lossless Streaming FLAC to WAV

Personal tools