Reg - Video File Chunk issue
| From: | Raghul Tlv | Date: | Thu, 18 Jul 2024 08:34:00 +0000 |
| Subject: | Reg - Video File Chunk issue | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-328471@lists.php.net to get a copy of this message | ||
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