N
N
Neoliz2016-05-03 13:01:01
PHP
Neoliz, 2016-05-03 13:01:01

How to trim video from first 15 seconds in php?

The crux of the matter is the following! Actually, I am finalizing the functionality for the file upload service to Instagram.
And now I don’t want to bother much with installing and configuring ffmpeg. after reading the manuals, I realized that not everything is simple, and even more so I'm on the local. Then configure again on the combat server.
The task is simple, the user threw the file, I uploaded it to the server. And if it is mp4, then you need to cut off the first 15 seconds from it, unless it is more than 15 seconds. So that there would be no problems when uploading to insta. Tell me how to do it. surely there is a way without raising ffmpeg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2016-05-03
@timofeydeys

take the binary johnvansickle.com/ffmpeg
or install via apt
superuser.com/questions/138331/using-ffmpeg-to-cut...
ffmpeg -i input_file -c:v libx264 -t 15 output.mp4

P
PixelCube, 2016-05-03
@pixelcube

Timofey Days The ffmpeg option will be the easiest. If we are talking exclusively about mp4, then mp4box is also suitable. Or study ISO/IEC 14496-12 and write a highly specialized tool.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question