# Copyright 2019 A. H. # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. # EXIFTOOL # Add coordinates to images in folder from gpx file exiftool -P -overwrite_original -geotag=track.gpx /path/to/images # Name files according to EXIF date and timestamp exiftool -ext jpg -ext mp4 '-filenameFileModifyDate' foo.jpg # FFMPEG # Combine image files as video cat *.jpg | ffmpeg -f image2pipe -r 24 -vcodec mjpeg -i - -vcodec libx264 out.mp4 # Trim video from -ss to length -t ffmpeg -i input.mp4 -ss 00:29:21 -t 00:02:26 -async 1 -c copy output.mp4 # convert .mov from fcpx into much smaller mp4 ffmpeg -i input.mov -c:v libx264 -c:a aac -strict experimental output.mp4 # YOUTUBE-DL # Download with subtitles youtube-dl url -o output.mp4 --write-sub # Download audio only from youtube-dl -f 'bestaudio[ext=m4a]' 'http://youtu.be/videoid' # GHOSTSCRIPT # Convert all text to curves in PDF gs -o file-with-outlines.pdf -dNoOutputFonts -sDEVICE=pdfwrite input-file.pdf