X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=cis%2Fconfig.py;h=adb5ed0aa4586dd758fc9e1ebdc9dff7abab7eef;hb=961611537619595dc7eed2104faafcd0c9cdc57b;hp=e3b1cca23cd98944a1f02a65b52667425f3180ff;hpb=1ab12b6c509b6a6be95f79dc50089649a32872da;p=living-lab-site.git diff --git a/cis/config.py b/cis/config.py index e3b1cca..adb5ed0 100644 --- a/cis/config.py +++ b/cis/config.py @@ -1,19 +1,77 @@ #!/usr/bin/env python +import logger + # Make here all necessary imports required for API classes. -from api import avhandling -from api import file_transfer +from api import ffmpeg +from api import ftp + + +# === GENERAL CONFIGURATIONS === +LOG_LEVEL = logger.LOG_LEVEL_DEBUG +# Security features are experimental, incomplete and may not work. +SECURITY = False +# CIS periodically scans TORRENTS_PATH for new torrents at +# START_DOWNLOADS_INTERVAL seconds. Note that this is a backup measure, because +# CIS normally finds out about new torrents from start_torrents messages. +START_DOWNLOADS_INTERVAL = 24 * 3600.0 # Once a day + + +# === FILE TRANSFER CONFIGURATIONS === +# Path from the Web Server where the raw input video file is stored. +WS_UPLOAD_PATH = 'devel/data/upload' +# Path from the Web Server where the output torrent files will be stored. +WS_TORRENTS_PATH = 'devel/data/torrents' +# Path from the Web Server where the output thumbnail image files will be +# stored. +WS_THUMBS_PATH = 'devel/data/thumbs' + + +# === URLS === +#BT_TRACKER = "http://p2p-next-10.grid.pub.ro:6969/announce" +# BitTorrent tracker URL. +BT_TRACKER = 'http://p2p-next-10.grid.pub.ro:6969/announce' +# Web server's URL for content ingestion completion. P2P-Tube uses +# http:///video/cis_completion . +#WS_COMPLETION = 'http://p2p-next-03.grid.pub.ro:8081/cis_completion' +WS_COMPLETION = 'http://p2p-next.cs.pub.ro/devel/video/cis_completion' + + +# === CIS PATHS === +# RAW_VIDEOS_PATH, THUMBS_PATH and MEDIA_PATH need not to be in distributed +# file system. +# Temporary directory for uploaded videos transfered from the web server. +RAW_VIDEOS_PATH = '/home/p2p/tmp/raw' +# Temporary directory for image thumbnails. +THUMBS_PATH = '/home/p2p/tmp/thumbs' +# Temporary directory for converted videos. +MEDIA_PATH = '/home/p2p/media' +# TORRENTS_PATH contains torrents files shared by all CIS machines and needs to +# be placed in a distributed file system. +TORRENTS_PATH = '/home/p2p/export/p2p-tube/torrents' + -# BitTorrent configurations. -BT_TRACKER = "http://p2p-next-10.grid.pub.ro:6969/announce" +# === EXTERNAL PROGRAMS API CLASSES === +# API class for a prgram which retrives audio/video information, like duration. +AVINFO_CLASS = ffmpeg.FFprobeAVInfo +# API class for a prgram which transcodes an audio/video file. +TRANSCODER_CLASS = ffmpeg.FFmpegTranscoder +# API class for a prgram which extracts thumbnail images from a file. +THUMB_EXTRACTOR_CLASS = ffmpeg.FFmpegThumbExtractor +# API class for a prgram which transfers files between Web Server and CIS. +FILE_TRANSFERER_CLASS = ftp.FTPFileTransferer -# External programs API classes. -AVINFO_CLASS = avhandling.FFmpegAVInfo -TRANSCODER_CLASS = avhandling.FFmpegTranscoder -THUMB_EXTRACTOR_CLASS = avhandling.FFmpegThumbExtractor -FILE_TRANSFERER_CLASS = file_transfer.FTPFileTransferer -# External programs binary file. None means default. +# === EXTERNAL PROGRAMS BINARY FILES === +# Set this values to None if you want default values provided by the API +# class to be used. It may be useful to complete this parameters if you +# compiled the third-party binaries from sources and you don't have +# administrative privileges to install them. +# Binary of a prgram which retrives audio/video information, like duration. +AVINFO_BIN = None +# Binary of a prgram which transcodes an audio/video file. TRANSCODER_BIN = None -THUMB_EXTRACTER_BIN = None +# Binary of a prgram which extracts thumbnail images from a file. +THUMB_EXTRACTOR_BIN = None +# Binary of a prgram which transfers files between Web Server and CIS. FILE_TRANSFERER_BIN = None