I have four video in my server. I want to display all of them same page but video tag url is a php page.
Actually it is working. But when i tried to open new tab again index.php then display only 2 video. When waiting to long display all of them. Why i must to waiting and why server take long time to response? I have ubuntu 20.04 and 8gb ram. If you copy link and open it multiple tab same time you will see the issue.
Video Link is:
index.php
index.php
<html>
<video src="test.php?video_name=1.mp4" type="video/mp4" autoplay="autoplay" class="video"></video>
<video src="test.php?video_name=2.mp4" type="video/mp4" autoplay="autoplay" class="video"></video>
<video src="test.php?video_name=3.mp4" type="video/mp4" autoplay="autoplay" class="video"></video>
<video src="test.php?video_name=4.mp4" type="video/mp4" autoplay="autoplay" class="video"></video>
<html>
test.php
<?
$video_name=$_GET['video_name'];
header('Content-type: video/mp4');
passthru('ffmpeg -i '.$video_name.'.mp4 -c copy -movflags frag_keyframe+empty_moov+faststart -f mp4 pipe:');
exit();
?>
If close one of tab display all. I think ffmpeg or passthru function make server busy. It must be opened all tab without waiting. It is very importing for me. I developed online camera view system and serving to html with passthru and ffmpeg. But if user open multiple tab server not responding or take long time.
5
I found the issue. Chrome has a max of 6 sockets, so this stops any more media streams (HTML audio / video) from running and stopped to request to server. I hope maybe it will help someone.