![]() Get the video duration $parameters = “2>&1 | grep Duration | cut -d ‘ ‘ -f 4 | sed s/,//” $cmd_duration_ffmpeg = “$ffmpeg_path -i $full_video_path $parameters” $duration = shell_exec($cmd_duration_ffmpeg) Both options will work perfectly, choose whichever works best for you. How do I get the length of a video in laravel? Answer updated with option to output desired format.Should be the accepted answer, although the output format (seconds) is not quite exactly what was asked for.For my ffmpeg-0.6.x86_64, the format is: ffprobe -show_format 2>&1 | sed -n ‘s/duration=//p’.How do I find the duration of a Ffmpeg video? ” / Dimensions: “.$ file.” wide by “.$.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |