Size: 1524
Comment: Use nproc to determine no. of CPUs; increase arguments per execution
|
Size: 1532
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 22: | Line 22: |
find . -name '*JPG' -print0 | xargs -0 -P2 -n32 mogrify -crop 3840x2880+0+720 -resize 1920x1080 | find . -name '*JPG' -print0 | xargs -0 -P$(nproc) -n256 mogrify -crop 3840x2880+0+720 -resize 1920x1080 |
Rotate
If the camera was recording in "upside down" mode:
parallel -u 'echo {}; jpegtran -rotate 180 -perfect -copy all -outfile {}.tran {} && mv {}.tran {}' ::: *.jpg
Resize & crop
For the GoPro HD Hero 2:
LDR tone mapping
parallel -u 'echo {}; ~/sys/tonemap/tonemapping ~/sys/tonemap/default.tnp {} {}.tonemapped && mv {}.tonemapped {}' ::: *.JPG
batch:
for i in $(ls); do (cd $i; parallel -u 'echo {}; ~/sys/tonemap/tonemapping ~/sys/tonemap/default.tnp {} {}.tonemapped && mv {}.tonemapped {}' ::: *.JPG); done;
Encode to WebM
mencoder mf://*.JPG -mf fps=15:type=jpg -ovc lavc -oac lavc -of lavf -lavfopts format=webm -lavcopts threads=4:acodec=vorbis:vcodec=libvpx -ffourcc VP80 -o $(basename $(pwd)).webm
batch:
for i in $(ls); do (cd $i; mencoder mf://*.JPG -mf fps=15:type=jpg -ovc lavc -oac lavc -of lavf -lavfopts format=webm -lavcopts threads=4:acodec=vorbis:vcodec=libvpx -ffourcc VP80 -o $(basename $(pwd)).webm); done;