Reg - Video File Chunk issue

Raghul Tlv <[email protected]>
Newsgroups gmane.comp.php.general
Message-ID <CADxj6HZrBi8wk7JFv3kS_hMkszNPSnKBk8=K-uj5hViR9Oj-SA@mail.gmail.com>
Hi Team,

In one of the projects, I have faced the issue of chunking the file. Below
is the code I used to chunk the file.

$fp = fopen($mediaUrl, 'r');
$segment_id = 0;

while (!feof($fp)) {
      $chunk = fread($fp, 4 * 1024 * 1024); // chunk the file as 4MB
}
fclose($fp);

If we try to push any video file with above 10MB, we didn't get the proper
chunk file. Its generated randomly with different bytes.

Can you please help with this?

Thanks & Regards,
Raghul Velliangiri
Mobile - +91 94882 51474
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.