-
Notifications
You must be signed in to change notification settings - Fork 12
/
config.php
43 lines (30 loc) · 1.17 KB
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* Configuration File
*
* @ver 0.1
*/
define('DS', DIRECTORY_SEPARATOR);
define('BASE_PATH', realpath(dirname(__FILE__)) . DS);
$_protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "off") ? "https" : "http";
define('BASE_URL', $_protocol ."://". $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']) .'/');
// Videos to convert path
define('SOURCE_PATH', BASE_PATH . 'source'. DS);
// Converted videos output path
define('OUTPUT_PATH', BASE_PATH .'output'. DS);
// Logs Path
define('LOG_PATH', BASE_PATH .'logs'. DS);
// POST URL for Javascript Queries
define('POST_URL', BASE_URL .'process.php');
// Execution Script URL (Where the ffmpeg command will be posted to)
define('EXEC_URL', BASE_URL .'ffmpegExec.php');
// FFMPEG Path (ffmpeg.exe)
define('FFMPEG_PATH', BASE_PATH .'ffmpeg\bin\ffmpeg.exe');
// FFMPEG Password (Change the value 't^$bG1c4=9u63yyKLmW7Q71tu17p5q' with something new!)
define('FFMPEG_PW', sha1('t^$bG1c4=9u63yyKLmW7Q71tu17p5q'));
if( !file_exists(SOURCE_PATH) )
mkdir(SOURCE_PATH, 0755, true);
if( !file_exists(OUTPUT_PATH) )
mkdir(OUTPUT_PATH, 0755, true);
if( !file_exists(LOG_PATH) )
mkdir(LOG_PATH, 0755, true);