====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
peripherals:camera:timelapse [2016/06/21 04:18]
admin [4- Process files on the Raspberry Pi]
peripherals:camera:timelapse [2017/03/01 18:52] (current)
admin [Convert / Modify images before combining]
Line 319: Line 319:
  
 We now have a //​my_timelapse.mp4//​ movie which is full HD (1920×1080). We now have a //​my_timelapse.mp4//​ movie which is full HD (1920×1080).
 +
 +==== Convert / Modify images before combining ====
 +----
 +
 +Sometimes it may be suitable to adjust,​convert or otherwise modify images before they are integrated as a movie.
 +
 +[[https://​www.imagemagick.org/​script/​convert.php|ImageMagick]] offers a set of command line tools that can be used to manipulate images from the command line. In the following example, we're going to ''​convert''​ all captured images to grayscale, it's also called desaturate. Therefore, we'll be using the imagemagick ''​[[https://​www.imagemagick.org/​script/​convert.php|convert]]''​ command. To enhance the output result, we'll also make use of the ''​-normalize''​ option.
 +
 +Here is how to **convert a single file**:
 +<​Code:​bash|Single file conversion>​
 +> convert my_originals/​img01.jpg -colorspace Gray -normalize my_converted/​img01.jpg
 +</​Code>​
 +
 +Here is how to **batch convert multiple files** at once:
 +<​Code:​bash|Multiple files conversion>​
 +> cd my_originals/​
 +> for f in *.jpg ; do convert "​$f"​ -colorspace Gray -normalize "​../​my_converted/​$f"​ ; done
 +</​Code>​
 +
 +Another interesting usage of ImageMagick here would be to "water mark" all images before integrating them into the movie, your timelapses can be "​signed"​ using this method.
 ==== MP4 Optimization for Web Streaming ==== ==== MP4 Optimization for Web Streaming ====
 ---- ----