From 57a1674f4b323e9083b0efe801243e8825c197d9 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Tue, 12 Apr 2016 21:13:43 +0200 Subject: [PATCH] Use local rtmpdump --- classes/Config.php | 1 + composer.json | 6 +++++- composer.lock | 34 ++++++++++++++++++++++++++++++--- config.example.yml | 1 + controllers/FrontController.php | 2 +- 5 files changed, 39 insertions(+), 5 deletions(-) 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 0a481b9..7cf18b3 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,8 @@ "symfony/process": "~3.0.0", "ptachoire/process-builder-chain": "~1.2.0", "ffmpeg/ffmpeg": "dev-release", - "rudloff/smarty-plugin-noscheme": "~0.1.0" + "rudloff/smarty-plugin-noscheme": "~0.1.0", + "rudloff/rtmpdump-bin": "dev-develop" }, "require-dev": { "symfony/var-dumper": "~3.0.0" @@ -49,6 +50,9 @@ "ffmpeg" ] } + }, { + "type": "git", + "url": "https://github.com/Rudloff/rtmpdump-bin.git" }], "authors": [{ "name": "Pierre Rudloff", diff --git a/composer.lock b/composer.lock index 2172052..861771c 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": "d8b87df7911542ff8a9c7323fcc22949", - "content-hash": "52dc356edd823568af9aca1e95032cfd", + "hash": "1556bc08c5018e6085a715a783097d9d", + "content-hash": "91451f1d1fc10a7b09efb3511e4b7324", "packages": [ { "name": "container-interop/container-interop", @@ -408,6 +408,33 @@ }, "type": "library" }, + { + "name": "rudloff/rtmpdump-bin", + "version": "dev-develop", + "source": { + "type": "git", + "url": "https://github.com/Rudloff/rtmpdump-bin.git", + "reference": "c701e4f7cfae2ffbe6ab898768d27301d537d4c3" + }, + "require-dev": { + "rtmpdump/rtmpdump": "2.3" + }, + "bin": [ + "rtmpdump" + ], + "type": "library", + "scripts": { + "build": [ + "cd vendor/rtmpdump/rtmpdump/ && make", + "cp vendor/rtmpdump/rtmpdump/rtmpdump ." + ] + }, + "license": [ + "GPL-2.0" + ], + "description": "rtmpdump binary for Linux 64 bit", + "time": "2016-04-12 18:52:03" + }, { "name": "rudloff/smarty-plugin-noscheme", "version": "0.1.1", @@ -797,7 +824,8 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "ffmpeg/ffmpeg": 20 + "ffmpeg/ffmpeg": 20, + "rudloff/rtmpdump-bin": 20 }, "prefer-stable": false, "prefer-lowest": false, 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 365c9c9..03f2f01 100644 --- a/controllers/FrontController.php +++ b/controllers/FrontController.php @@ -139,7 +139,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,