# Advanced Topics ## Configuration options designed for advanced users - [Artwork](#artwork) - [Manual TiVos](#manual-tivos) - [Edit Channels](#edit-channels) - [Edit Formats](#edit-formats) - [Advanced Settings](#advanced-settings) - [theTVDB](#thetvdb) - [Advanced Subscriptions ](#advanced-subscriptions) - [Filename Templates](#filename-templates) - [Pushover Integration](#pushover-integration) - [Post Processing hook](#post-processing-hook) - [Log Files](#log-files) - [Hidden Options](#hidden-options) - [TiVo Certificates](#tivo-certificates) # Artwork For MPEG files (.MPG, .MP4, .MOV, or .M4V), cTiVo can embed a still picture inside the file to represent it in Finder, iTunes, iOS devices, or other players that understand this standard. First (default case), you can choose the same image used by your TiVo to represent the show; this will be a series-wide image downloaded directly from your TiVo. Secondly, you can choose fan-generated art from theTVDB.com website (although this is dependent on the series/episode/movie being in the database). With this option, you can then choose either episode-specific, season-specific, or series-wide artwork. Thirdly, you can manually add artwork directly to an episode. With the "Art" column enabled in the Now Playing Table, just drag your preferred artwork on top of any existing (or blank) artwork. This will then be embedded in any downloads of that show. cTiVo will even update any pre-existing downloads with that image. You can similarly remove any artwork (manually added or automatic) by dragging the image to the Trash. If manual, this will delete the matching image file from disk and from any existing downloads. Finally, you can store artwork in your download folder, but the filename has to be in a very specific syntax. Note that this is the mechanism that the drag/drop ability uses; it simply creates a file in the appropriate location. The filename must start with the series title (e.g. "The Daily Show with Jon Stewart") with any slashes or colons replaced with dashes. Then you can create a series-generic file (no suffix), a season-specific file (suffix of Snn, or an episode-specific file (suffix of SnnEnn). Movies start with their title and optionally the movie year XXXX as a suffix (e.g. "Fight Club_1999") These files can be in almost any format supported by the OS, and can be stored in the download directory itself or in a "thumbnails" subdirectory of the download directory. If you have enabled series-specific subdirectories within the download directory, they can also be in that directory, or in a "thumbnails" subdirectory of that subdirectory. Finally, if you want to specify an image directory, use the secret command `defaults write ThumbnailsDirectory ` in Terminal. If there is more than one image, it will choose episode-specific, then season-specific, then series-wide in that order. To increase the chances of finding appropriate artwork, it will use the first one it finds in the following order: - Local episode-specific (SnnEnn) - Local season-specific (S00) - Local series-wide - Whichever online source (TiVo or TVDB) you specify - The other online source - Initial frame from video For movies, the order is: - Movie title with matching year suffix - Movie title without year suffix - theMovieDB artwork (if enabled and available) - Initial frame from video Especiallly if you use these facilities, consider giving back to theTVDB and theMovieDB by entering any missing information into their systems, including appropriate artwork! # Manual TiVos Normally, cTiVo discovers TiVos on the local network automatically using a network technology called BonJour. Normally this will work fine, but if you need to enter a TiVo address manually or wish to access your TiVos remotely, you'll need to enter their information here. Simply use the Edit>Edit Manual TiVos menu item. This will show any TiVos you've previously seen or entered. Use the + button to add a new one, or the - button to delete one. If you'd like to temporarily delete one, just uncheck the "Enabled" button. You can get the TiVo's current local IP address from its Networks and Settings screen, although this may change over time, especially when your TiVo is restarted. For the local network, you should always use the ports provided (80/443/1413). You can also enable or disable any TiVo here, as well as set its Media Access Key. Interestingly, you may also be able to use cTiVo remotely, although this can take considerable network ability and patience. Patience both in the sense of trial and error as well as in the upload bandwidth available on your connection to the Internet. You will need to set your router to pass external accesses on certain ports on your main IP address through to your TiVo. As you may be doing this for other devices as well, we also let you adjust the ports cTiVo uses to match whatever port mapping you're doing in your router. If you didn't understand this paragraph so far, then you probably shouldn't be doing this. If you want to press ahead, your steps are: 1. Configure your DHCP to reserve a fixed address for your TiVo. 1. Set up your TiVo to use that address. 1. Configure your router to map three external ports to your TiVo's ports 80, 443, and 1413. 1. Provide those external ports to cTiVo. So as an example, if your external router address is 12.34.45.56 and you want to use ports 3000, 3001, 3002 for your remote TiVo access and your local addresses are in the form of 192.168.1.xx and you want to assign 192.168.1.10 for your TiVo, then you would: 1. Tell DHCP to start assigning addresses at 192.168.1.11 1. Tell your TiVo to use fixed IP Address 192.168.1.10 1. Tell your router to map external ports: - 3000 to 192.168.1.10:80, - 3001 to 192.168.1.10:443 - 3002 to 192.168.1.10:1413 1. Tell cTiVo to create a Manual TiVo named Remote using - IP address of 12.34.45.56 - Port: 3000 - PortSSL: 3001 - PortRPC: 3002 As should be obvious, this is not for the faint-hearted. Configuring your router requires finding and using some rather arcane UIs, and if done incorrectly, can disable your Internet or TiVo access. Note that whether this violates your terms of service with your cable company, TiVo Inc, your internet provider, any random film studio in Hollywood, or anybody else is also entirely up to you. # Edit Channels Cable companies are transitioning from MPEG2 to the newer and more compressed MPEG4, aka H.264. The older Program Stream cannot transport a H.264 file, so cTiVo will automatically switch to Transport Stream when needed. While Transport Stream can be used for MPEG2 videos, this seems to be less reliable. Thus cTiVo tracks which channels require H.264 and will automatically switch when needed. While this process is completely automatic, this screen allows you to see what's happening and control it if desired. These channels will get filled in as you download shows, based on whether or we see the characteristic failure of H.264 over Progressive Stream of no video, just audio in the downloaded file. First, you can simply turn on Transport Stream for all downloads with the control at the top. Generally, "√" means Yes, "-" means maybe or unknown, and "□" means No. - **SkipMode?** specifies to use SkipMode on this channel. It's marked Yes when we've seen SkipMode on a channel, or it's one of TiVo's known channels. - **Commercials?** specifies that a given channel has no commercials, so don't bother doing comskip on it (e.g. PBS) - **Use TS** lets you control whether to use Transport Stream or not for a given channel. √ means "use TS". - means "cTiVo chooses" based on whether we have seen H.264 or not, and "□" means "use PS". - **H.264?** indicates whether we've seen a channel use H.264("√") or MPEG2 ("-") or none yet("□"). You can manually remove channels from this list by selecting them and hitting the Minus sign at the bottom, or add one by hitting the Plus sign. If you'd like us to check all your channels, then click on Test All Channels. This will add a show from every channel your TiVo has recorded (including Suggestions) with a special TestPS Format. This Format only downloads a short segment from each show to quickly test every channel. You can then remove all such Tests with the final Remove All Tests button. This is not required as each channel will simply retry the first time we see a PS failure, but it can be interesting to see what channels have converted. # Edit Formats If you'd like to configure a different video encoder, or provide different parameters to the built-in ones than we have configured, then you can use the Edit>Edit Formats menu item. This gives you a screen where you can configure a new encoder format, or use an existing format as a template. ") - Start by selecting the closest Format from the Formats pulldown. - If it's a built-in Format, **Duplicate** it to create a new one that you can modify with your new parameters. You cannot edit a built-in format without duplicating it. You could create one from scratch with **New**, but it's probably easier to modify an existing one. Obviously, if you no longer want a user-defined format, you can **Delete** it here as well. - There is a special case for Handbrake as they have many built-in presets, and you can even define your own as well in their GUI. Just select any built-in Handbrake Format and pull down the preset menu on the right. This will create a new User Format with that preset, which you can then modify as you see fit. - All formats can either be hidden or visible in the main user interface. So if you don't have any use for any of the built-in formats, just turn off **Show in User Interface**. Similarly, we hide many that are not commonly used, just check that box to use them. - Below the line are all the parameters available for editing. Again, built-in formats cannot be edited without Duplicating, so their parameters will be greyed out. - **Name** as displayed in the menu. This must be unique versus all other built-in or user formats. - **File Extension for Encoded File**. cTiVo will use this to generate the filenames. Some encoders ignore an incorrect extension, and put the correct one in, which will cause problems, so be sure this is correct. - **Description**. This is just a short human-readable reminder of what the other options mean. - **Input Filename/Output Filename/Edit List Switch:** these are passed in the command line to the encoder (see [Arguments](#arguments) - **Encoder to Use**: See [Encoder To Use](#encoder-to-use) - **Regex for Encoder Log**: If the encoder cannot support simultaneous encoding (e.g. HandBrakeCLI), the encoder should provide in its standard output the percentage complete as a number from 0-100.  You will need to provide a regex expression for extracting this number from the last few lines of the standard output.  For example, HandBrakeCLI writes its progress as 87 %, so the regex is `([\%` This will only be used when doing sequential downloading, decrypting, and encoding.  When doing simultaneous encoding, the data flow through the pipes is used to measure progress. - **Video/Audio/Other Options for Encoder:** These are passed on the command line to the encoder; see [Arguments](#arguments). - **Comskip Options**: ComSkip is an experimental feature for cTiVo; See [the comskip project](http://www.kaashoek.com/comskip/). Included in this implementation is a configuration file (comskip.ini), which can be found on the [cTiVo source code page/cTiVo/comskip.ini). In addition to other command line parameters, you can replace the built-in comskip.ini with your own comskip.ini file by entering "--ini=\/comskip.ini" providing the full path to your own file. - **ccExtractor Options**: ccExtractor exports subtitles from the video stream into a .srt text file. See [the ccExtractor project](http://ccextractor.sourceforge.net/using-ccextractor/command-line-usage.html) - **Can run download and encode at same time** should be set only if the encoder can run as a final stage of a pipeline (stdin being the source pipe). - **Can be added to iTunes** means that the file format generated is compatible with iTunes, and will simply enable or disable that option for the user. - **Can Skip Commercials** means whether to enable that option for the user. If enabled, the encoder must handle the edl as generated by comSkip. ## Encoder to Use Enter either the name or the full path to the encoder to be used. The paths searched for the encoder are (in order) ```` /usr/local/bin /opt/local/bin /usr/local//bin /opt/local//bin /usr/bin ```` If the encoder accepts - (dash) for standard input, you should check 'Can run download and encode at the same time' to allow simultaneous encoding. The encoder must be marked as executable. mencoder & HandBrakeCLI are included in the cTiVo bundle. Your encoder can be a script file (with standard first line of #! to specify script type, such as #/usr/bin/sh for shell script or #!/usr/bin/osascript for Applescript), provided it accepts the above arguments and is marked as executable. Be sure to test script-based encoders with shows having special characters like single or double quotes or Unicode characters in their names. ## Arguments The command line passed from the options are: ````