Screenshots. Video. Linux. Commandline.
January 10, 2006 8:05 AM Subscribe
Screengrabs from video from the command line?
Let's say you've got a ton of video clips (avi, mpeg, wmv, etc. maybe some are even incomplete!). Let's also say you'd like a little JPEG thumbnail sample of each video clip (e.g. first frame). How can I get this accomplished?
AsfBin looks like it might do a little work for me, but that's only with (suprise!) ASF formats. this page is telling me scripting is possible with VirtualDub, but it'd be terribly helpful if it could be done from the command line. The other big issue is that those are for Windows, when I reaaaally need to be working on Linux (Can you even watch WMV on linux?).
Hopeful solution requirements: many file formats, frame grabbing, from the command line, linux, works with incomplete files
Let's say you've got a ton of video clips (avi, mpeg, wmv, etc. maybe some are even incomplete!). Let's also say you'd like a little JPEG thumbnail sample of each video clip (e.g. first frame). How can I get this accomplished?
AsfBin looks like it might do a little work for me, but that's only with (suprise!) ASF formats. this page is telling me scripting is possible with VirtualDub, but it'd be terribly helpful if it could be done from the command line. The other big issue is that those are for Windows, when I reaaaally need to be working on Linux (Can you even watch WMV on linux?).
Hopeful solution requirements: many file formats, frame grabbing, from the command line, linux, works with incomplete files
Best answer: mplayer. To get a jpeg of the first frame: mplayer -vo jpeg -frames 1 file.wmv
posted by sfenders at 8:42 AM on January 10, 2006
posted by sfenders at 8:42 AM on January 10, 2006
Best answer: I do not have a complete solution but can point you along a path maybe.
mplayer allows jpeg output from input videos.
ie mplayer -vo jpeg -jpeg quality=50 -frames 1 -ao null myfile
-frames 1 ( seems to put out 2 frames instead of just the one but you get the idea :-) )
( You would need to check you had all the codecs for your file types )
Wrap this in a script and you could get thumbnails from your videos.
posted by stuartmm at 8:44 AM on January 10, 2006
mplayer allows jpeg output from input videos.
ie mplayer -vo jpeg -jpeg quality=50 -frames 1 -ao null myfile
-frames 1 ( seems to put out 2 frames instead of just the one but you get the idea :-) )
( You would need to check you had all the codecs for your file types )
Wrap this in a script and you could get thumbnails from your videos.
posted by stuartmm at 8:44 AM on January 10, 2006
Response by poster: thanks, guys! i suppose having 0 conversions and 1 step and 1 program isn't so bad at all. it looks like mplayer works with incomplete files, too.
posted by soma lkzx at 8:52 AM on January 10, 2006
posted by soma lkzx at 8:52 AM on January 10, 2006
This thread is closed to new comments.
posted by soma lkzx at 8:09 AM on January 10, 2006