Knots

(Ubuntu)
(Redirecting to Knots2)
 
(78 intermediate revisions not shown)
Line 1: Line 1:
-
= About Knots =
+
#REDIRECT [[Knots2]]
-
[[Image:Knots.png|52px|left]]
+
-
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 consists of a Server and Client part. The Server 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.
+
-
 
+
-
Non-Tableteers can access the Knots Web-Frontend from any Plattform / Location (including Windows). Firefox & Adobe's Flash Plugin 10 are suggested and work best. Knots will automatically transcode all streams to flv, so they can be watched directly in the Browser.
+
-
 
+
-
It is also possible to use the Knots-Client without a Server as a thumb - friendly fronted for mplayer. The Client will scan your tablet for media files, and you can create & save custom playlists.
+
-
 
+
-
= Features =
+
-
* fully thumb driven intuitive GUI for the Nokia N700 / N8x0 Tablets
+
-
* gesture support (for CPU frequency scaling & volume)
+
-
* auto transcode & stream videos to a Knots-Client or to a remote Computer via the web-frontend.
+
-
* watch Live TV (DVB) with vlc directly or make knots act as a VDR Streaming Client.
+
-
* stream VDR Live-TV and  Recordings, browse the EPG & adjust VDR Recording Timers from the Client
+
-
* Playlist support (worldTV99, ect.)
+
-
* automatic subtitle fetching for movies
+
-
* automatic thumbnail generation for all clips using ffmpeg
+
-
* integrated Search function
+
-
* thumb friendly mplayer frontend with playlist & gestures support (if Client is in Offline Mode)
+
-
 
+
-
= Knots Server =
+
-
=== Install ===
+
-
Knots Server can be installed on any *nix based OS like Gnu/Linux, BSD & OSX.
+
-
 
+
-
==== Ubuntu ====
+
-
 
+
-
This instructions are for ubuntu intrepid (8.10). Other debian derivates might use slightly different package names, but the general concept of the install is the same for all distros.
+
-
 
+
-
* Enable the Multiverse & Universe software sources, and add the [https://help.ubuntu.com/community/Medibuntu Medibuntu repository] (for ffmpeg), reload your Package information and open a root terminal (sudo -s), to install the Ruby Dependencies:
+
-
 
+
-
apt-get install ruby1.8
+
-
 
+
-
* install unzip for automatic subtitle download feature
+
-
apt-get install unzip
+
-
 
+
-
* get vlc and a 'unrestricted' ffmpeg build
+
-
apt-get install vlc-nox vlc-data libvlccore0 libvlc2 ffmpeg
+
-
 
+
-
If you have Xorg running 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 /opt
+
-
wget http://nakkiboso.com/knots/dl.php?file=server
+
-
tar xvzf knots_server.tar.gz
+
-
 
+
-
That's it! knots is installed under /opt/kserver. You still need to configure it though!
+
-
 
+
-
==== Mac OSX ====
+
-
 
+
-
'''ToDo''' see http://nakkiboso.com/knots/doc.php
+
-
 
+
-
=== First run === 
+
-
 
+
-
Knots-Server keeps its config at the folder ~/.config/knots . It is located under the home directory of the user who runs the following setup script, so '''do NOT run ./scripts/setup from a root terminal''' !
+
-
 
+
-
su yourusername
+
-
cd /opt/kserver
+
-
./scripts/setup
+
-
 
+
-
The Script will ask you various questions about your installation and has reasonable default settings. So if you are not sure, accept the default settings.
+
-
 
+
-
* Server name : Enter a custom Name for your Knots Server
+
-
* Select interface to bind to: choose on which network interface Knots to bind to
+
-
* Is all your media under one directory? : if you keep all you video files under one Directory answer yes here.
+
-
* Full path to your media files: Full path to your video archive (e.g. /media/video)
+
-
* Do you have the program Video Disk Recorder (VDR) with streamdev-plugin installed? : Knots can interact nicely with VDR. If you have a VDR running somewhere on your local home network, or on the same computer as knots, answer yes here . The next VDR specific Questions are about the used VDR OSD & File System Charset (different from UTF-8 in VDR releases < 1.7) and you can also supply a Folder where your local VDR Recordings are stored.
+
-
 
+
-
 
+
-
You can accept the default values for any other Questions asked by the setup script.
+
-
 
+
-
After the script has gathered the necessary info it shows you the location of the generated config.yaml file:
+
-
 
+
-
Configuration saved to /home/''yourusername''/.config/knots/config.yaml.
+
-
You can edit this file with a text editor for more advanced settings.
+
-
You can now start the server with './knots start'
+
-
 
+
-
=== Advanced Server Configuration ===
+
-
If you want to customize your configuration File, open it in a text editor. The full path to the configuration file was printed to the terminal when you ran './scripts/setup'
+
-
 
+
-
==== Configuration Options ====
+
-
 
+
-
* cache: You can enable cache for one (or more) of your categories. Keep in mind that it's not wise to Cache the "Latest Videos" or VDR categories.
+
-
 
+
-
* vlc: This section configures vlc. You can customize the port_range for vlc to your Network. Keep in mind that you need to forward those ports by your router (or Firewall) to the Knots-Server if you want the Web-Frontend to be remote accessible.   
+
-
 
+
-
* vdr: You can connect as many VDR's as you wish to knots. All you need to create is another vdr2, vdr3 ... Configuration and adjust the IP - addresses, streamdev_ports & svdrp_ports to fit your configuration.
+
-
 
+
-
* server: you can configure some general Server settings in this section. If you need more verbose logging, you can add 'log_level: 2' (without the quotes) to this section, to generate much more debug output in the logfile.
+
-
 
+
-
* media: adjust the stream able Media Container Formats, and the full patch to your ffmpeg installation
+
-
 
+
-
* transcoding: Knots ships some transcoding presets (Video Dimensions, target Bitrate, Codec) , that should be optimal for your Tablet (you can change to another Preset on the fly from the Knots-Client running on your Tablet). If you want to use the Web-Frontend remote, you might want to set smaller Dimensions in the flash profile (see example Configuration below)
+
-
 
+
-
* categories: This Section lists your Categories. Use this names for the 'cache' settings
+
-
 
+
-
==== Example Configuration ====
+
-
for Knots-Server 0.4.1 with local VDR 1.6.0 (VDR using german charset ISO-8859-1):
+
-
---
+
-
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
+
-
 
+
-
=== 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 your Knots-Server and select 'Check for updates' from the menu. Knots will transfer the updated Package to your tablet automatically and start the Application Manager to install it.
+
-
 
+
-
= Knots Client =
+
-
=== Install ===
+
-
 
+
-
==== Ruby for Maemo OS2008 ====
+
-
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 & run:
+
-
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 and run:
+
-
wget http://nakkiboso.com/knots/dl.php?file=client
+
-
dpkg -i knots_*.deb
+
-
rm -rf *.deb
+
-
 
+
-
=== Client Settings ===
+
-
'''Menu Functions:''' [[Image:Knots-browseing.png|250px|right]]
+
-
* 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 ===
+
-
 
+
-
[[Image:Knots-startscreen.png|250px|right]]The Knots Client is designed to be totally thumb controlled, and is also including 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 right-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 (with a click on the left Cursor key) and hit the ''start'' button knots will automatically encode the video in the currently selected profile and transfer the file to your tablet. The save-location can be customized in the Client Preferences Window.
+
-
 
+
-
If you configured Knots to connect to a VDR, you can browse the Channellist (you also get the EPG), Stream Live-TV, watch your Recordings and add, activate, deactivate or delete Timers for VDR. This makes knots the most feature complete "streaming client" for VDR. 
+
-
 
+
-
'''ToDo''': much more usage tips :)
+
-
 
+
-
=== Offline Mode ===
+
-
 
+
-
[[Image:Knots-playlist.png|250px|right]]In Offline Mode, the Knots Client is a thumb friendly mplayer frontend (with gestures support to change the volume, seek,ect ). Once switched to Offline Mode, the Knots - Client 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, with a long (2 sec) push on the play button while the desired Clip is selected. A short push will start to play the first entry in the Playlist .
+
-
 
+
-
The inbulid Playlist support in Offline Mode can also be used to load a VDR - streamdev channels.m3u Channel list to watch Live TV via VDR & mencoder if no Knots Server is available.
+
-
 
+
-
You can sort Playlist entries with the up / down buttons. A long push (2 seconds) puts the selected entry to the beginning / end of the Playlist, and a long push on the play button will start the selected entry directly.
+
-
 
+
-
=== VDR Streaming Client ===
+
-
 
+
-
'''ToDo''': explain VDR requirements & configuration for pre-UTF-8 releases; vdr can be on same computer as knots server or in the same home network. Tested with stable vdr 1.6.0 and current development version vdr 1.7.x. Requires streamdev plugin. svdrp.conf adjustments ect.
+
-
 
+
-
=== Movie Information ===
+
-
[[Image:Knots-movieinfo.png|250px|right]]The Knots Client fetches additional Information for a selected Video from the open movie Archive http://themoviedb.org. The Service includes a movie poster, a short Plot Summary and a brief List of Actors, as well as user ratings. TheMovieDB is also used by other media Centers like XBMC, and has a continuously growing database. If your video is not available already, contribute by adding info about it to their wiki.
+
-
 
+
-
To query for a title, press the Information button. Knots will display the 'closest' result, similar to googles 'i'm feeling lucky'. You can also browse multiple results if the first was a false hit. To create a custom search query, press the Information button for 2 seconds.
+
-
 
+
-
= Web Frontend =
+
-
 
+
-
[[Image:Knots-webfrontend.jpg|250px|right]] Point your desktop's browser to the Knots server address, followed by it's port: http://<yourip>:4212
+
-
 
+
-
Check the the logfile (/home/yourusername/.config/knots/knots.log) or start the server with '''./knots stick''' if you don't know them. It will print out the address & port on the first line.
+
-
 
+
-
Knots will automatically use the bundled Flash-profile, if it's accessed via the Web-Frontend. You need a decent Browser, like Firefox and adobe's flash plugin installed, to use flash streaming. You might want to reduce the dimensions for the flash profile if you intend to stream video to remote computers accessing the web - frontend. The flash profile in the [http://wiki.maemo.org/Knots#Example_Configuration Example Configuration] causes a upstream of 60 k/s.
+
-
 
+
-
You can also select a different transcoding-profile in the Web-Frontend. Knots will print out a link to a Playlist that can be opened with your favorite video player on the remote Computer (e.g. mplayer with the "High" Profile).
+
-
 
+
-
Encoding Profiles & the Language of the Web - Interface can be changed on the fly. 
+
-
 
+
-
=== Authentication ===
+
-
If you plan to access the Web-Frontend from remote locations, it might be wise to secure your installation by enabling '''Remote-Authentication''' for Knots.
+
-
 
+
-
Edit the main server configuration file ~/.config/knots/config.yaml and set '''auth_remote: true''' in the '''server''' section.
+
-
 
+
-
* 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
+
-
 
+
-
''NOTE: You can find the clients id's in the logfile (~/.config/knots/knots.log)''
+
-
 
+
-
=== Firewall / Router Configuration ===
+
-
If you want to enable remote access to your knots Server, open & forward the ports 4212 - 4250 from your Router to the IP of the Knots Server. You can adjust the default port range for vlc in the server configuration file ~/.config/knots/config.yaml.
+
-
 
+
-
If you use a software firewall on your server (like ufw or iptables) you might also need to open the port-range from 4212 to 4250 for Knots. See [https://wiki.ubuntu.com/UbuntuFirewall UbuntuFirewall] for more information how to configure the default firewall shipped with ubuntu (uwf).
+
-
 
+
-
= Bugs & Requests =
+
-
 
+
-
'''ToDo''': add info about bugreports & feature requests.
+

Latest revision as of 15:52, 29 October 2009

  1. REDIRECT Knots2