Sorry, I made a mistake just now and my English is really poor.
I want to get the length(xxx seconds) of a video but cannot find a appropriate way to do. I find a way on the Internet that need to execute a Linux command but I think maybe there is a better way. So I want to ask that whether FFMpeg provide a interface to do it?
What are the steps to reproduce this bug? Please add code examples,
screenshots or links to GitHub repositories that reproduce the problem.
If you have already ideas how to solve the issue, add them here.
Otherwise remove this section.
Sorry, I do not understand what "澶╂渤" means. Could you explain it, please?
Ah. That makes sense, you can do it like this:
$ffprobe = FFMpeg\FFProbe::create();
$length = $ffprobe
->format('/path/to/video/mp4') // extracts file informations
->get('duration'); // returns the duration property
Most helpful comment
Ah. That makes sense, you can do it like this: