QNAP zum Transkodieren des Dreambox streams

  • Hallo zusammen,


    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:


    Code
    adduser - 1.10.3-1 - a multi-call binary for login and user account administrationavahi - 0.6.30-1 - A system for multicast DNS service discovery, an implementation of Zeroconf.bash - 3.2.49-1 - A bourne style shellbinutils - 2.17-2 - The GNU assembler and linker and related toolscoreutils - 8.4-1 - Bunch of heavyweight *nix core utilitiesdbus - 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 filesexpat - 2.0.1-1 - XML Parser libraryfaad2 - 2.6-3 - Freeware Advanced Audio Coderffmpeg - 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 libraryfribidi - 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 ipkglame - 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, FIlibdaemon - 0.14-1 - A lightweight C library that eases the writing of UNIX daemons.libdb - 4.2.52-3 - Berkeley DB Librarieslibdvbpsi - 0.1.5-1 - A simple library designed for decoding and generation of MPEG TS and DVB PSI tables.libdvdnav - 0.1.10-1 - dvdnavlibdvdread - 0.9.7-2 - library for reading dvdlibebml - 1.0.0-1 - Extensible Binary Meta Language access librarylibid3tag - 0.15.1b-1 - The library used for ID3 tag readinglibmad - 0.15.1b-4 - MPEG Audio Decoder librarylibmatroska - 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 Librarylibogg - 1.2.1-1 - Ogg is a multimedia container format.libpng - 1.2.44-1 - Portable Network Graphics Librarieslibshout - 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++ programslibtheora - 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 bridlibvorbis - 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 librarymake - 3.82-1 - examines files and runs commands necessary for compilationnano - 2.2.6-1 - A pico like editorncurses - 5.7-3 - NCurses librariesncurses-dev - 5.7-3 - NCurses libraries, header filesncursesw - 5.7-2 - NCurses libraries with wide char supportopenssl - 0.9.8v-2 - Openssl provides the ssl implementation in libraries libcrypto and libssl, and is needed by many other applications and librariperl - 5.10.0-6 - Practical Extraction and Report Language.pkgconfig - 0.15.0-2 - Package configuration toolrcs - 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 arespeex - 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 superusertaglib - 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.


    Code
    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 :D
    Viele Grüße,
    miracoli

  • Über welche Endgeräte im LAN bzw. über VPN willst du den Stream abfragen? Ich mache es übers ipAd bzw. iphone im LAN über die APP Blackbox Live! Über VPN funktioniert es auch wenn es der Upload gerade zulässt!


    Auf welches Format transkodierst du? Wie ist die Prozessorlast dabei?

  • Hi,


    in dem Beispiel ist es MPEG4-Video (mp4v) und normales MPEG-Audio (mpga), siehe auch https://wiki.videolan.org/Codec/.
    Das hier noch Verbesserungsbedarf besteht ist mir klar, aber die ziemlich alten Versionen von VLC und ffmpeg die man über ipkg installieren kann sind da nicht gerade das Optimum.


    Bis jetzt habe ich es nur mal kurz von der Arbeit aus per VPN mit einem Laptop probiert. Mit einem Iphone könnte ich es auch mal testen.
    Da ich nur sehr wenig Upload habe kommt bei mir nur eine Lösung mit Transkodieren in Frage. Im WLAN gehts natürlich auch mit Apps wie Blackbox Live!


    Die Prozessorlast war bei ca. 70%, aber ich kann ja nochmal genau schauen wenn ich andere Codecs probiere.


    VG