From 3010ae8c85fe8cb656c9e96a95d0efee0fb2126a Mon Sep 17 00:00:00 2001 From: Paul Arthur Date: Sat, 26 Jan 2013 12:59:02 -0500 Subject: Log stderr when we transcode Now you shouldn't need to manually run the command to see what went wrong. --- lib/class/stream.class.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/class/stream.class.php') diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php index 35d4eb64..c21f5823 100644 --- a/lib/class/stream.class.php +++ b/lib/class/stream.class.php @@ -135,8 +135,18 @@ class Stream { debug_event('downsample', "Downsample command: $command", 3); + $process = proc_open( + $command, + array( + 1 => array('pipe', 'w'), + 2 => array('pipe', 'w') + ), + $pipes + ); return array( - 'handle' => popen($command, 'rb'), + 'process' => $process, + 'handle' => $pipes[1], + 'stderr' => $pipes[2], 'format' => $transcode_settings['format'] ); -- cgit