Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

passthru() function in flashstream.php does not output anything #1

Closed
april-kelly opened this issue Dec 14, 2013 · 4 comments
Closed

Comments

@april-kelly
Copy link

The passthru() function in flashstream.php does not output anything, when viewed in a browser or via flowplayer. I have tried changing the passthru() to systetm() exec() and popen() with the same results, I am not sure if this is my server, or your script. I have tried creating a new script with just the header and passthru() commands, and I get the same results, unless the script is run from the command line, using the php -f command.

@bkirkman
Copy link
Owner

I was rather surprised this worked on my machine. It seems too simplistic.
What distro are you using? Are you able to start viewing in your browser
then
'ps aux ¦ grep ffmpeg' to see if it's running? I'm out of town this weekend
so won't be able to look into it much.

Have you tried the direct url to the hdhr from your browser or vlc to see
if it's streaming?

@april-kelly
Copy link
Author

I am using Ubuntu 13.10 with php 5.5.3-1ubuntu2.1 and Apache 2.4.6, It does appear that ffmpeg is running (I see a process when I run ps aux | grep ffmpeg). I can assume that ffmpeg and my HD Homerun Prime are working because when I change /dev/stdout 2>/dev/null to a file such as test.flv and then view it either with vlc or flowplayer in your application (although flowplayer seems to have some issues with this solution, as it freezes and has to be reloaded) it works. I have also tried running a php file with just passthru and the ffmpeg command with the same results, however if I run the file from the command line using php -f, it seems to work fine (I see output on the console). This suggests to me that it might be a configuration error in either php or apache which is preventing passthru from working correctly. I asked about this on stack overflow http://stackoverflow.com/questions/20586988/php-ffmpeg-flv-stream-passthru and have not received and any answers which explain why passthru will not work.

However, there is a good suggestion on stack overflow about using ffserver to stream the content instead, which I am looking into.

@april-kelly
Copy link
Author

I probably should mention that I have also tried this on my windows machine, to no avail. I replaced /dev/stdout 2>/dev/null with con, and I once again get output on the console but not via passthru().

@april-kelly
Copy link
Author

Yes!!!
I just figured it out, ffmpeg was not in the path of the www-data user on my computer (presumably because I compiled and installed it myself), so I added a optional path to ffmpeg in the in the config file. Check it out on my fork https://github.com/liam-kelly/hdhrtv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants