QNAP transkodiert TV-Stream von der Dreambox

Ich bin gerade dabei meinem QNAP (TS-669L) beizubringen den TV Stream von meiner Dreambox (DM500HD) entgegenzunehem, zu transkodieren und im LAN (und somit über VPN auch im Internet) bereitzustellen.

Da ich hierzu keine einfache Anleitung im Internet gefunden habe, wollte ich meine Erkentnisse hier mit euch teilen, falls jemand auch sowas vorhat.

Schritt 1: Installieren von vlc, ffmpeg und div. codecs über ipkg. Bei mir sind folgende Pakete installiert:

adduser - 1.10.3-1 - a multi-call binary for login and user account administration
avahi - 0.6.30-1 - A system for multicast DNS service discovery, an implementation of Zeroconf.
bash - 3.2.49-1 - A bourne style shell
binutils - 2.17-2 - The GNU assembler and linker and related tools
coreutils - 8.4-1 - Bunch of heavyweight *nix core utilities
dbus - 1.2.16-1 - D-Bus is a message bus system, a simple way for applications to talk to one another.
diffutils - 3.1-1 - contains gnu diff, cmp, sdiff and diff3 to display differences between and among text files
expat - 2.0.1-1 - XML Parser library
faad2 - 2.6-3 - Freeware Advanced Audio Coder
ffmpeg - 0.svn20080409-3 - FFmpeg is an audio/video conversion tool.
flac - 1.2.1-1 - FLAC is a free lossless audio codec. This package contains the codec libraries and the command-line tools flac and metaflac.
freetype - 2.3.6-1 - Free truetype library
fribidi - 0.10.9-1 - An implementation of the Unicode Bidirectional Algorithm (bidi).
gcc - 4.2.1-5 - The GNU Compiler Collection.
gdbm - 1.8.3-4 - GNU dbm is a set of database routines that use extensible hashing. It works similar to the standard UNIX dbm routines.
git - 1.8.4.2-1 - GIT is a directory tree content manager that can be used for distributed revision control.
ipkg-web - 7-7 - A web frontend for ipkg
lame - 3.99.5-1 - LAME is an LGPL MP3 encoder.
liba52 - 0.7.4-1 - a free ATSC A/52 stream decoder.
libc-dev - 2.6.1-5 - libc development files.
libcurl - 7.24.0-1 - Curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FI
libdaemon - 0.14-1 - A lightweight C library that eases the writing of UNIX daemons.
libdb - 4.2.52-3 - Berkeley DB Libraries
libdvbpsi - 0.1.5-1 - A simple library designed for decoding and generation of MPEG TS and DVB PSI tables.
libdvdnav - 0.1.10-1 - dvdnav
libdvdread - 0.9.7-2 - library for reading dvd
libebml - 1.0.0-1 - Extensible Binary Meta Language access library
libid3tag - 0.15.1b-1 - The library used for ID3 tag reading
libmad - 0.15.1b-4 - MPEG Audio Decoder library
libmatroska - 1.0.0-1 - lib to access Matroska (an extensible open standard Audio/Video container format)
libmpcdec - 1.2.6-1 - Portable Musepack decoder library.
libmpeg2 - 0.4.1-2 - A free library for decoding MPEG-2 and MPEG-1 video streams.
libnsl - 2.6.1-4 - Network Services Library
libogg - 1.2.1-1 - Ogg is a multimedia container format.
libpng - 1.2.44-1 - Portable Network Graphics Libraries
libshout - 2.2.2-2 - Library which can be used to write a source client like ices.
libstdc++ - 6.0.9-6 - Standard C++ library, needed for dynamically linked C++ programs
libtheora - 1.1.0-1 - A free and open video compression format from the Xiph.org Foundation.
libupnp - 1.6.6-1 - The Universal Plug and Play (UPnP) SDK for Linux provides support for building UPnP-compliant control points, devices, and brid
libvorbis - 1.3.2-1 - Ogg Vorbis compressed audio format.
libxml2 - 2.7.8-1 - Libxml2 is the XML C parser and toolkit developed for the Gnome project.
lua - 5.1.5-1 - Lua is a powerful light-weight programming language designed for extending applications.
lzo - 2.03-1 - Compression library
make - 3.82-1 - examines files and runs commands necessary for compilation
nano - 2.2.6-1 - A pico like editor
ncurses - 5.7-3 - NCurses libraries
ncurses-dev - 5.7-3 - NCurses libraries, header files
ncursesw - 5.7-2 - NCurses libraries with wide char support
openssl - 0.9.8v-2 - Openssl provides the ssl implementation in libraries libcrypto and libssl, and is needed by many other applications and librari
perl - 5.10.0-6 - Practical Extraction and Report Language.
pkgconfig - 0.15.0-2 - Package configuration tool
rcs - 5.7-2 - The Revision Control System (RCS) manages multiple revisions of files.
readline - 6.1-2 - The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are
speex - 1.2rc1-2 - Speex is an Open Source/Free Software patent-free audio compression format designed for speech.
sudo - 1.8.4.5-1 - System utility to execute commands as the superuser
taglib - 1.6.3-1 - A library for reading and editing the meta-data of several popular audio formats.
vlc - 0.9.9a-2 - VLC is a cross-platform media player and streaming server.
x264 - 0.0.20090220-svn2245-1 - A free library for encoding H264/AVC video streams.
yasm - 1.1.0-1 - Yasm Modular Assembler, currently for x86 or x86_64.
zlib - 1.2.5-1 - zlib is a library implementing the 'deflate' compression system.

Schritt 2: Mit folgendem Konsolenbefehl (über SSH auf der QNAP) das Transkodieren starten, USER muss hierbei durch euren QNAP Usernamen ersetzt werden. 192.168.178.201 ist die IP der QNAP, sie ist deswegen angegeben, damit auch der richtige der beiden LAN Ports verwendet wird. Die URL von der Dreambox stammt aus der Weboberfläche und ist bei mir Pro7. Nach eingabe des Befehls kann man jetzt vom LAN aus mit dem VLC auf den Transkodierten Stream.
Einfach Medien -> Netzwerkstream öffnen und dort http://192.168.178.201:7777/stream eingeben. Die Transkodiereinstellungen und die Stream URl kann man natürlich nach eigenen Vorstellungen anpassen.

su - USER -c '/share/MD0_DATA/.qpkg/Optware/bin/dbus-launch /share/MD0_DATA/.qpkg/Optware/bin/cvlc --vout=dummy --aout=dummy -vv --audio-track=0 -I http --http-host 192.168.178.201:7777 http://dm500hd:8001/1:0:1:445D:453:1:C00000:0:0:0: :sout="#transcode{vcodec=mp4v,vb=320,fps=15,width=320,height=240,acodec=mpga,ab=160,channels=1,
deinterlace,samplerate=44100}:std{access=http,mux=ts,dst=192.168.178.201:7777/stream}"'

Was noch fehlt, ist die Möglichkeit das Programm umzuschalten, sowie die Verwendung von besseren Video-/Audiocodecs. Verbesserungsvorschläge nehme ich gerne entgegen 😀