cis notified web server of a job completion; upload form interface and validation...
[living-lab-site.git] / cis / config.py
1 #!/usr/bin/env python
2
3 import logger
4
5 # Make here all necessary imports required for API classes.
6 from api import ffmpeg
7 from api import ftp
8
9
10 # === GENERAL CONFIGURATIONS ===
11 LOG_LEVEL = logger.LOG_LEVEL_DEBUG
12 SECURITY = False
13 START_DOWNLOADS_INTERVAL = 24 * 3600.0 # Once a day
14
15
16 # === FILE TRANSFER CONFIGURATIONS ===
17 # Path from the Web Server where the raw input video file is stored.
18 WS_UPLOAD_PATH = 'devel/data/upload'
19 # Path from the Web Server where the output torrent files will be stored.
20 WS_TORRENTS_PATH = 'devel/data/torrents'
21 # Path from the Web Server where the output thumbnail image files will be
22 # stored.
23 WS_THUMBS_PATH = 'devel/data/thumbs'
24
25
26 # === URLS ===
27 #BT_TRACKER = "http://p2p-next-10.grid.pub.ro:6969/announce"
28 # BitTorrent tracker URL.
29 BT_TRACKER = 'http://p2p-next-10.grid.pub.ro:6969/announce'
30 # Web server's URL for content ingestion completion.
31 WS_COMPLETION = 'http://p2p-next-03.grid.pub.ro:8081/cis_completion'
32 #WS_COMPLETION = 'http://koala.cs.pub.ro/video/cis_completion'
33
34
35 # === CIS PATHS ===
36 RAW_VIDEOS_PATH = 'tmp/raw'
37 THUMBS_PATH = 'tmp/thumbs'
38 MEDIA_PATH = '/home/p2p/export/p2p-tube/media'
39 # In a distributed file system for multi-CIS.
40 TORRENTS_PATH = '/home/p2p/export/p2p-tube/torrents'
41
42
43 # === EXTERNAL PROGRAMS API CLASSES ===
44 # API class for a prgram which retrives audio/video information, like duration.
45 AVINFO_CLASS = ffmpeg.FFprobeAVInfo
46 # API class for a prgram which transcodes an audio/video file.
47 TRANSCODER_CLASS = ffmpeg.FFmpegTranscoder
48 # API class for a prgram which extracts thumbnail images from a file.
49 THUMB_EXTRACTOR_CLASS = ffmpeg.FFmpegThumbExtractor
50 # API class for a prgram which transfers files between Web Server and CIS.
51 FILE_TRANSFERER_CLASS = ftp.FTPFileTransferer
52
53
54 # === EXTERNAL PROGRAMS BINARY FILES ===
55 # Set this values to None if you want default values provided by the API
56 # class to be used.
57 # Binary of a prgram which retrives audio/video information, like duration.
58 AVINFO_BIN = None
59 # Binary of a prgram which transcodes an audio/video file.
60 TRANSCODER_BIN = None
61 # Binary of a prgram which extracts thumbnail images from a file.
62 THUMB_EXTRACTOR_BIN = None
63 # Binary of a prgram which transfers files between Web Server and CIS.
64 FILE_TRANSFERER_BIN = None