php - Get the thumbnail contents in a variable instead of saving on a file -
i need create thumbnail remote video url not want thumbnail stored. need in variable can save later.
shell_exec("ffmpeg -i video.mp4 -s 150x150 -ss 00:00:00.750 -vframes 1 output.png"); how output.png instead of saving file?
you combining following commands:
ffmpeg -i video.mp4 -s 150x150 -ss 00:00:00.750 -vframes 1 output.png -hide_banner -loglevel panicthis make output
ffmpegquiet possiblecat output.pngprint file contents console (and returned
shell_exec)rm output.png- delete file
to following:
shell_exec("ffmpeg -i video.mp4 -s 150x150 -ss 00:00:00.750 -vframes 1 output.png -hide_banner -loglevel panic; cat output.png; rm output.png"); i'm not aware of method ffmpeg dump data directly without placing file.
hope helps.
Comments
Post a Comment