Difference between revisions of "Creating Moviegrams"
(Created page) |
(Print progress while cutting columns.) |
||
| Line 15: | Line 15: | ||
Cut a single column from all those frames: | Cut a single column from all those frames: | ||
| − | # for i in `seq 1 ''width''`; do f="$(seq -f %04g $i $i)"; pamcut -left "$(($i- 1))" -width 1 < "image-${f}.pnm" > "col-${f}.pnm"; done | + | # for i in `seq 1 ''width''`; do f="$(seq -f %04g $i $i)"; echo $f; pamcut -left "$(($i- 1))" -width 1 < "image-${f}.pnm" > "col-${f}.pnm"; done |
Combine all the columns into a single image: | Combine all the columns into a single image: | ||
Latest revision as of 23:02, 4 November 2012
First get the width, length and framerate of the movie you want to create a moviegram of:
# mediainfo -f movie.avi | grep '\(Width\|Frame \(rate\|count\)\)'
Find out the ratio at which to play the movie:
# echo '3 k <fps> <number of frames> <movie width> / / p' | dc
This will probably result in a number smaller than 1.0.
Now cut the single frames out of the movie:
# avconv -i movie.avi -vsync 1 -r rate image-%04.pnm
Cut a single column from all those frames:
# for i in `seq 1 width`; do f="$(seq -f %04g $i $i)"; echo $f; pamcut -left "$(($i- 1))" -width 1 < "image-${f}.pnm" > "col-${f}.pnm"; done
Combine all the columns into a single image:
# pnmcat -lr col-0*.pnm > part-1.pnm # pnmcat can only open 1024 files at once so we have to process it in smaller batches # pnmcat -lr col-1*.pnm > part-2.pnm # pnmcat -lr part-*.pnm | pnmtopng > moviegram.png