summaryrefslogtreecommitdiffstats
path: root/lib/class/stream.class.php
diff options
context:
space:
mode:
authorPaul Arthur <paul.arthur@flowerysong.com>2013-01-26 12:59:02 -0500
committerPaul Arthur <paul.arthur@flowerysong.com>2013-01-28 22:00:08 -0500
commit3010ae8c85fe8cb656c9e96a95d0efee0fb2126a (patch)
treeaaef61855b1b4244da57f6a23b0a56ed92ff056f /lib/class/stream.class.php
parent75b2af2464c168525d207e2c4b2d20ea4e1719d0 (diff)
downloadampache-3010ae8c85fe8cb656c9e96a95d0efee0fb2126a.tar.gz
ampache-3010ae8c85fe8cb656c9e96a95d0efee0fb2126a.tar.bz2
ampache-3010ae8c85fe8cb656c9e96a95d0efee0fb2126a.zip
Log stderr when we transcode
Now you shouldn't need to manually run the command to see what went wrong.
Diffstat (limited to 'lib/class/stream.class.php')
-rw-r--r--lib/class/stream.class.php12
1 files changed, 11 insertions, 1 deletions
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']
);