1
votes

I'm downloading videos from a 3rd party server (mostly flv, mp4) using php script, after download I'm cutting video at 1:30 mins - now it's ready to be played. Is it possible to download only part (1-2 mins) of the video instead of whole file and still being able to play it (the way it's now it's simply wasting bandwidth, CPU...)?

2

2 Answers

0
votes

This is very hard to do, as it requires your script to understand MP4 or FLV. However, this may help you (please note that it still requires ffmpeg, FLVTools2 and Mencode to be installed).

0
votes

Cutting a flv or mp4 involves some index updating, looking for a possible cutting point etc. Building that in php seems overkill. Look into some Tools that can download and cut in one step and call those from your php. FFMpeg and MPlayer may be able to do that.