--- /dev/null
+##Command-line Options
+
+Usage: `tvheadend [OPTIONS]`
+
+###Generic Options
+
+```no-highlight
+-h, --help Show this page
+-v, --version Show version infomation
+```
+
+###Service Configuration
+
+```no-highlight
+-c, --config Alternate config path
+-B, --nobackup Do not backup config tree at upgrade
+-f, --fork Fork and run as daemon
+-u, --user Run as user
+-g, --group Run as group
+-p, --pid Alternate pid path
+-C, --firstrun If no user account exists then create one with
+ no username and no password. Use with care as
+ it will allow world-wide administrative access
+ to your Tvheadend installation until you edit
+ the access-control from within the Tvheadend UI
+-U, --dbus Enable DBus
+-e, --dbus_session DBus - use the session message bus instead system one
+-a, --adapters Only use specified DVB adapters (comma separated)
+ --satip_rtsp SAT>IP RTSP port number for server
+ (default: -1 = disable, 0 = webconfig, standard port is 554)
+ --satip_xml URL with the SAT>IP server XML location
+```
+
+###Server Connectivity
+
+```no-highlight
+-6, --ipv6 Listen on IPv6
+-b, --bindaddr Specify bind address
+ --http_port Specify alternative http port
+ --http_root Specify alternative http webroot
+ --htsp_port Specify alternative htsp port
+ --htsp_port2 Specify extra htsp port
+ --useragent Specify User-Agent header for the http client
+ --xspf Use xspf playlist instead M3U
+```
+
+###Debug Options
+
+```ini
+-d, --stderr Enable debug on stderr
+-n, --nostderr Disable debug on stderr
+-s, --syslog Enable debug to syslog
+-S, --nosyslog Disable syslog (all msgs)
+-l, --logfile Enable debug to file
+ --debug Enable debug subsystems
+ --trace Enable trace subsystems
+ --fileline Add file and line numbers to debug
+ --threadid Add the thread ID to debug
+ --libav More verbose libav log
+ --uidebug Enable webUI debug (non-minified JS)
+-A, --abort Immediately abort
+-D, --dump Enable coredumps for daemon
+ --noacl Disable all access control checks
+ --nobat Disable DVB bouquets
+-j, --join Subscribe to a service permanently
+```
+
+###Testing Options
+
+```no-highlight
+--tsfile_tuners Number of tsfile tuners
+--tsfile tsfile input (mux file)
+```
--- /dev/null
+##Debugging
+
+###Trace Options
+
+The following options can be passed to tvheadend to provide detailed debugging
+information while the application is running. Trace debugging has to be enabled
+at build time (`--enable-debugging`) and can then either be specified on the command-
+line (e.g. `tvheadend -u hts -g video --trace <module>`) or in the web interface (_Configuration -> Debugging_).
+
+More than one option can be used, e.g. _--trace cwc,dvr,linuxdvb_
+
+no-highlight
+
+```
+all
+access
+bouquet
+capmt
+cwc
+descrambler
+diseqc
+dvbcam
+dvr
+eit
+en50221
+epg
+epggrab
+fastscan
+fsmonitor
+gtimer
+htsp
+httpc
+idnode
+linuxdvb
+main
+mkv
+mpegts
+opentv
+parser
+pass
+psi
+satip
+satips
+scanfile
+sdt
+service
+service_mapper
+settings
+subscription
+tcp
+thread
+time
+timeshift
+transcode
+tsfile
+tvhdhomerun
+upnp
+```
--- /dev/null
+##Updating the Documentation 5 April 2016
+
+The documentation is written in markdown, and then converted for
+direct inclusion to tvheadend binary. The markdown processor in
+tvheadend binary adds also other information from the internal
+class system.
+
+The User Guide
+in [documentatation repository](https://github.com/tvheadend/tvheadend-documentation)
+fetches the markdown files using the build-in web server and use
+them as source for mkdocs.
+
+####Instructions for on-line help
+
+Change markdown files in docs/markdown, docs/classes, docs/wizard and type
+make. Follow
+[development page](https://tvheadend.org/projects/tvheadend/wiki/Development).
+
+####Instructions for User Guide (FIXME!)
+
+Broadly:
+
+1. Install dependencies ([mkdocs](http://www.mkdocs.org/) and
+[git](https://help.github.com/articles/set-up-git/))
+
+2. Clone the [documentation repository](https://github.com/tvheadend/tvheadend-documentation)
+
+3. Make changes locally. Pay close attention to formatting and syntax -
+use the live reload function (`mkdocs serve`) to preview them.
+
+4. When you're happy, push the changes to your remote repository and open
+a pull request
+
+> Because we upload the theme as well, what it looks like locally should be
+> 100% representative of what it looks like once it's pushed to the Internet.
+
+Command sequence (this presumes Linux, but Windows is very similar):
+
+* `cd ~/tvheadend-documentation`
+* `git add -A` (presumes to add everything, you can of course be selective)
+* `git commit -m "Summary of changes"`
+* `git push`
+
+... and then open the PR on github
+
+To update and resync, someone (me, probably!) needs to:
+
+1. Merge the changes
+2. Pull the latest revisions from the repository
+3. Convert the webui files: `./convert.sh docs/webui <target_directory>`
+
+To merge the webui files into tvheadend, copy them into `<your tvheadend clone>/docs/html`,
+push them to your remote repository and open a PR to merge them into master.
+
+4. Convert all files: `mkdocs build --clean`
+5. Copy the contents of the resultant `site` directory to gihub pages
+
+To publish the entire User Guide to gihub, use `resync.sh` or use the
+following command sequence:
+
+* `cd $YOUR_BASE_DIR/tvheadend.github.io`
+* `cp -r $YOUR_BASE_DIR/tvheadend-documentation/site/* .`
+* `git add -A` (presumes to add everything)
+* `git commit -m "Resync"` (or whatever your commit message is)
+* `git push`
--- /dev/null
+## FAQ: Frequently-asked Questions
+
+### Q: How do I get a playlist for all my channels?
+
+Tvheadend can generate a playlist of all your mapped services (channels). You can download it from the webui at `http://IP:Port/playlist`, e.g. `http://192.168.0.2:9981/playlist`.
+
+### Q: Why am I getting a playlist when trying to view/stream a channel?
+
+By default Tvheadend's *Play* links are playlists, although not all players accept them (e.g. Media Player Classic Home Cinema). You can bypass this by removing the `/play/` path from the url.
+
+### Q: Tvheadend has scanned for services but some rows in the Service Name column are blank, is that normal?
+
+Yes, not all services are given a name by providers. These services are usually hidden for a reason and are often used for things such as encrypted guide data for set-top boxes, interactive services, and so on.
+
+If you're not seeing any service names at all this may indicate an issue with your hardware and/or configuration.
+
+### Q: I get a blank page when trying to view the web interface!
+
+This usually happens when Tvheadend is installed incorrectly. As a start, make sure that the web interface path `/usr/share/tvheadend/src/webui/static/` exists and isn't empty.
+
+Note: The above path only applies to Debian/Ubuntu systems others may differ.
+
+###Q: Why can't I see my tuners in Tvheadend's interface?
+
+This is normally because they're not installed properly. Check syslog/dmesg (e.g. `dmesg | grep dvb`) and see that you have startup
+messages that indicate whether or not the tuners have initialized properly. Similarly, check `/dev/dvb` to
+see if the block device files (i.e. the files used to communicate with the tuner) have been created correctly.
+
+The other major cause of this issue is when you're running Tvheadend as a user who doesn't have sufficient
+access to the tuners, such as not being a member of the *video* group.
--- /dev/null
+##Markdown/Formatting Crib Sheet
+
+Some notable items about how formatting is used on this particular site.
+
+In general, **keep it simple**, especially if you're contributing to the
+pages that get carried over into the web help. The simpler the formatting,
+the cleaner the conversion, the less tidying up there is afterwards.
+
+###References
+
+* Markdown basics: [GitHub mastering markdown](https://guides.github.com/features/mastering-markdown)
+
+###Paragraphs Versus Definition Lists
+
+Watch this one - indentation is key.
+
+**This is paragraph formatting**
+: with a subsequent explanation
+
+ **This is paragraph formatting**
+ : with a subsequent explanation
+
+**This is definition list formatting**
+: with a subsequent explanation
+
+ **This is definition list formatting**
+ : with a subsequent explanation
+
+They may render the same here, but note the extra leading spaces in the
+second example: this means that they will convert differently for use in
+the web interface help. That in turn means your formatting will be all
+over the place unless you handle the dl/dt/dd formatting in Tvheadend's CSS.
+
+Stick to paragraph formatting unless and until you have a need for
+definition lists.
+
+### Lists
+
+Mixed lists don't work without further python extensions. Be careful.
+
+```markdown
+1. First ordered list item
+2. Another item
+ * Unordered sub-list.
+1. Actual numbers don't matter, just that it's a number
+ 1. Ordered sub-list
+4. And another item.
+
+ You can't have have properly indented paragraphs within list items.
+
+* Unordered list can use asterisks
+- Or minuses
++ Or pluses
+
+Oh, and
+
+77. Each numbered (ordered) list will restart from 1.
+```
+
+... produces:
+
+1. First ordered list item
+2. Another item
+ * Unordered sub-list.
+1. Actual numbers don't matter, just that it's a number
+ 1. Ordered sub-list
+4. And another item.
+
+ You can't have have properly indented paragraphs within list items.
+
+* Unordered list can use asterisks
+- Or minuses
++ Or pluses
+
+Oh, and
+
+77. Each numbered (ordered) list will restart from 1.
+
+### Tables
+
+Tables can be constructed as follows.
+
+The markup code:
+
+ First Header | Second Header
+ --------------------------- | -------------
+ Content from cell 1 | Content from cell 2
+ Content in the first column | Content in the second column
+
+Will generate:
+
+First Header | Second Header
+--------------------------- | -------------
+Content from cell 1 | Content from cell 2
+Content in the first column | Content in the second column
+
+And if you don't want a header, you can leave it out - but the cells
+remain in this theme, so I'd suggest you don't do this as it's ugly:
+
+ |
+ --------------------------- | -------------
+ Headless table cell 1 | Content from cell 2
+ Content in the first column | Content in the second column
+
+ |
+--------------------------- | -------------
+Headless table cell 1 | Content from cell 2
+Content in the first column | Content in the second column
+
+We're using default heading/cell justification, so it's consistent throughout.
--- /dev/null
+##Status - Connections
+
+This tab shows information about all active connections.
+
+This is a read-only tab; nothing is configurable.
+
+
+
+---
+
+####Menu Bar/Buttons
+
+The following functions are available:
+
+Button | Function
+-----------|---------
+**Help** | Display this help page.
+
+##Note: FIXME: Need to add a help button!
+
+---
+
+####Grid Items
+
+The main grid items have the following functions:
+
+**Item**
+: Description
+
+**Item**
+: Description
+
+**Item**
+: Description
+
+**Item**
+: Description
--- /dev/null
+##Status - Service Mapper
+
+This tab shows information about current service mapping activity.
+
+This is a read-only tab; nothing is configurable.
+
+
+
+---
+
+####Menu Bar/Buttons
+
+The following functions are available:
+
+Button | Function
+-----------|---------
+**Help** | Display this help page.
+
+##Note: FIXME: Need to add a help button!
+
+---
+
+####Grid Items
+
+The main grid items have the following functions:
+
+**Item**
+: Description
+
+**Item**
+: Description
+
+**Item**
+: Description
+
+**Item**
+: Description
--- /dev/null
+##Status - Stream
+
+This tab shows information about all currently-open streams.
+
+This is a read-only tab; nothing is configurable.
+
+
+
+---
+
+####Menu Bar/Buttons
+
+The following functions are available:
+
+Button | Function
+-----------|---------
+**Help** | Display this help page.
+
+##Note: FIXME: Need to add a help button!
+
+---
+
+####Grid Items
+
+The main grid items have the following functions:
+
+**Item**
+: Description
+
+**Item**
+: Description
+
+**Item**
+: Description
+
+**Item**
+: Description
--- /dev/null
+##Status - Subscriptions
+
+This tab shows information about all active subscriptions to Tvheadend.
+
+This is a read-only tab; nothing is configurable.
+
+
+
+---
+
+####Menu Bar/Buttons
+
+The following functions are available:
+
+Button | Function
+-----------|---------
+**Help** | Display this help page.
+
+##Note: FIXME: Need to add a help button!
+
+---
+
+####Grid Items
+
+The main grid items have the following functions:
+
+**Item**
+: Description
+
+**Item**
+: Description
+
+**Item**
+: Description
+
+**Item**
+: Description