Stitching Pictures Into a Time Lapse: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
(Created page with "ffmpeg does it https://ubuntuforums.org/showthread.php?t=2022316")
 
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Reference=
ffmpeg does it
ffmpeg does it


https://ubuntuforums.org/showthread.php?t=2022316
https://ubuntuforums.org/showthread.php?t=2022316
=Howto=
Use Terminal. Navigate to directory with pictures. Then type:
Note that filaname.avi is the output file name.
Note: # -q:v can get a value between 2-31. 2 is best quality and bigger size, 31 is worst quality and least size)
==Using ffmpeg==
<pre>
sudo apt-get install ffmpeg
ffmpeg -r 25 -pattern_type glob -i '*.jpg' -c:v mjpeg -q:v 2 filename.avi
</pre>
==Using avconv==
Some versions of debian/ubuntu don't have ffmpeg; they use avtools instead. This process is 2-step, as avconv will not take the '*" glob.
<pre>
sudo apt-get install libav-tools
ls *.jpg| awk 'BEGIN{ a=0 }{ printf "mv %s imageToStich%04d.jpg\n", $0, a++ }' | bash
avconv -y -r 25 -i imageToStich%4d.jpg -r 25 -vcodec libx264 -q:v 3 filename.mp4
</pre>
=Unstitching=
From Mike:
I've done this before using VLC. Here's some info on how to do it from the GUI or CLI:
* https://www.raymond.cc/blog/extract-video-frames-to-images-using-vlc-media-player/
You can also use ffmpeg/avconv:
* https://superuser.com/questions/984850/linux-how-to-extract-frames-from-a-video-lossless

Latest revision as of 13:05, 24 November 2018

Reference

ffmpeg does it

https://ubuntuforums.org/showthread.php?t=2022316

Howto

Use Terminal. Navigate to directory with pictures. Then type:

Note that filaname.avi is the output file name. Note: # -q:v can get a value between 2-31. 2 is best quality and bigger size, 31 is worst quality and least size)

Using ffmpeg

sudo apt-get install ffmpeg
ffmpeg -r 25 -pattern_type glob -i '*.jpg' -c:v mjpeg -q:v 2 filename.avi

Using avconv

Some versions of debian/ubuntu don't have ffmpeg; they use avtools instead. This process is 2-step, as avconv will not take the '*" glob.

sudo apt-get install libav-tools
ls *.jpg| awk 'BEGIN{ a=0 }{ printf "mv %s imageToStich%04d.jpg\n", $0, a++ }' | bash
avconv -y -r 25 -i imageToStich%4d.jpg -r 25 -vcodec libx264 -q:v 3 filename.mp4

Unstitching

From Mike:

I've done this before using VLC. Here's some info on how to do it from the GUI or CLI:

* https://www.raymond.cc/blog/extract-video-frames-to-images-using-vlc-media-player/

You can also use ffmpeg/avconv:

* https://superuser.com/questions/984850/linux-how-to-extract-frames-from-a-video-lossless