diff --git a/classes/Config.php b/classes/Config.php index 2b31571..cd8dea1 100644 --- a/classes/Config.php +++ b/classes/Config.php @@ -34,6 +34,7 @@ class Config public $params = array('--no-playlist', '--no-warnings', '-f best[protocol^=http]', '--playlist-end', 1); public $convert = false; public $avconv = 'vendor/bin/ffmpeg'; + public $rtmpdump = 'vendor/bin/rtmpdump'; public $curl_params = array(); /** diff --git a/composer.json b/composer.json index 504b1e0..67c6ed1 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,8 @@ "ptachoire/process-builder-chain": "~1.2.0", "ffmpeg/ffmpeg": "dev-release", "rudloff/smarty-plugin-noscheme": "~0.1.0", - "guzzlehttp/guzzle": "~6.2.0" + "guzzlehttp/guzzle": "~6.2.0", + "rudloff/rtmpdump-bin": "~2.3" }, "require-dev": { "symfony/var-dumper": "~3.0.0" diff --git a/composer.lock b/composer.lock index cae8a1c..90c5f9f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "e1cdeb4248ab93397c2fa390a76b0c62", - "content-hash": "8ad4495699681f4ade03f5e0fbe0b074", + "hash": "9363b8befa358a89f849785a6399698a", + "content-hash": "6304d9a80a90da1095ba8512bba2f166", "packages": [ { "name": "container-interop/container-interop", @@ -579,6 +579,34 @@ }, "type": "library" }, + { + "name": "rudloff/rtmpdump-bin", + "version": "2.3", + "source": { + "type": "git", + "url": "https://github.com/Rudloff/rtmpdump-bin.git", + "reference": "133cdd80e3bab66593e88a5276158596383afd97" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Rudloff/rtmpdump-bin/zipball/133cdd80e3bab66593e88a5276158596383afd97", + "reference": "133cdd80e3bab66593e88a5276158596383afd97", + "shasum": "" + }, + "require-dev": { + "rtmpdump/rtmpdump": "2.3" + }, + "bin": [ + "rtmpdump" + ], + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0" + ], + "description": "rtmpdump binary for Linux 64 bit", + "time": "2016-04-12 19:17:32" + }, { "name": "rudloff/smarty-plugin-noscheme", "version": "0.1.1", diff --git a/config.example.yml b/config.example.yml index deff29b..9f66ab7 100644 --- a/config.example.yml +++ b/config.example.yml @@ -9,3 +9,4 @@ params: curl_params: convert: false avconv: vendor/bin/ffmpeg +rtmpdump: vendor/bin/rtmpdump diff --git a/controllers/FrontController.php b/controllers/FrontController.php index 3f6c9e9..e61423b 100644 --- a/controllers/FrontController.php +++ b/controllers/FrontController.php @@ -138,7 +138,7 @@ class FrontController if (parse_url($video->url, PHP_URL_SCHEME) == 'rtmp') { $builder = new ProcessBuilder( array( - '/usr/bin/rtmpdump', + $this->config->rtmpdump, '-q', '-r', $video->url,