Creating video segments from a large video can easily be achieved with FFMpeg, the process is fully automated complete with sequential file naming.
Cutting a video into 5-minute segments can be done with the following:
ffmpeg -i videotocut.mp4 -c copy -map 0 -segment_time 00:05:00 -f segment segment%03d.mp4
This will save the outputted files as segment01.mp4, segment02.mp4 etc…
It will copy the input video and only do the cut with no encoding, this means it will run at a very quick rate.
Note in cases the video won’t be a perfect cut at 5:00 as it will cut on the next keyframe after 5:00, often the length will still be 5:00 as there are many (25/30/60) frames per second.
To do a different length of segments simply change the 00:05:00 value. 00:10:00 is 10 minutes and 00:02:00 is 2 minutes as an example.
A drained and empty Kennington reservoir images from a drone in early July 2024. The…
Merrimu Reservoir from drone. Click images to view larger.
Using FTP and PHP to get an array of file details such as size and…
Creating and using Laravel form requests to create cleaner code, separation and reusability for your…
Improving the default Laravel login and register views in such a simple manner but making…
Laravel validation for checking if a field value exists in the database. The validation rule…