Answer the question
In order to leave comments, you need to log in
Batch output of a file, streaming without downloading (video)?
There is a task: to hide the final url of the file, in our case the video. That is, the url on the video -> the server changes the url to its own -> the end user.
For the server that changes the url, is it possible to just give it either in portions, or just stream the file to the video player without downloading it? How reasonable is this approach?
Something like:
<?
header("Content-Type: video/mp4");
echo file_get_contents('ссылка_до_видео');
?>
Answer the question
In order to leave comments, you need to log in
There are quite a few examples on google , but PHP provides an API for dealing with readfile streams .
Tip
For this function, you can use a URL as the filename if the fopen wrappers option has been enabled. See the description of the fopen() function for more information on determining the filename. See also a list of supported URL wrappers, their capabilities, usage notes, and a list of predefined constants in Supported protocols and wrappers.
It is better to do this not at the PHP level, but at the Nginx level:
https://github.com/arut/nginx-rtmp-module
Nginx RTMP is essentially one of the standard solutions for Video on demand tasks
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question