HOWTO Start and Setup Cowfish Streamingserver 0.8.2

Requirements Server: Requirements Client:

Start Server

  1. download
    Download the latest stable version from http://sourceforge.net/projects/cowfishserver.
  2. execute cowfishstreaming-0.8.2-RC5.jar
    Execute the Java archive file by doubleclicking it or execute the command "java -jar cowfishstreaming-0.8.2-RC5.jar".
  3. open webbrowser
    Open the URL http://127.0.0.1:8088 within your webbrowser.
  4. open Preferences Editor
    Click the About Info in the lower right corner of the webpage and click the Preferences link. Your WebBrowser must be started on the same machine as the server to do this. Nevertheless, you can also edit the preferences with an ASCII editor of your choice.
  5. edit preferences files & restart the server
    (see next section)

Configure Preferences

1. Open the Preferences file prefs.properties (click link)
Use the link prefs.properties (click link) to edit the preferences.
(You can also use an ASCII editor. The preferences files are usually stored within your home directory, for example "C:\Dokumente und Einstellungen\myname\cowfish_streamingserver\" on a german windows OS or "/Users/myname/" on MacOS X for user "myname".)
2. Set the property vcr_dir
Set the property vcr_dir to the directory where the DVB Box stores the recorded "*.crid" files. Finally press the save button and restart the server.
a) Acces via (SMB) Filesystem

ATTENTION: Use two backslash characters to specify a backslash.

Example:
The *.crid files are located at the server "Media", Share "vcr" (which means: the shared windows folder is "\\media\vcr").

So set in prefs.proprties:
vcr_dir=\\\\media\\vcr
b) Acces via FTP
If the Harddisk drive is directly connected to the Settop Box you have to use the FTP access. FTP is also recommended if want to use the timeshift feature (see additional property readwrite_access).
  1. Your Settop Box must be running and being connected to the network.
  2. Get the IP address of the box.
  3. Check the firmware version of the box and the USB port where the HD is connected to.
  4. First make sure that you can access the FTP directory containing the *.crid files with your browser or FTP client.
  5. set the property vcr_dir to ftp://USER:PASSWORD@BOX-IP/DIRNAME (see the following examples).
  6. If you have the "lemmi"-firmware installed ensure that LEMMI_START_FTP_SERVER is set to "daemon" (see FAQ and www.m740.de/wiki ).
Example:
Since Firmware version 2.1: set in prefs.proprties:
vcr_dir=ftp://media:media@192.168.1.101/USB-HDD-1 (recorded files stored on HDD USB1)
vcr_dir=ftp://media:media@192.168.1.101/USB-HDD-2 (recorded files stored on HDD USB2)
vcr_dir=ftp://usb1:usb1@192.168.2.2/Video (recorded files stored on HDD USB1)
vcr_dir=ftp://usb2:usb2@192.168.2.2/Video (recorded files stored on HDD USB2)
Firmware version number less than 2.0: set in prefs.proprties:
vcr_dir=ftp://media:media@192.168.1.101/USB-HDD
(FTP is supported by the box since firmware 1.50.6)
The ftp server of the dvb-box seems not to be the fastest one - If you want to watch a smooth timeshift you might give it a 10 minute delay. The ftp server of the latest firmware seems also be a little bit faster. I've experienced a very good timeshift operation with an external NAS Device (Buffalo LinkStation) accessed via FTP.
3. Additional Properties: Hide DebugGUI, disable BrowserStart, navi.refresh, readwrite_access (timeshift)
(You have to restart the server to activate the changed properties)
4. Start Viewer via Hyperlink
Method A: If you use a Mozilla (Firefox) or Internet Explorer WebBrowser you can install the VLC Plugin (shipped with the VLC Setup) to start the VLC via hyperlink. (For the Internet Explorer you have to install the VLC-ActiveX component, too). Set the property vlcPlugin.enabled=true to enable the PlugIn links.

Method B: If your WebBrowser and your Cowfish server runs on the same machine you can enable the localplayer option. All you have to do is adjust the following three properties: The VLC player is also suitable to convert a recording to be played on another device (Apple iPod video). (You have to restart the server to activate the changed properties) Please keep in mind that the viewer is started as a subprocess of the server - so it runs in the same user context as the server which might be an security issue if you run the server as a system-service of user 'root'. Also the operation might fail (on Unix Systems), because the viewer would be started for the wrong user-display.
5. Encode Jobs (ffmpeg/ Apple iPod Video / Sony PSP..)
The server offers a job-based encoder interface to convert the recordings to another video format. The preconfigured settings generate LOWRES MP4 .mov files to be viewed on an iPod Video using the ffmpeg encoder (not included).
Requirements: get the encoder (ffmpeg) and place it in the cowfish's bin/ directory. (A lot of similar encoder programs use ffmpeg internally. So you might copy the ffmpeg-Application for MacOS from the ffmpegX package or for windows from the "SUPER" Converter. Some binaries for windows are hosted at http://arrozcru.no-ip.org/ (we used version "ffmpeg-SVN-r7166-static-gpl-win32.zip" for the tests) You might use your favourite search engine to find the executable on the web.) Check the "encoder.program" settings and set the property encoder.enabled=true. Restart the server. Use the new hyperlink "iPodEncoder" to manage the job scheduling.
            
            
    # enable the encoder
    encoder.enabled=true
            
    # flag: encode all recordings automatically
    # set this flag to false to start all jobs manually
    encoder.autoprocess.enabled=false
    
    # name of your encoder (shown as hyperlink)
    encoder.name=iPodEncoder
    
    # destination directory for encoded videos
    encoder.out.dir=C\:\\Dokumente und Einstellungen\\All Users\\Dokumente\\Eigene Videos
    
    # prefix of the encoded video during conversion 
    # Use an absolute path if you want to encode in another directory than 
    # encoder.out.dir, for example C\:\\Dokumente und Einstellungen\\All Users\\Dokumente\\TEMPVideos\\_enc
    encoder.out.temp.prefix=_enc
    
    # executed encoder program (ffmpeg)
    # The following vars are expanded (inklusive "quotes")
    #   ${encoder.in}           // path to input file (MPEG2 TS)
    #   ${encoder.out}          // output file
    #   ${encoder.title}        // Title (ASCII characters)
    #   ${encoder.comment}      // Description/Comment of the record
    #   ${encoder.timestamp}    // Date of Recording 
    encoder.program="C\:\\Dokumente und Einstellungen\\myname\\cowfish_streamingserver\\bin\\ffmpeg.exe" -y -vcodec xvid -b 720 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ab 80 -i ${encoder.in} -s 640x480 -aspect 4\:3 -deinterlace -title ${encoder.title} -timestamp ${encoder.timestamp} -comment ${encoder.comment} ${encoder.out}
    
    encoder.queues.dir=C\:\\Dokumente und Einstellungen\\myname\\cowfish_streamingserver\\data\\queues
    
    # suffix of the generated file
    encoder.suffix=.mov
    
    # temp directory (for fetched MPEG2TS files)
    encoder.temp.dir=C\:\\Dokumente und Einstellungen\\myname\\Lokale Einstellungen\\Temp\\cowfish_enc.tmp
    
    # Number of parallel encoding processes
    #  ${availableProcessors} : number of available processors
    encoder.threads=${availableProcessors}
    
    
            
Encoder hints

Standby/Suspend to Disk and network shares:
If encoder.out.dir points to a networks share it might cause some trouble with the ffmpeg encoder if the computer switches to standby/suspend to disk mode. Solution: Specify a absolute path to a local directory for property "encoder.out.temp.prefix". So ffmpeg will encode to your local filesystem - after that the file is copied by the cowfish to the network share.

iPod Video:
6. Export to ProjectX
If you want to export a recording to ProjectX by clicking a 'export' hyperlink, you have to configure the following prefs.properties:
  1. Install ProjectX (its hosted also at sourceforge). Check the web for already compiled JAR files.
  2. Adjust the properties "edit.command", "edit.command.execdir" and "edit.command.tsfiles.prefix" .
  3. Set edit.enabled=true to activate the export link.
(You have to restart the server to activate the changed properties) This feature is only available on the computer where the cowfish server is running. Please be patient after clicking the export link - ProjectX takes some times to display the gui. To avoid a "freezing" of the ProjectX application you should check the "drop client w/o logout" FTP option in the menu "PreSettings / Net". If you want a faster processing of the TS data, you have to copy them first to your local computer (by "downloading" them using the hyperlink). Then start ProjectX and load the local TS file. Alternatively to this solution you can use ProjectX with Gigaset Extension (see m740 forum) that makes the same job (perhaps, even a little bit better :-)).
examples:
            
        edit.command=java -jar C\:\\Programme\\ProjectX\\ProjectX.jar  -gui -name ${name} -out "C:\Dokumente und Einstellungen\stroeter\\Eigene Dateien\\Eigene Videos" ${tsfiles}
        edit.enabled=true
        edit.command.execdir=C\:\\Programme\\ProjectX
        edit.command.tsfiles.prefix=ftp\://anonymous\:anonymous@192.168.1.108\:21//
ProjectX is loacted at C:\Programme\ProjectX, the dvb files are accessed via FTP from 192.168.1.108 using the account anonymous:anonymous.
7. Optional Init/Exit Scripts for MacOS X and Linux
On non Windows OS you should enable the cmd_init and cmd_exit scripts to mount and unmount the SMB share the vcr_dir points to.
a) set the properties cmd_exit_enabled and cmd_init_enabled=true.
b) edit the file smb_share.properties (click link) and ensure that the property smb_mountdir points to the same directory as the property vcr_dir.

Example:
    # access config for SMB share //media/vcr 
    smb_mountdir=/Users/myname/cowfish_streamingserver/vcr

    smb_host=192.168.1.108
    smb_workgroup=HOMEGROUP
    smb_login=guest:guest
    smb_share=vcr
            

Run Server as a StartupItem (MacOS X)

The preferences "mac/" subdirectory contains the shell script service.sh to install the StartupItem "/Library/StartupItems/CowfishStreamingserver". If anything went wrong check the server's log files and view the OS logfiles with the MacOS X Konsole Application. Please also ensure that the configuration files are correct. Attention: the service is run by the user 'system'. So ensure that system has read and write access to the directories, exspecially the mounted vcr directory.
Check the file /Library/StartupItems/CowfishStreamingserver/CowfishStreamingserver: ensure that the path to the JAR-file is correct (see function StartService).

Cowfish FAQ

Q: The cowfish server running on my linux/unix/solaris system generates no navigation bar grahics.
A: If the server runs in an environment without a X-display you have to set the SystemProperty "java.awt.headless". For example: java -Djava.awt.headless=true -jar cowfishserver.jar

Q: I have problems to conect my cowfish server via FTP to my DVB-box running lemmi-firmware.
A: If you have the lemmi firmware installed please check the LEMMI_START_FTP_SERVER settings. It should be changed to LEMMI_START_FTP_SERVER = daemon (instead of LEMMI_START_FTP_SERVER = inetd) See http://www.m740.de/wiki/var/etc/lemmi-settings.txt#LEMMI_START_FTP_SERVER for additional information.
Q: The cowfish server running on my linux/unix/solaris system displays wrong character.
A: Add the Property file.encoding=ISO-8859-1. For example: java -Dfile.encoding=ISO-8859-1 -jar cowfishserver.jar

Q:How can I convert a recorded movie? I like to watch it on my iPod / PSP, etc..
A: Use the cowfish encoder feature. You might also use ffmpeg or the VLC Client to convert a recorded movie. (ffmpeg for MacOS is included in the ffmpegX package). A (german) manual how to convert a movie using VLC can be found here. Use your favourite search engine to find other tools (and share your hints at the cowfish forum.)

Support - Feed the Cowfish

Das Forum zum Cowfish Streamingserver ist unter www.open7x0.org erreichbar.

Please check the Cowfish Streamingserver bugtracker at http://sourceforge.net/tracker/?group_id=161065 and the Cowfish Streamingserver forum at http://sourceforge.net/forum/?group_id=161065. Feel free to leave a message, if you got problems running the application :-). Don't forget to include additional information like parts of the logfile and OS, JAVA version infos etc.
generated 2007-01-20/13:48 - hosted at SourceForge.net Logo