Skip to content

Commit

Permalink
docs: Updated docs to have more Linux specific details
Browse files Browse the repository at this point in the history
When working to get this software running on Linux, I had a few things
that tripped me up. This commit updates the docs with my findings, to
try and help make it easier for others to setup and use this software on
Linux, hopefully without as many obstacles in their way.
  • Loading branch information
LRTNZ committed Apr 23, 2020
1 parent be0fe3a commit 0b1b3dd
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,39 @@ The built files will be placed in `./dist`, make sure you copy all files into th

Note: Due to an incompatability with a dependency and pkg, a fix up step is performed during build until this is resolved upstream [pkg](https://github.com/zeit/pkg/issues/75) [express-pouchdb](https://github.com/pouchdb/pouchdb-server/issues/326). This could cause issues when updating the express-pouchdb package.

Usage on Linux
---------------

On Ubuntu and similar distros, the easiest way to get nodeJs and npm installed, would be to run:
`sudo apt-get install nodeJs npm`

Due to the differences between the Linux and Windows versions, the Linux build of this software relies
on FFmpeg being installed in a way that it can be used at the command line. This is most easily accomplished
through the use of `sudo apt-get install ffmpeg`, which will install the appropriate prebuilt build of
ffmpeg for your distro. You can check as to whether or not it is already installed by running `ffmpeg -version`.

A tip to easily run the media scanner in conjunction with the caspar server, is to start it as a background job.
The simple way to do this, is when in the server folder where the scanner has been copied to, is to:
* Start it as a background job by running:
* `./scanner &`
* To then kill it, run:
* `jobs`   (When back at the normal cmd line)
* Take note of it's process number.
* Then run:
* `kill %n` , where `n` is the process number.

If you are having issues getting the scanner to work correctly, you may inadvertently have some file permissions for the server
and media folder set incorrectly. See here for some more details on it: https://github.com/CasparCG/media-scanner/issues/28
However, the basic fix should be to:
1. Navigate to the directory above your server folder.
2. Run: (Prefix with sudo if required) `chown -R user:user name_of_server_dir/`   "`user`" is the user that will be running caspar
3. Run: (Prefix with sudo if required) `chmod -R 755 name_of_server_dir/`   Sets permissions of the server folder
4. If your media folder is not a subfolder of your server directory, execute the above commands upon it as well.


If you are having issues with getting the caspar client to list the media on your server, you may have an issue with the scanner trying to communicate over IPv6/tcp6, instead of IPv4.
To check if this is the case, once you have started the scanner, if you log into a second terminal/ssh session and run `sudo netstat -tulpn | grep LISTEN` , you should see a process called `scanner` listening to IPv4 tcp port 8000. If it is listening to an IPv6 port, you will need to make the minor change to the scanner code as shown here: https://github.com/CasparCG/media-scanner/pull/48, rebuild the scanner, and copy the new build into the server folder.

License
-------

Expand Down

0 comments on commit 0b1b3dd

Please sign in to comment.