Skip to main content
Inspiring
March 13, 2007
Question

get screengrab from video file via script?

  • March 13, 2007
  • 3 replies
  • 428 views
I have a website called porkchopsandwich.com where myself and a few friends post funny videos. i have been thinking of a way to simplify the process of postign videos. right now one of the things that is a big pain is that for each video we do a frame grab and resize it to use as a thumbnail image on the site. right now we use window movie maker to do the frame grab and then resize it to the proper size using photoshop.

what i was thinking is that there must be some way that this coudl be accomplished via a CF scrpt. so that when i upload a video, the video file woudl be uploaded and then a jpg file woudl be generated of the first frame of the video. is there anyone who can suggest hwo to do this?
    This topic has been closed for replies.

    3 replies

    Inspiring
    March 15, 2007
    Participating Frequently
    March 14, 2007
    You can do this pretty easily with ffmpeg (an open source video conversion tool). Just find a binary release and call it with cfexecute.
    Here's a sample argument string that will create a jpg at a specified size:
    -y -i test.mpg -vframes 1 -an -vcodec mjpeg -f rawvideo -s 320x240 test.jpg
    bdee2Author
    Inspiring
    March 14, 2007
    cool - i will give it a shot.
    now i am wondering if it is possible to have text overlayed on the frame grab (like the other ones from porkchopsandwich.com)
    Participating Frequently
    March 14, 2007
    .