Knots2

m (Windows)
m (Reverted edits by 180.194.172.28 (Talk) to last revision by 86.50.113.147)
 
(43 intermediate revisions not shown)
Line 1: Line 1:
-
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.
+
'''NOTICE! It seems VLC 1.1 was released with broken asf muxing and subtitles stopped working too, so don't upgrade from 1.0.6. You can use [http://downloads.sourceforge.net/portableapps/VLCPortable_1.0.5.paf.exe?download VLC Portable] too. Just copy it to Knots/win32 folder and change the path in settings.
-
Media streaming and transcoding is handled by the excellent [http://www.videolan.org VLC]. Adobe Flash-plugin or VLC browser plugin is needed for browsers that don't support Theora video codec.
+
-
[http://www.youtube.com/watch?v=g-b-IvYH7Sc Server setup video on Youtube]
+
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 [http://www.videolan.org VLC]. Adobe Flash-plugin or VLC browser plugin is needed for browsers that don't support Theora video codec.
-
[http://www.youtube.com/watch?v=sg77WQzG5D4 N8x0 and N900 clients video on Youtube]
+
Please note that transcoding requires a lot of CPU power and enough memory, especially if source material is high definition quality. If your CPU has several cores and decent amount of memory, you may be able to view 1080p material on your Nokia without the need to re-encode them first.
 +
 
 +
== Features ==
-
= Features =
 
* Fully thumb driven UI
* 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 videos with on-the-fly transcoding to a Knots client or to a remote computer via the web-frontend. Seeking is supported when possible.
Line 14: Line 14:
* Additional info for movies, provided by http://themoviedb.org
* Additional info for movies, provided by http://themoviedb.org
-
=Installation=
+
== Quick setup guide ==
 +
 
 +
# Download and install VLC media player and the server software (see below).
 +
# Start the server
 +
# Open a browser (Firefox, Chrome, Safari, not IE) and enter address http://localhost:1978/
 +
# Click on the status tab and make sure VLC is running. If it isn't,  make sure the path to vlc.exe executable is correct under 'settings' tab. Save settings and restart server.
 +
# Click on the 'collection' tab, add the folders that contain your media to the list and click on 'update collection' button. Wait until scan is finished.
 +
# Install client and start it. You should be automatically connected and able to listen/view your media.
 +
 
 +
'''If you want to be able to view media outside your home, through 3G for example, do the following:'''
 +
 
 +
# Click on settings tab and add a new user. Click on the username that appears on the list, set role to admin, add a password and save the user. Then set "Use authentication without SSL" to yes and save settings. Enter your admin username and password to login.
 +
# Click on settings tab and enable remote discovery. You can use the same username and password you used to authenticate to server if you wish, but they can differ.
 +
# Once you have enabled remote discovery, you need to open access to your computer. If it's directly connected to internet, open ports 1978, 19780-19790. If you use a wireless router or similar, consult the manual on how to do port forwarding. Forward ports 1978 and 19780-19790 to your computer.
 +
# Once you have opened access to your computer, you can playback a video using the browser, click on the 'Hide window' button, click on settings tab and click on 'Check server accessibility from the internet' button. You should see a message saying everything is setup correctly if all is ok.
 +
# Then finally open the client, click on window title bar, click on 'Remote discovery' and authenticate with your remote discovery username and password. If authentication succeeds, you should be able to access your computer automatically from outside your network even if your computer has dynamic ip address.
 +
#* Please note that for watching video through 3G you need to lower the video quality a lot. You can try the Nokia N8x0 profile first and lower bitrate and resolution until it plays without glitches. You also need to have enough upload speed on your internet connection.
 +
 
 +
==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.
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 [http://www.videolan.org/vlc/ VLC] for streaming and [http://www.ffmpeg.org/ FFmpeg] for encoding. The following steps explain how to setup those dependencies.
+
===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.
+
Knots server uses [http://www.videolan.org/vlc/ VLC] for streaming and [http://www.ffmpeg.org/ FFmpeg] for screenshots and media info. The following steps explain how to setup those dependencies.
 +
 
 +
====Ubuntu====
 +
 
 +
These 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  
  apt-get install ruby1.8 ruby rubygems libsqlite3-ruby libopenssl-ruby vlc ffmpeg  
Line 29: Line 52:
To get the best result, ubuntu users should compile ffmpeg themselves. [http://ubuntuforums.org/showthread.php?t=786095 Here] and [http://ubuntuforums.org/showpost.php?p=6963607&postcount=360 here] are good guides, you only need to copy-paste few lines.
To get the best result, ubuntu users should compile ffmpeg themselves. [http://ubuntuforums.org/showthread.php?t=786095 Here] and [http://ubuntuforums.org/showpost.php?p=6963607&postcount=360 here] are good guides, you only need to copy-paste few lines.
-
===OS X===
+
====Debian (sid)====
-
Install latest [http://www.videolan.org/vlc/download-macosx.html VLC] and [http://www.ffmpegx.com/ ffmpegX] to ''/Applications''.
+
 
-
===Windows===
+
Debian follows the [[:wikipedia:Debian Free Software Guidelines|Debian Free Software Guidelines]] policy, which prevents inclusion of several codecs with potential patent issues. To run Knots2, add the [http://debian-multimedia.org/ Debian-Multimedia Repository] to your sources list, install the keyring to avoid warnings, then open a root terminal (su root) and: 
-
Download and install latest [http://www.videolan.org/vlc/download-windows.html VLC]. For easy setup, install it under ''C:\Program Files'', otherwise you will need to edit the path in server settings.
+
 
-
==Server==
+
apt-get update && apt-get install ruby1.8 ruby rubygems libsqlite3-ruby libopenssl-ruby vlc ffmpeg
-
===Linux / FreeBSD / OS X===
+
 
 +
Then, to ensure that all requisite libraries are installed:
 +
 
 +
apt-get install libavcodec52 libavdevice52 libavfilter1 libavformat52 libavutil50 libmp3lame0 libpostproc51 libswscale0
 +
 
 +
This should allow the knots server to transcode using the default knots2 profiles.
 +
 
 +
====OS X====
 +
 
 +
Install latest [http://www.videolan.org/vlc/download-macosx.html VLC] and [http://www.ffmpegx.com/ ffmpegX] to <code>/Applications</code>.
 +
 
 +
====Windows====
 +
 
 +
Download and install latest [http://www.videolan.org/vlc/download-windows.html VLC]. For easy setup, install it under <code>C:\Program Files</code>, 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:
*nix compatible OS users can get the latest client and server with git:
 +
git clone https://github.com/andyleadbetter/knots-server.git
 +
 +
old repository info, it was no longer there:
  git clone git://github.com/solmis/knots.git
  git clone git://github.com/solmis/knots.git
or download it from [http://github.com/solmis/knots/archives/master github]
or download it from [http://github.com/solmis/knots/archives/master github]
Line 46: Line 90:
  ./install/create_osx_app
  ./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.
+
<code>knots2</code> application should appear in your home folder. You can move to that to <code>/Applications</code>. After running the application an icon appears in the dock which then disappears, but knots should be running.
-
There is also a prebuilt [http://nakkiboso.com/knots2/knots_osx.zip package] for OS X users (Updated 2010-03-27).
+
There is also a prebuilt [http://nakkiboso.com/knots2/knots_osx.zip package] for OS X users (Updated 2010-06-02).
-
===Windows===
+
====Windows====
-
Download the [http://nakkiboso.com/knots2/knots_setup_2010_04_18.exe installer] (Updated 2010-04-18). Install and start the server from the start menu.
+
Download the [http://www.mediafire.com/?zwnorymqyfg installer] (Updated 2010-06-13). Install and start the server from the start menu. Then select Configure server from the menu to configure it.
Advanced Windows users who want fixes and features quickly can use git too. Following is required only if you want to go through the trouble of updating the server by hand from time to time and report possible bugs about the new features.
Advanced Windows users who want fixes and features quickly can use git too. Following is required only if you want to go through the trouble of updating the server by hand from time to time and report possible bugs about the new features.
-
Install Git for Windows from [http://code.google.com/p/msysgit/downloads/list here]. Select the defaults if you don't know what the options mean. If you are using Vista/7, make sure you run the installer with administrator rights. Once it's installed, open cmd.exe and run these commands:
+
Install Git for Windows from [http://code.google.com/p/msysgit/downloads/list here]. Be sure to add the git binary to your path when asked (2nd option). If you are using Vista/7, make sure you run the installer with administrator rights. Once it's installed, open cmd.exe and run these commands:
  cd c:\
  cd c:\
  git clone git://github.com/solmis/knots.git
  git clone git://github.com/solmis/knots.git
-
Then download the installer, install it somewhere and copy the ruby folder and all the executables and cmd files to c:\knots. Then delete the folder made by the installer and edit the Knots 2 menu items to point to c:\knots. After that you can always update the server to latest version: open cmd.exe and run these commands:
+
Then download the installer, install it somewhere and copy the ruby folder and all the executables and cmd files to <code>c:\knots</code>. Then delete the folder made by the installer and edit the Knots 2 menu items to point to <code>c:\knots</code>. After that you can always update the server to latest version: open <code>cmd.exe</code> and run these commands:
  cd c:\knots
  cd c:\knots
  git pull
  git pull
-
after pulling the latest changes, run Migrate.cmd to migrate possible database changes.
+
after pulling the latest changes, run <code>Migrate.cmd</code> to migrate possible database changes.
 +
 
 +
====Sheevaplug====
-
===Sheevaplug===
 
Sheevaplug doesn't have enough power to do transcoding, but you can listen to music and watch sd material using the Passthrough profile. 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 [http://ugz.ath.cx:1415/ffmpeg_4_0.5_sheeva_armel.deb ffmpeg] and [http://nakkiboso.com/knots2/x264_1_0_sheeva_armel.deb x264] packages.
Sheevaplug doesn't have enough power to do transcoding, but you can listen to music and watch sd material using the Passthrough profile. 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 [http://ugz.ath.cx:1415/ffmpeg_4_0.5_sheeva_armel.deb ffmpeg] and [http://nakkiboso.com/knots2/x264_1_0_sheeva_armel.deb x264] packages.
-
==Setup==
+
===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.
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.
[[Image:Screen shot 2009-12-22 at 10.24.11 PM.png|HTML-frontend|500px]]
[[Image:Screen shot 2009-12-22 at 10.24.11 PM.png|HTML-frontend|500px]]
-
==Client==
+
===Client===
-
Client for the N8x0 (OS2008/diablo) is available from the extras-repository.  
+
 
-
Client for the N900 (Maemo5/fremantle) is available from the extras-devel -repository.
+
Client for the N8x0 (OS2008/diablo) is available from the [[extras]] repository. Client for the N900 (Maemo5/fremantle) is available from the [[extras-devel]] repository. 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. You should not enable extras-devel if you don't know what you are doing. '''Please read [[extras-devel|the extras-devel article]] before installing Knots 2 for the N900'''
-
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. You shouldn't enable extras-devel if you don't know what you are doing. '''Please read [http://wiki.maemo.org/Extras-devel this] before installing Knots 2 for the N900'''
+
 
 +
===Accessing the server from the internet securely===
-
==Accessing the server from the internet securely==
+
You can stream videos and music from outside your home network using 3G or WLAN, but make sure you make the server more secure. Check '''Can I use the server to view stuff from the internet?''' under [[#Questions and Answers|Questions and Answers]] on how to enable basic auth for the server. If you want SSL encryption for more secure server, you need a custom libsoup 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:
-
You can stream videos and music from outside your home network using 3G or WLAN, 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 basic auth for the server. If you want SSL encryption for more secure server, you need a custom libsoup 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:
+
'''For the N900'''
'''For the N900'''
Line 97: Line 143:
  dpkg -i libsoup2.2-8_2.2.105-4_armel.deb
  dpkg -i libsoup2.2-8_2.2.105-4_armel.deb
  rm libsoup2.2-8_2.2.105-4_armel.deb
  rm libsoup2.2-8_2.2.105-4_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 like N8x0 and tune it to suit your network.
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 like N8x0 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 6 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. After enabling remote discovery you can test your server setup with a click of a button.
+
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 6 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. After enabling remote discovery you can test your server setup with a click of a button.
 +
 
 +
==Screenshots==
-
=Screenshots=
 
[[Image:Knots-0.2.6-homescreen.png|Knots2 Client Start Screen|500px]]
[[Image:Knots-0.2.6-homescreen.png|Knots2 Client Start Screen|500px]]
Line 114: Line 160:
[[Image:Knots-0.2.6-mp3lyrics.png|Knots2 Client showing song lyrics and rating dialog|250px]]
[[Image:Knots-0.2.6-mp3lyrics.png|Knots2 Client showing song lyrics and rating dialog|250px]]
-
=Questions & Answers=
+
==Questions and Answers==
-
==Windows==
+
 
 +
===Windows===
 +
 
* '''Knots finds my media, I can browse it, but everytime I click on play I get an error message saying Stream failed to start. What is wrong?'''
* '''Knots finds my media, I can browse it, but everytime I click on play I get an error message saying Stream failed to start. What is wrong?'''
*:This may be caused by Windows Vista/7 UAC, that prevents VLC from starting properly. To fix this, select stop server from the menu to shutdown Knots. Then go to the directory where vlc.exe is, create an empty text file inside it with administrator rights and copy the following text to that file:
*:This may be caused by Windows Vista/7 UAC, that prevents VLC from starting properly. To fix this, select stop server from the menu to shutdown Knots. Then go to the directory where vlc.exe is, create an empty text file inside it with administrator rights and copy the following text to that file:
Line 127: Line 175:
*: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.
*: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==
+
===Linux===
 +
 
* '''I can't view any videos.'''
* '''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.
+
*:Did you install the correct 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.
* '''Knots stopped working after I upgraded to VLC 1.1'''
* '''Knots stopped working after I upgraded to VLC 1.1'''
*:VLC developers rewrote the telnet interface and renamed the old one. if VLC fails to start, run:
*:VLC developers rewrote the telnet interface and renamed the old one. if VLC fails to start, run:
Line 138: Line 187:
*:It depends on your linux distribution, but usually you can add the following line to your /etc/rc.local
*:It depends on your linux distribution, but usually you can add the following line to your /etc/rc.local
  su -c "/full/path/to/knots.rb > /dev/null 2> /dev/null &" yourusername
  su -c "/full/path/to/knots.rb > /dev/null 2> /dev/null &" yourusername
 +
*:If you want to be able to view your knots session that was autostarted, you may choose to use the 'screen' application that will create a separate shell session for your knots server.
 +
First install 'screen', (if not already done):
 +
sudo apt-get install screen
 +
 +
Again, starting knots using screen is done from rc.local:
 +
sudo -u yourusername -H screen -d -m -S kno /home/'''yourusername'''/knots/startknots.sh
 +
 +
Where the <code>startknots.sh</code> script is simply:
 +
<source lang="bash">
 +
#!/bin/sh
 +
cd /home/'''yourusername'''/knots
 +
./knots.rb
 +
</source>
 +
 +
The screen session can then be resumed from a shell session by issuing the command:
 +
screen -R kno
 +
 +
or to simplify this action further, put an alias in the file <code>/home/'''yourusername'''/.bash_aliases</code>:
 +
alias kno='screen -R kno'
 +
 +
===OS X===
-
==OS X==
 
* '''Seeking freezes the video for a while and then stops it.'''
* '''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.
*: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==
+
 
 +
===Server===
 +
 
* '''Page content doesn't seem to update.'''
* '''Page content doesn't seem to update.'''
*:That's because most tabs keep their state. Double click on the tab to force a refresh.
*:That's because most tabs keep their state. Double click on the tab to force a refresh.
Line 154: Line 225:
*: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.
*: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 want to use VDR / MythTV / Dreambox with Knots but can't find a setting for them.'''
* '''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 enigma1 requires the Zapstream plugin to be installed, enigma2 should work out-of-the-box.
+
*:Stop the server, run <code>./install/vdr</code>, <code>./install/mythtv</code> or <code>./install/dreambox</code> 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 enigma1 requires the Zapstream plugin to be installed, enigma2 should work out-of-the-box.
* '''How can I make the server output some debugging messages to the terminal?'''
* '''How can I make the server output some debugging messages to the terminal?'''
-
*:Run "./scripts/enable_debug true" to enable debug and "./scripts/enable_debug false" to disable it.  
+
*:Run <pre>./scripts/enable_debug true</pre> to enable debug and <pre>./scripts/enable_debug false</pre> to disable it.
* '''Can I use the server to view stuff from the internet?'''
* '''Can I use the server to view stuff from the internet?'''
*:Yes, just create an admin user first. Then click on the username and set a password and save. Then enable '''Force authentication''' from the settings. If you want SSL encryption, '''enable SSL''' too. Make sure server asks for authentication and that you can login before enabling access from the internet. You need to open/forward the port you are using and then 19780 for the actual video stream (and +1 for each additional video stream). After enabling remote discovery you can check that your server is properly setup without having to use the client from outside your network.  
*:Yes, just create an admin user first. Then click on the username and set a password and save. Then enable '''Force authentication''' from the settings. If you want SSL encryption, '''enable SSL''' too. Make sure server asks for authentication and that you can login before enabling access from the internet. You need to open/forward the port you are using and then 19780 for the actual video stream (and +1 for each additional video stream). After enabling remote discovery you can check that your server is properly setup without having to use the client from outside your network.  
Line 166: Line 237:
*: Knots relies on vlc for handling the transcoding, so refer to it's [http://www.videolan.org/doc/streaming-howto/en/ch03.html Official Documentation] for the available settings.
*: Knots relies on vlc for handling the transcoding, so refer to it's [http://www.videolan.org/doc/streaming-howto/en/ch03.html Official Documentation] for the available settings.
-
==Client==
+
===Client===
 +
 
 +
* '''Why isn't there a pause button?'''
 +
*:Long story short, it would technically work as stop and resume now so use stop and resume instead.
* '''How come the video plays fine with the client, but not when moved to the device?'''
* '''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.
*: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.
Line 176: Line 250:
  gconftool-2 -s /apps/knots/sticky_server1 "My Open Server/0/1978/server_address" -t string
  gconftool-2 -s /apps/knots/sticky_server1 "My Open Server/0/1978/server_address" -t string
  gconftool-2 -s /apps/knots/enable_discovery false -t string
  gconftool-2 -s /apps/knots/enable_discovery false -t string
 +
* '''I do not hear sound on the tablet client, but i do on the server.'''
 +
*:Ensure that the mplayer volume is up on the client by repeatedly pressing the + rocker button (volume up) For the n900 confirm the phone sound profile is "general" and not "silent."
 +
* '''Can I change the mplayer command used to view the stream?'''
 +
gconftool-2 -s /apps/knots/mplayer_command "/usr/bin/mplayer -your custom -settings" -t string
-
This feature is not yet available for N8x0.
+
Amount of cache, X window id and stream address get appended automatically.
 +
 
 +
===Media===
-
==Media==
 
* '''Some of my audio/video files aren't scanned.'''
* '''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.
+
*: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.
* '''What about image support?'''
* '''What about image support?'''
*:As a side effect, you can actually use Knots as an image viewer too. Knots will treat images as videos that will play for 5 seconds. You need to have the latest server installed for it to work. Just add jpg,jpeg,png,gif to the list of scanned file extensions in the settings. This is totally unsupported though and may cause some strange behavior.
*:As a side effect, you can actually use Knots as an image viewer too. Knots will treat images as videos that will play for 5 seconds. You need to have the latest server installed for it to work. Just add jpg,jpeg,png,gif to the list of scanned file extensions in the settings. This is totally unsupported though and may cause some strange behavior.
Line 189: Line 268:
*: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.
*: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.
-
=Bugs=
+
===Problems===
 +
 
 +
* '''My VLC doesn't seem to work.'''
 +
*:For now VLC version needs to be 0.9.3 - 1.0.6. Newer version may work if bugs get fixed, but older ones will not work.
 +
* '''My database is all messed up, how do I start fresh?'''
 +
*:Close the server, go to Knots folder, delete the .config folder and restart the server again. Linux/OS X users can do this easily from the command line when server is not running:
 +
rm -rf ~/.config/knots2
 +
* '''My collections is very big and I often get 'No results' messages when browsing it. How do I make it faster?'''
 +
*:You can speed it up by tagging your media so that results don't become so big, but you can also add a bigger value to the network timeout field of your transcoding profile. Try using something like 90.
 +
* '''I locked myself out with user settings, how can I fix that?'''
 +
*:Run the reset_settings script, it will remove all users, but keep the media. On Windows it's win32/ResetSettings.cmd and on Linux/OS X you can run:
 +
./scripts/reset_settings
 +
* '''Browsing etc. works fine, but playback only produces black screen with no sound and video. Progress bar works though. What's wrong?'''
 +
*:You probably haven't opened/forwarded ports 19780-19790 on your router/desktop firewall.
 +
 
 +
==Bugs==
 +
 
If you come across bugs report them at the [http://github.com/solmis/knots/issues Knots bugtracker]. Please attach the necessary information (used Operating System, Tablet Revision, terminal output) and clear steps to reproduce the malfunction.
If you come across bugs report them at the [http://github.com/solmis/knots/issues Knots bugtracker]. Please attach the necessary information (used Operating System, Tablet Revision, terminal output) and clear steps to reproduce the malfunction.
-
=Discuss=
+
 
 +
==Discuss==
 +
 
You can discuss Knots at [http://talk.maemo.org/showthread.php?t=30095 Talk]. Please submit bugs to github instead of discussion thread.
You can discuss Knots at [http://talk.maemo.org/showthread.php?t=30095 Talk]. Please submit bugs to github instead of discussion thread.
-
=Contact=
+
==Contact==
-
Please join our IRC channel #knots at Freenode or email janne dot makinen at surffi dot fi
+
 
 +
[http://webchat.freenode.net?channels=knots&uio=d4 Please join our IRC channel #knots at Freenode] or email janne dot makinen at surffi dot fi
 +
 
 +
==Donate==
-
=Donate=
 
Knots 2 is free software, but if you feel like donating, you can donate via [http://nakkiboso.com/knots2/donate.html Paypal].
Knots 2 is free software, but if you feel like donating, you can donate via [http://nakkiboso.com/knots2/donate.html Paypal].

Latest revision as of 13:54, 26 June 2013

NOTICE! It seems VLC 1.1 was released with broken asf muxing and subtitles stopped working too, so don't upgrade from 1.0.6. You can use VLC Portable too. Just copy it to Knots/win32 folder and change the path in settings.

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.

Please note that transcoding requires a lot of CPU power and enough memory, especially if source material is high definition quality. If your CPU has several cores and decent amount of memory, you may be able to view 1080p material on your Nokia without the need to re-encode them first.

Contents

[edit] 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

[edit] Quick setup guide

  1. Download and install VLC media player and the server software (see below).
  2. Start the server
  3. Open a browser (Firefox, Chrome, Safari, not IE) and enter address http://localhost:1978/
  4. Click on the status tab and make sure VLC is running. If it isn't, make sure the path to vlc.exe executable is correct under 'settings' tab. Save settings and restart server.
  5. Click on the 'collection' tab, add the folders that contain your media to the list and click on 'update collection' button. Wait until scan is finished.
  6. Install client and start it. You should be automatically connected and able to listen/view your media.

If you want to be able to view media outside your home, through 3G for example, do the following:

  1. Click on settings tab and add a new user. Click on the username that appears on the list, set role to admin, add a password and save the user. Then set "Use authentication without SSL" to yes and save settings. Enter your admin username and password to login.
  2. Click on settings tab and enable remote discovery. You can use the same username and password you used to authenticate to server if you wish, but they can differ.
  3. Once you have enabled remote discovery, you need to open access to your computer. If it's directly connected to internet, open ports 1978, 19780-19790. If you use a wireless router or similar, consult the manual on how to do port forwarding. Forward ports 1978 and 19780-19790 to your computer.
  4. Once you have opened access to your computer, you can playback a video using the browser, click on the 'Hide window' button, click on settings tab and click on 'Check server accessibility from the internet' button. You should see a message saying everything is setup correctly if all is ok.
  5. Then finally open the client, click on window title bar, click on 'Remote discovery' and authenticate with your remote discovery username and password. If authentication succeeds, you should be able to access your computer automatically from outside your network even if your computer has dynamic ip address.
    • Please note that for watching video through 3G you need to lower the video quality a lot. You can try the Nokia N8x0 profile first and lower bitrate and resolution until it plays without glitches. You also need to have enough upload speed on your internet connection.

[edit] 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.

[edit] Dependencies

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

[edit] Ubuntu

These 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.

[edit] Debian (sid)

Debian follows the Debian Free Software Guidelines policy, which prevents inclusion of several codecs with potential patent issues. To run Knots2, add the Debian-Multimedia Repository to your sources list, install the keyring to avoid warnings, then open a root terminal (su root) and:

apt-get update && apt-get install ruby1.8 ruby rubygems libsqlite3-ruby libopenssl-ruby vlc ffmpeg 

Then, to ensure that all requisite libraries are installed:

apt-get install libavcodec52 libavdevice52 libavfilter1 libavformat52 libavutil50 libmp3lame0 libpostproc51 libswscale0

This should allow the knots server to transcode using the default knots2 profiles.

[edit] OS X

Install latest VLC and ffmpegX to /Applications.

[edit] 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.

[edit] Server

[edit] Linux / FreeBSD / OS X

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

old repository info, it was no longer there:

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-06-02).

[edit] Windows

Download the installer (Updated 2010-06-13). Install and start the server from the start menu. Then select Configure server from the menu to configure it.

Advanced Windows users who want fixes and features quickly can use git too. Following is required only if you want to go through the trouble of updating the server by hand from time to time and report possible bugs about the new features.

Install Git for Windows from here. Be sure to add the git binary to your path when asked (2nd option). If you are using Vista/7, make sure you run the installer with administrator rights. Once it's installed, open cmd.exe and run these commands:

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

Then download the installer, install it somewhere and copy the ruby folder and all the executables and cmd files to c:\knots. Then delete the folder made by the installer and edit the Knots 2 menu items to point to c:\knots. After that you can always update the server to latest version: open cmd.exe and run these commands:

cd c:\knots
git pull

after pulling the latest changes, run Migrate.cmd to migrate possible database changes.

[edit] Sheevaplug

Sheevaplug doesn't have enough power to do transcoding, but you can listen to music and watch sd material using the Passthrough profile. 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.

[edit] 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

[edit] Client

Client for the N8x0 (OS2008/diablo) is available from the extras repository. Client for the N900 (Maemo5/fremantle) is available from the extras-devel repository. 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. You should not enable extras-devel if you don't know what you are doing. Please read the extras-devel article before installing Knots 2 for the N900

[edit] Accessing the server from the internet securely

You can stream videos and music from outside your home network using 3G or WLAN, but make sure you make the server more secure. Check Can I use the server to view stuff from the internet? under Questions and Answers on how to enable basic auth for the server. If you want SSL encryption for more secure server, you need a custom libsoup 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:

For the N900

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

For the N8x0

root
apt-get install libgnutls26 wget
wget "http://nakkiboso.com/knots2/libsoup2.2-8_2.2.105-4_armel.deb"
dpkg -i libsoup2.2-8_2.2.105-4_armel.deb
rm libsoup2.2-8_2.2.105-4_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 like N8x0 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 6 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. After enabling remote discovery you can test your server setup with a click of a button.

[edit] 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

[edit] Questions and Answers

[edit] Windows

  • Knots finds my media, I can browse it, but everytime I click on play I get an error message saying Stream failed to start. What is wrong?
    This may be caused by Windows Vista/7 UAC, that prevents VLC from starting properly. To fix this, select stop server from the menu to shutdown Knots. Then go to the directory where vlc.exe is, create an empty text file inside it with administrator rights and copy the following text to that file:
vlc.exe -Vdummy --intf=telnet --telnet-host=localhost --telnet-port=4212 --telnet-password=knots -vvv

and save it. Then rename the file to startvlc.cmd and double click it. That should show the UAC prompt asking your permission to run VLC. Once you have allowed that, Knots should work normally.

  • 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.

[edit] Linux

  • I can't view any videos.
    Did you install the correct 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.
  • Knots stopped working after I upgraded to VLC 1.1
    VLC developers rewrote the telnet interface and renamed the old one. if VLC fails to start, run:
killall -9 ruby vlc
./scripts/setup new_vlc 1 "VLC >= 1.1"

and restart the server.

  • How do I start Knots on startup?
    It depends on your linux distribution, but usually you can add the following line to your /etc/rc.local
su -c "/full/path/to/knots.rb > /dev/null 2> /dev/null &" yourusername
  • If you want to be able to view your knots session that was autostarted, you may choose to use the 'screen' application that will create a separate shell session for your knots server.

First install 'screen', (if not already done):

sudo apt-get install screen

Again, starting knots using screen is done from rc.local:

sudo -u yourusername -H screen -d -m -S kno /home/yourusername/knots/startknots.sh

Where the startknots.sh script is simply:

#!/bin/sh
cd /home/'''yourusername'''/knots
./knots.rb

The screen session can then be resumed from a shell session by issuing the command:

screen -R kno

or to simplify this action further, put an alias in the file /home/yourusername/.bash_aliases:

alias kno='screen -R kno'

[edit] 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.

[edit] Server

  • Page content doesn't seem to update.
    That's because most 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 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 enigma1 requires the Zapstream plugin to be installed, enigma2 should work out-of-the-box.
  • How can I make the server output some debugging messages to the terminal?
    Run
    ./scripts/enable_debug true
    to enable debug and
    ./scripts/enable_debug false
    to disable it.
  • Can I use the server to view stuff from the internet?
    Yes, just create an admin user first. Then click on the username and set a password and save. Then enable Force authentication from the settings. If you want SSL encryption, enable SSL too. Make sure server asks for authentication and that you can login before enabling access from the internet. You need to open/forward the port you are using and then 19780 for the actual video stream (and +1 for each additional video stream). After enabling remote discovery you can check that your server is properly setup without having to use the client from outside your network.
  • 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.

[edit] Client

  • Why isn't there a pause button?
    Long story short, it would technically work as stop and resume now so use stop and resume instead.
  • 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.
  • I see no rotation menu item on my N8x0.
    Please see Rotation
  • Can I just add sticky servers with credentials and disable the automatic discovery?
    Sure, but you need to do it from the command line using xterminal. Here is an example of two sticky servers, first with authentication and SSL, second normal and discovery disabled for faster startup:
gconftool-2 -s /apps/knots/sticky_server0 "My Closed Server/1/1978/server_address/username/password" -t string
gconftool-2 -s /apps/knots/sticky_server1 "My Open Server/0/1978/server_address" -t string
gconftool-2 -s /apps/knots/enable_discovery false -t string
  • I do not hear sound on the tablet client, but i do on the server.
    Ensure that the mplayer volume is up on the client by repeatedly pressing the + rocker button (volume up) For the n900 confirm the phone sound profile is "general" and not "silent."
  • Can I change the mplayer command used to view the stream?
gconftool-2 -s /apps/knots/mplayer_command "/usr/bin/mplayer -your custom -settings" -t string

Amount of cache, X window id and stream address get appended automatically.

[edit] 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.
  • What about image support?
    As a side effect, you can actually use Knots as an image viewer too. Knots will treat images as videos that will play for 5 seconds. You need to have the latest server installed for it to work. Just add jpg,jpeg,png,gif to the list of scanned file extensions in the settings. This is totally unsupported though and may cause some strange behavior.
  • 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.

[edit] Problems

  • My VLC doesn't seem to work.
    For now VLC version needs to be 0.9.3 - 1.0.6. Newer version may work if bugs get fixed, but older ones will not work.
  • My database is all messed up, how do I start fresh?
    Close the server, go to Knots folder, delete the .config folder and restart the server again. Linux/OS X users can do this easily from the command line when server is not running:
rm -rf ~/.config/knots2
  • My collections is very big and I often get 'No results' messages when browsing it. How do I make it faster?
    You can speed it up by tagging your media so that results don't become so big, but you can also add a bigger value to the network timeout field of your transcoding profile. Try using something like 90.
  • I locked myself out with user settings, how can I fix that?
    Run the reset_settings script, it will remove all users, but keep the media. On Windows it's win32/ResetSettings.cmd and on Linux/OS X you can run:
./scripts/reset_settings
  • Browsing etc. works fine, but playback only produces black screen with no sound and video. Progress bar works though. What's wrong?
    You probably haven't opened/forwarded ports 19780-19790 on your router/desktop firewall.

[edit] 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.

[edit] Discuss

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

[edit] Contact

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

[edit] Donate

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