Knots2

Knots is a Media streaming application for Windows, Mac OS X, Linux and FreeBSD. It allows you to access your desktop computer media collection from anywhere with a browser or using the client available for Nokia N900 and N8x0 internet tablets. Media streaming and transcoding is handled by the excellent VLC. Adobe Flash-plugin or VLC browser plugin is needed for browsers that don't support Theora video codec.

Contents

Features

  • Fully thumb driven UI
  • Stream videos with on-the-fly transcoding to a Knots client or to a remote computer via the web-frontend. Seeking is supported when possible.
  • Stream VDR/Dreambox Live-TV and recordings
  • Stream MythTV recordings
  • Automatic subtitle fetching for movies, provided by http://www.opensubtitles.org
  • Additional info for movies, provided by http://themoviedb.org

Installation

To get Knots running, some dependencies have to be met. After that, the server package and the tablet client must be installed. The following steps will guide you in those tasks.

Dependencies

Knots server uses VLC for streaming and FFmpeg for encoding. The following steps explain how to setup those dependencies.

Linux

This instructions are for Ubuntu Karmic Koala (9.10) 32 and 64 bit. Other Debian derivates might use slightly different package names, but the general concept of the install is the same for all distros.

apt-get install ruby1.8 ruby rubygems libsqlite3-ruby libopenssl-ruby vlc ffmpeg 
  • Add the Medibuntu repository (for ffmpeg), reload your Package information, update your system and open a root terminal (sudo -s), and:
apt-get install libavcodec-unstripped-52 libavdevice-unstripped-52 libavfilter-unstripped-0 libavformat-unstripped-52 libavutil-unstripped-49 libpostproc-unstripped-51 libswscale-unstripped-0 ubuntu-restricted-extras

To get the best result, ubuntu users should compile ffmpeg themselves. Here and here are good guides, you only need to copy-paste few lines.

OS X

Install latest VLC and ffmpegX to /Applications.

Windows

Download and install latest VLC. For easy setup, install it under C:\Program Files, otherwise you will need to edit the path in server settings.

Server

Linux / FreeBSD / OS X

  • nix compatible OS users can get the latest client and server with git:
git clone git://github.com/solmis/knots.git

or download it from github

Then start the server with

cd knots
./knots.rb

OS X users can create a standalone app too:

./install/create_osx_app

knots2 application should appear in your home folder. You can move to that to /Applications. After running the application an icon appears in the dock which then disappears, but knots should be running.

There is also a prebuilt package for OS X users (Updated 2010-03-27).

Windows

Download the installer (Updated 2010-03-27). Install and start the server from the start menu.

If you want more recent server with ability to fetch updates, read on:

Install Git for Windows from here. Select the defaults if you don't know what the options mean. Once it's installed, open cmd.exe and run these commands:

cd c:\
git clone git://github.com/solmis/knots.git


Then download the server package from here. Unzip it somewhere (not c:\) and copy the ruby folder and run.cmd to c:\knots. Then copy win32/sqlite3.dll with administrator rights to Windows\System32 or to Windows\Syswow64 if you are using a 64-bit Windows. If you accidentaly skip this step and get the error about missing sqlite3.dll, delete the .config folder inside knots folder or the needed programs are not automatically scanned. Double click on run.cmd to start the server. Be sure to close the window with ctrl-c, otherwise VLC is left running.

Sheevaplug

Sheevaplug doesn't have enough power to do transcoding, but you can listen to music and watch sd material using the Passthrough profile if you change the mux to asf. VLC 0.9.9 that is available by default from the Ubuntu repository works well, but you need to either compile your own ffmpeg or install these ffmpeg and x264 packages.

Setup

Just point your browser to http://localhost:1978 and add your media under settings. If you don't see the Update collection button, please make sure that both ffmpeg and VLC paths are correct.

HTML-frontend

Client

Knots2 N8x0 Client is available from the extras-repository for OS2008 (Diablo).

The Client for the N900 (Fremantle) is still in alpha state and not ready for prime-time yet. Although advantageous people can have a peek in the current develpoment state by enabling extras-devel repository and pull the client from there.

NOTE: Please bear in mind that the N900 client is still unfinished. You might come across bugs and other strange behavior (like quickly draining battery ect.) since mplayer currently can't utilize the full potential of the N900's hardware. If you are not willing to deal with those limitations you should NOT use the Knots2 Client on your shiny new device yet.

3G streaming with N900

You can stream videos and music from outside your home network, but make sure you make the server more secure. Check Can I use the server to view stuff from the internet? under Questions & Answers on how to enable SSL and basic auth for the server. For the client you need a custom libsoup2.4 library, because SSL is not supported by libsoup by default on Maemo platform. We take no responsibility if it messes up other applications using this library. Then install the latest client and rootsh from extras(-devel) repositories. Open terminal and run these commands:

root
apt-get install libgnutls26 libgcrypt11 wget
wget "http://nakkiboso.com/libsoup2.4-1_2.26.3-0maemo3+0m5_armel.deb"
dpkg -i libsoup2.4-1_2.26.3-0maemo3+0m5_armel.deb
rm libsoup2.4-1_2.26.3-0maemo3+0m5_armel.deb


Knots doesn't have a 3G profile currently, because the perfect quality depends on so many things, but you can create a copy of some profile and tune it to suit your network.

Knots now has a feature to automatically connect to your server outside your lan. Go to Settings -> Remote discovery and create an account for yourself. Server will then update your server location to a remote server every 4 hours. Open client and enable remote discovery by logging in with the same username and password. Client should then automatically connect to your server no matter where you are.

Screenshots

Knots2 Client Start Screen

Knots2 Client browsing tv channels Knots2 Client displaying movie info

Knots2 Client searching for video files on server

Knots2 Client with a mp3 playlist Knots2 Client showing song lyrics and rating dialog

Questions & Answers

Windows

  • I want to run knots as a windows service.
    Follow these steps.
  • My virus scanner gives me a warning about netcat.exe that is bundled with Knots
    Netcat is used for VDR support and it's clean so the warning is harmless.
  • Knots doesn't play media if the path contains non-ascii characters.
    This is an issue with Ruby and Windows. It's hard to fix it in Knots so we will have to wait for Ruby 1.9.2 which fixes these issues. Until then, try to avoid non-ascii characters in filenames. Other operating systems shouldn't be affected by this.

Linux

  • I can't view any videos.
    Did you install the -unstripped packages of the FFmpeg libs? FFmpeg in Linux is a problem because all the license issues etc. so if your distro doesn't provide unrestricted builds you need to compile your own FFmpeg with at least libmp3lame and xvid support. Run ./scripts/vlctest to check what is wrong with your VLC/FFmpeg combo.

OS X

  • Seeking freezes the video for a while and then stops it.
    This is a VLC issue. It seems to have problems with certain codecs, mainly xvid/divx. Try updating VLC from time to time and see if it that helps. Or better yet, issue a bug report.

Server

  • Page content doesn't seem to update.
    That's because all tabs keep their state. Double click on the tab to force a refresh.
  • I don't see the Update collection -button under settings.
    Make sure both VLC and FFmpeg have correct paths.
  • Certain videos only have sound.
    Try changing the transcoding profile. 64-bit Windows seems to have issues transcoding to xvid, so try using the passthrough profile for SD content or browser/theora for HD content.
  • Lyrics don't work.
    Lyrics-site seems to be down from time to time, try leaving it alone for few days and try again.
  • Can I use VLC browser plugin to view the video without transcoding?
    Sure. Edit the passthrough profile and add a value vlc to embed and save. VLC plugin doesn't seem to close properly though, so you may need to restart the browser to kill it.
  • I downloaded a video from Youtube. It plays in the browser, but the sound is funny.
    You need to use 22050 audio rate. Edit the profile you are using or create a new one for it.
  • I want to use VDR / MythTV / Dreambox with Knots but can't find a setting for them.
    Stop the server, run "./install/vdr", "./install/mythtv" or "./install/dreambox" and answer the questions. Double click on Settings tab and you should see a button that updates them. If your VDR/Dreambox has several channels, be sure to change Capture screenshots for external urls to 0 before scanning them. Then change it back to 1 and use the Edit button to grab only the screenshots you want. Dreambox requires the Zapstream plugin to be installed.
  • How can I make the server output some debugging messages to the terminal?
    Stop the server, run "./scripts/setup devel 1 Developer" and restart the server.
  • Can I use the server to view stuff from the internet?
    Yes, just enable SSL and add an admin user account. You need to open/forward the port you are using and then 19780 for the actual http-stream (and +1 for each additional streams).
  • I get black borders around the video. How can I force it to fullscreen?
    Knots tries to maintain the original aspect ratio of the source material. To override this, stop the server and run
./scripts/setup disable_aspect 1 "Disable video aspect"
or add it with a browser using Add new setting -button. Adding this setting may also create less artifacts in the video.
  • I want to tune the streaming profile. Where is some information on the available options?
    Knots relies on vlc for handling the transcoding, so refer to it's Official Documentation for the available settings.

Client

  • How come the video plays fine with the client, but not when moved to the device?
    Knots transcodes everything to a format your tablet supports. If your VLC can play it on your desktop, chances are your tablet then plays it as well.
  • My Client does not have icons as shown in the screenshots above. How do I add them?
    The icons shown in the screenshots can be downloaded here. Assign them in the web-frontend to the Main Categories (Video, Music, Television) on the "Edit Media" Tab. Icons for Virtual Categories (Latest, Unviewed, Unwatched) can be assigned on the "Settings" tab.
  • I see no rotation menu item.
    Please see Rotation
  • I'm using Mer and I want to use Knots as a music player, but I can't connect to server.
    That's because Mer has no support for libconic. Restart the client after running this command in terminal:
gconftool-2 -s /apps/knots/ignore_conic true -t string

Media

  • Some of my audio/video files aren't scanned.
    You can add the the missing file extensions under settings and do a rescan. To keep the dependencies low, I only support mp3-tags out of the box. But it doesn't mean other audio formats won't work, they just don't get tagged properly.
  • I have a folder with recorded tv-series and I want to move them all to Series category. How do I do that?
    Go to Edit media, limit search results to - to list them all and use the path as a search criteria. Once they are listed, click on Select all, add a category or select the one you want to move them to, select Set category action and press Apply to selected. All selected videos are then moved to that category. Same idea works with all the actions.
  • My mp3-tags are messed up and I have the same album with 3 different names. Can i easily fix that?
    Sure. Just go to Edit media, select the album tag, then select the wrong value and rename it to the correct one. All the songs that are in that album are moved to the correct album. Do it for all the wrong names and all the songs should be in the same album.
  • Can I play DVDs with Knots?.
    Possibly. Go to settings and click on Add a new setting. Name it DVD Drive, key is dvd_drive and value is a path to your CD-ROM drive. In Windows this is possibly D:\, in Linux /media/dvd and in OS X it's /Volumes. Insert the DVD in drive and select Go to root from the client menu. You should see the name of the DVD. Make sure the DVD is recognized before trying to update the page or it may not be properly scanned.

Bugs

If you come across bugs report them at the Knots bugtracker. Please attach the necessary information (used Operating System, Tablet Revision, terminal output) and clear steps to reproduce the malfunction.

Discuss

You can discuss Knots at Talk. Please submit bugs to github instead of discussion thread.

Contact

Please join our IRC channel #knots at Freenode or email janne dot makinen at surffi dot fi

Donate

Knots 2 is free software, but if you feel like donating, you can donate via Paypal.