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 panic
  • this make output ffmpeg quiet possible

  • cat output.png

  • print 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

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -