Knots

(Bugs & Requests)
(Install)
Line 14: Line 14:
= Knots Server =
= Knots Server =
=== Install ===
=== Install ===
 +
Knots Server can be installed on any *nix based OS like Gnu/Linux, BSD & OSX.
 +
 +
==== Ubuntu ====
 +
* Enable the Multiverse & Universe software sources, and open a root terminal (sudo -s), to install the Ruby Dependencies
 +
 +
''NOTE: This are my currently installed ruby1.8 packages, please remove unneeded packages if they are not required for knots''
 +
 +
apt-get install libactiveldap-ruby1.8 libactivesupport-ruby1.8 libalgorithm-diff-ruby1.8 libao-ruby1.8 libart2-ruby1.8 libatk1-ruby1.8 libbreakpoint-ruby1.8 libbsearch-ruby1.8 libbuilder-ruby1.8 libbz2-ruby1.8 libcairo-ruby1.8 libcgikit-ruby1.8 libcmd-ruby1.8 libcmdparse2-ruby1.8 libdaemons-ruby1.8 libdbm-ruby1.8 libgconf2-ruby1.8 libgdbm-ruby1.8 libgdk-pixbuf2-ruby1.8 libgettext-ruby1.8 libglade2-ruby1.8 libglib2-ruby1.8 libgnome2-ruby1.8 libgnomecanvas2-ruby1.8 libgtk2-ruby1.8 libldap-ruby1.8 liblog4r-ruby1.8 libmmap-ruby1.8 libmocha-ruby1.8 libncurses-ruby1.8 libopenssl-ruby1.8 libpango1-ruby1.8 libreadline-ruby1.8 libredcloth-ruby1.8 libruby1.8 libruby1.8-extras libsqlite3-ruby1.8 libtcltk-ruby1.8 libuconv-ruby1.8 libxml-parser-ruby1.8
 +
 +
* get vlc and a 'unrestricted' ffmpeg build
 +
apt-get install vlc-nox vlc-data libvlccore0 libvlc2 ffmpeg
 +
 +
If you have X on your Knots-Server you can also install the packages "vlc" and "vlc-plugin-pulse" to get a GUI and PulseAudio Output (default ubunu Sound Server) for the vlc Player.
 +
 +
now install these unrestricted ffmpeg libaries (they will remove the restricted builds, if installed)
 +
apt-get install libavcodec-unstripped-51 libavdevice-unstripped-52 libavformat-unstripped-52 libavutil-unstripped-49 libpostproc-unstripped-51 libswscale-unstripped-0
 +
 +
* download and install Knots - Server
 +
 +
Still in the root terminal change to the directory where you want to keep the Server Files (in this example I use /opt/kserver , change the path accordingly) and download & extract Knots - Server :
 +
cd ~/work
 +
wget http://nakkiboso.com/knots/dl.php?file=server
 +
tar xvzf knots_server.tar.gz
 +
 +
That's it! knots is installed under /opt/kserver. Go to First Run now to configure it.
 +
 +
==== Mac OSX ====
 +
'''ToDo''' see http://nakkiboso.com/knots/doc.php
'''ToDo''' see http://nakkiboso.com/knots/doc.php
 +
=== First run ===   
=== First run ===   
'''ToDo'''
'''ToDo'''

Revision as of 09:32, 7 January 2009

Contents

About Knots

Knots is a feature rich GPLv2 Video Streaming Application for Linux, FreeBSD and OS X by Janne Mäkinen. It's written in ruby and uses vlc 0.9.6+ to do the transcoding. Knots can be configured to stream Video Files (any format/codec supported by vlc), DVB-Broadcasts, Custom Playlists or any other media to a Knots-Client on a N700/N8x0 or to any other computer, via the Knots Web-Frontend.

Features

  • Auto Transcode & Stream Videos to a Knots - Client or to the web-frontend.
  • watch Live TV (DVB) with vlc or VDR (incl. EPG & Timer Management)
  • Playlist Support (worldTV99, ect.)
  • Automatic Subtitle fetching for Movies
  • Automatic Thumbnail Generation
  • integrated Search Function


Knots Server

Install

Knots Server can be installed on any *nix based OS like Gnu/Linux, BSD & OSX.

Ubuntu

  • Enable the Multiverse & Universe software sources, and open a root terminal (sudo -s), to install the Ruby Dependencies

NOTE: This are my currently installed ruby1.8 packages, please remove unneeded packages if they are not required for knots

apt-get install libactiveldap-ruby1.8 libactivesupport-ruby1.8 libalgorithm-diff-ruby1.8 libao-ruby1.8 libart2-ruby1.8 libatk1-ruby1.8 libbreakpoint-ruby1.8 libbsearch-ruby1.8 libbuilder-ruby1.8 libbz2-ruby1.8 libcairo-ruby1.8 libcgikit-ruby1.8 libcmd-ruby1.8 libcmdparse2-ruby1.8 libdaemons-ruby1.8 libdbm-ruby1.8 libgconf2-ruby1.8 libgdbm-ruby1.8 libgdk-pixbuf2-ruby1.8 libgettext-ruby1.8 libglade2-ruby1.8 libglib2-ruby1.8 libgnome2-ruby1.8 libgnomecanvas2-ruby1.8 libgtk2-ruby1.8 libldap-ruby1.8 liblog4r-ruby1.8 libmmap-ruby1.8 libmocha-ruby1.8 libncurses-ruby1.8 libopenssl-ruby1.8 libpango1-ruby1.8 libreadline-ruby1.8 libredcloth-ruby1.8 libruby1.8 libruby1.8-extras libsqlite3-ruby1.8 libtcltk-ruby1.8 libuconv-ruby1.8 libxml-parser-ruby1.8 
  • get vlc and a 'unrestricted' ffmpeg build
apt-get install vlc-nox vlc-data libvlccore0 libvlc2 ffmpeg

If you have X on your Knots-Server you can also install the packages "vlc" and "vlc-plugin-pulse" to get a GUI and PulseAudio Output (default ubunu Sound Server) for the vlc Player.

now install these unrestricted ffmpeg libaries (they will remove the restricted builds, if installed)

apt-get install libavcodec-unstripped-51 libavdevice-unstripped-52 libavformat-unstripped-52 libavutil-unstripped-49 libpostproc-unstripped-51 libswscale-unstripped-0 
  • download and install Knots - Server

Still in the root terminal change to the directory where you want to keep the Server Files (in this example I use /opt/kserver , change the path accordingly) and download & extract Knots - Server :

cd ~/work
wget http://nakkiboso.com/knots/dl.php?file=server 
tar xvzf knots_server.tar.gz

That's it! knots is installed under /opt/kserver. Go to First Run now to configure it.

Mac OSX

ToDo see http://nakkiboso.com/knots/doc.php

First run

ToDo

config.yaml

Example Configuration:

--- 
cache: 
 - Video
 - Recordings
vlc: 
 startup_wait: 5
 tmpdir: /var/tmp
 remote_play_options: 
   freetype-effect: 2
   vout: xvideo
   freetype-fontsize: 12
   volume: 100
   fullscreen: ""
 path: /usr/bin/vlc
 resume_rollback: 5
 port_range: 4214-4244
vdr: 
 vdr1: 
   timer_interval_before: 0
   address: 192.168.1.100
   streamdev_port: 3000
   svdrp_port: 2001
   disable_epg: false
   timer_interval_after: 0
   charset: iso-8859-1
   force_charset_conversion: false
   disable_streamdev: false
server: 
 log_level: 2
 name: panta-rhei
 remote_auth: false
 port: 4212
 os: linux
 ip: 192.168.1.100
 bind: eth0
 vdr_charset: iso-8859-1
 service_discovery: 4212
 force_update: false
 auth_timeout: 60
 local_auth: false
 log_append: false
media: 
 extensions: avi,mpg,mpeg,wmv,vdr,img,iso,mkv,vob,flv,mov,nuv,sh
 ffmpeg_path: /usr/bin/ffmpeg
 subtitles: sub,srt
 avfs_extensions: tgz,gz,bz2,zip,rar,arj,uha,lha
transcoding: 
 N800: 
   audio_format: mpga
   resolution: 400x240
   audio_channels: 2
   audio_bitrate: 128
   video_bitrate: 900
   video_format: xvid
 High: 
   audio_format: mp3
   resolution: 608x256
   audio_channels: 2
   audio_bitrate: 128
   video_bitrate: 900
   video_format: xvid
 Flash: 
   stream_extension: flv
   audio_format: mp3
   resolution: 400x300
   audio_rate: 44100
   audio_channels: 2
   audio_bitrate: 128
   video_bitrate: 1000
   mux: ffmpeg{mux=flv}
   video_format: FLV1
categories: 
 TV: 
 - vdr1
 Recordings: 
 - /media/recordings/vdr
 Video: 
 - /media/video

ToDo explain transcoding settings & other config options (Cache, ect)

Extras

  • install wordtv99
./scripts/install_worldtv99
./knots restart 
  • Live-TV (DVB) on Linux without VDR

Scan your channels with dvb-scan using the vdr-format and then create an xml-playlist from it.

(dvb-)scan -o vdr /usr/share/doc/dvb-utils/examples/scan/dvb-t/your_city > /tmp/channels.conf ./scripts/create_dvb_playlist /tmp/channels.conf
./knots restart

You may need to edit ~/.config/knots/dvb.xml to make it work with your dvb-card.

  • Converting non-utf-8 filenames

If you for example have german umlauts that are iso-8859-1 in your filenames, libxml fails to parse them. You can convert them to utf-8 easily (but use at your own risk):

./scripts/fix_filenames
  • Sound in Flash-video

Flash-video (flv) requires mp3 -support. Make sure your ffmpeg is compiled with libmp3lame-support.


Update Knots

Server:

./knots stop
./scripts/update
./knots start

Client:

Connect to server and select 'Check for updates' from the menu

Knots Client

Install

Ruby for Maemo

Add Repository:

Catalogue Name: Ruby1.8 for Maemo
Web address: http://stage.rubyx.co.uk/maemo/
Distribution: diablo
Components: user

Open a terminal & change to root:

apt-get install libhildon1-ruby1.8 libgconf2-ruby1.8 libconic-ruby1.8 ruby1.8 libosso-ruby1.8
wget http://stage.rubyx.co.uk/projects/ruby-maemo/packages/maemo4/armel/libxml2-ruby1.8_0.9.7-0maemo1_armel.deb
dpkg -i libxml2-ruby1.8_0.9.7-0maemo1_armel.deb

Knots Client

Open a terminal & change to root:

wget http://nakkiboso.com/knots/dl.php?file=client
dpkg -i knots_*.deb

Client Settings

Menu Functions:

  • Server Scan: Automatically search and connect to a knots Server in the local LAN
  • Manual Connection: Specify the IP & Port of a Knots Server manually
  • Offline Mode: Disconnect from a Knots Server, and Display local Media Files
  • Preferences: see below
  • Refresh: Reload current Directory or Refresh list of local files
  • Go to Root: Retun to the Start - Folder
  • Switch Transcoding Profile: Use the next predefined Transcoding profile
  • Switch Theme: Switch Knots theme (no restart required)
  • Remote Playback: Play a media File directly on the Server
  • Check for Updates: Searches for available updates & installs if found.

Client Preferences:

  • Language: Set Application Language
  • Language for Subtitles: Set Language for Subtitles
  • Cache: Buffer in KB. 128 is a good starting point for a stable wlan
  • Local Directories: Knots scans these directories for Media when switched to Offline Mode.
  • Join split Videos: Automatically join split videos (e.g. 001.vdr & 002.vdr)
  • Show Screenshots: generate random Screenshots of Videos

Usage

The Knots Client is designed to be totally thumb controlled, and is including also gesture-support. Most of it's functions are very intuitive to use and self - explaining. The Start Screen gives an Overview of you defined Categories and has an entry to show unfinished Videos as well as the 10 latest additions to the Server.

If you want to watch a video on the way, you can left-click on any video file in your Archive and Knots will put the file on a "Transcoding List". If you change to this transcoding list and hit the start button knots will encode the video in the pre-defined profile and transfer the file to your tablet.

If you configured Knots to connect to a VDR, you can browse the Channellist (you also get the EPG), Stream Live-TV or manage Recording Timers for VDR.

ToDo much more usage tips :)

Offline Mode

In Offline Mode, the Knots Client is a thumb friendly mplayer frontend (with gestures support to change the volume, seek,ect ), that will automatically scan your tablet for media files, and display them in the GUI. You can add them to a playlist, or start playing them directly

Playlist support in offline mode can be used to load a VDR - streamdev channels.m3u Channel list to watch Live TV via VDR if no Knots Server is available.

You can sort playlist entries with the up / down buttons. A long click (2 seconds) pushes the selected entry to the beginning / end of the playlist. A long Click on the play button will start the selected entry directly.


Web Frontend

Point your desktop's browser to the Knots server address, followed by it's port. If you don't know what it is, check the the logfile or start the server with

./knots stick

It will print out the address on the first line. If you use the bundled Flash-profile, it will try to open the video in the browser. If you select a different transcoding-profile, it prints out a link to a playlist. You can then open this playlist with your favorite video player.

Authentication

To secure your installation, enable Remote-Authentication for Knots:

Edit ~/.config/knots/config.yaml and set 'auth_remote: true'

  • To Add / Remove a user:
./scripts/auth add username password
./scripts/auth delete username
  • Add a client to / Remove client from whitelist

./scripts/auth add client_id ./scripts/auth delete client_id

You can find your clients id from the logfile (~/.config/knots/knots.log)

Router Configuration

If you want Remote Access to your knots Server, you need to open & forward the ports 4212 - 4250 from your Router to the IP of your Knots Server.

Bugs & Requests

ToDo

Retrieved from "http://wiki.maemo.org/Knots"