5 # Make here all necessary imports required for API classes.
10 # === GENERAL CONFIGURATIONS ===
11 LOG_LEVEL = logger.LOG_LEVEL_DEBUG
12 # Security features are experimental, incomplete and may not work.
14 # CIS periodically scans TORRENTS_PATH for new torrents at
15 # START_DOWNLOADS_INTERVAL seconds. Note that this is a backup measure, because
16 # CIS normally finds out about new torrents from start_torrents messages.
17 START_DOWNLOADS_INTERVAL = 24 * 3600.0 # Once a day
20 # === FILE TRANSFER CONFIGURATIONS ===
21 # Path from the Web Server where the raw input video file is stored.
22 WS_UPLOAD_PATH = 'devel/data/upload'
23 # Path from the Web Server where the output torrent files will be stored.
24 WS_TORRENTS_PATH = 'devel/data/torrents'
25 # Path from the Web Server where the output thumbnail image files will be
27 WS_THUMBS_PATH = 'devel/data/thumbs'
31 #BT_TRACKER = "http://p2p-next-10.grid.pub.ro:6969/announce"
32 # BitTorrent tracker URL.
33 BT_TRACKER = 'http://p2p-next-10.grid.pub.ro:6969/announce'
34 # Web server's URL for content ingestion completion. P2P-Tube uses
35 # http://<site>/video/cis_completion .
36 WS_COMPLETION = 'http://p2p-next.cs.pub.ro/devel/video/cis_completion'
37 # Web server's URL for content ingestion errors. P2P-Tube uses
38 # http://<site>/video/cis_error .
39 WS_ERROR = 'http://p2p-next.cs.pub.ro/devel/video/cis_error'
43 # RAW_VIDEOS_PATH, THUMBS_PATH and MEDIA_PATH need not to be in distributed
45 # Temporary directory for uploaded videos transfered from the web server.
46 RAW_VIDEOS_PATH = '/home/p2p/tmp/raw'
47 # Temporary directory for image thumbnails.
48 THUMBS_PATH = '/home/p2p/tmp/thumbs'
49 # Temporary directory for converted videos.
50 MEDIA_PATH = '/home/p2p/media'
51 # TORRENTS_PATH contains torrents files shared by all CIS machines and needs to
52 # be placed in a distributed file system.
53 TORRENTS_PATH = '/home/p2p/export/p2p-tube/torrents'
56 # === EXTERNAL PROGRAMS API CLASSES ===
57 # API class for a prgram which retrives audio/video information, like duration.
58 AVINFO_CLASS = ffmpeg.FFprobeAVInfo
59 # API class for a prgram which transcodes an audio/video file.
60 TRANSCODER_CLASS = ffmpeg.FFmpegTranscoder
61 # API class for a prgram which extracts thumbnail images from a file.
62 THUMB_EXTRACTOR_CLASS = ffmpeg.FFmpegThumbExtractor
63 # API class for a prgram which transfers files between Web Server and CIS.
64 FILE_TRANSFERER_CLASS = ftp.FTPFileTransferer
67 # === EXTERNAL PROGRAMS BINARY FILES ===
68 # Set this values to None if you want default values provided by the API
69 # class to be used. It may be useful to complete this parameters if you
70 # compiled the third-party binaries from sources and you don't have
71 # administrative privileges to install them.
72 # Binary of a prgram which retrives audio/video information, like duration.
74 # Binary of a prgram which transcodes an audio/video file.
76 # Binary of a prgram which extracts thumbnail images from a file.
77 THUMB_EXTRACTOR_BIN = None
78 # Binary of a prgram which transfers files between Web Server and CIS.
79 FILE_TRANSFERER_BIN = None