3 ms·
It seems like it would be simple enough to convert a video into an image like these by isolating a single column of pixels from each frame and putting them toge
by amaxwell 14y ago
It seems like it would be simple enough to convert a video into an image like these by isolating a single column of pixels from each frame and putting them together chronologically.
- aw3c2 14y agoYeah, that was fun: #starting at 467s and outputting the images of the next 3 seconds ffmpeg -ss 467 -t 3 -i video.mkv output.%04d.png # crop image to 1px slices 280 pixels from the left. gm mogrify -crop 1x+280+0 *.png # stitch them gm montage -border 0 -geometry +0+0 -tile x1 *.png image.jpg Perfect example how easy and straightforward it is to use command line utilities. Now someone just has to find movies with static camera scenes that have a lot of horizontal actor/object movement. Random example showing Bill Bailey as a demon: http://i.imgur.com/AWWG8.jpg http://i.imgur.com/AWWG8.jpg Some static rallye car cameras from http://www.youtube.com/watch?v=D2QMuT04EOw http://www.youtube.com/watch?v=D2QMuT04EOw -> http://i.imgur.com/GV3bY.jpg http://i.imgur.com/GV3bY.jpg Needs either higher framerate videos or longer scenes.
- dbaupp 14y agoNice! That's much neater than I thought it would be. P.S. you can use "output.%03d.png" to zero pad the output to 011 (and %04d for 0011 etc.)
- aw3c2 14y agoYeah, just noticed that myself. Thanks. :)
- mdda 14y agoCorollory : One could produce a whole range of image0%d.png from vertical slices through the video, and stitch them together into a movie. Essentially rotating the movie abouts its y axis (in the x-t plane). If we assume 50fps, then every 1000px wide video would become a 3-4 minute short. But movies would require a very wide screen...
- emillon 14y agoI tried that with a Super Metroid run (hoping that the results would be easier to see with a video game): http://i.imgur.com/8TOPA.gif http://i.imgur.com/8TOPA.gif
- graue 14y agoCool demo. The 'gm montage' step isn't working for me and I'm finding its options completely non-intuitive. I produced a series of 1979 PNGs from a 66-second video, and when I stitch them with: gm montage -borderwidth 0 -geometry +0+0 -tile x1 *.png image.jpg I get an image that is 45, not 1979, pixels wide. In fact the number of PNGs used as input and the resulting width have a nonlinear relationship: # of 1-px wide PNGs Resulting width (px) 5 3 10 4 20 5 50 8 100 10 200 15 500 23 1000 32 1979 45 Note that I made a couple changes: to speed things up I used "-vf crop=1:1080:280:0" with ffmpeg to skip the separate cropping step and output 1x1080 PNGs, and my version of gm didn't accept the -border option so I assumed you meant -borderwidth. What's up with the crazy widths on the result? What is GraphicsMagick doing?
- ww520 14y agoCool hack! I learn something new today.