This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Toss this in a directory of timelapse photos, make sure your files are ordered somehow | |
| #(I've been using unix timestamp for my files), and run it. It'll create a folder called | |
| #'equalized' and it will equalize exposure of all the images, and then it will it will | |
| #average the first 12 images to create output image 1, then it'll average images 2-13 | |
| #to create output image 2, and so on until all the images in the folder have been | |
| #averaged. You can change the number of images to average by changing #the average | |
| #variable. Do note, large numbers of images averaged will take _forever_. | |
| import os | |
| from os import path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Step 1: | |
| ffmpeg -r 1 -loop 1 -i blank_1920x1080.png -i input.wav -r 1 -shortest output.mp4 | |
| Step 2: | |
| Upload output.mp4 to youtube. Wait an hour or so for the automatic captions to generate | |
| Step 3: | |
| youtube-dl --write-sub --sub-lang en --skip-download ____Youtube URL from Previous Step____ | |
| Step 4: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for i in *.jpg; do echo "Processing $i"; exiftool -all= "$i"; done | |
| from: http://www.linux-magazine.com/Online/Blogs/Productivity-Sauce/Remove-EXIF-Metadata-from-Photos-with-exiftool |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <pre> | |
| <?php | |
| //ARE YOU SURE YOU WANT TO DELETE EVERYTHING??? | |
| $rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator('.')); | |
| foreach ($rii as $file) { | |
| echo $file->getPathname() . "<br>"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $root = '.'; | |
| $min_size = 10485760; | |
| /* in bytes. | |
| 1 mb = 1048576 | |
| 10 mb = 10485760 | |
| 100 mb = 104857600 | |
| 1 gb = 1048576000 | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $folder = "."; | |
| $free = disk_free_space($folder); | |
| $total = disk_total_space($folder); | |
| echo '<strong>Free Space:</strong> ' . formatBytes($free) . ' (' . round( ($free / $total) * 100 , 1) . '%)<br>'; | |
| echo '<strong>Total Space:</strong> ' . formatBytes($total); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| remove huge peaks if not in speaking areas | |
| favorites: normalize to -0.1db | |
| effects rack slot 2 - hard limiter: | |
| -0.1 maximum amplitude | |
| 0 input boost | |
| 7 look ahead time | |
| 100 release time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ffmpeg -i input-without-subs.mp4 -c:v libx264 -vb 20M -c:a copy -vf subtitles=subs.srt output-with-subs.mp4 | |
| To change the font size use this one: | |
| ffmpeg -i input.mp4 -c:a copy -c:v libx264 -vb 20M -vf "subtitles=try_1.en_us.srt:force_style='Fontsize=24'" output-with-subs.mp4 | |
| To do a two pass encode while hardcoding subs: | |
| ffmpeg -y -i input.mp4 -vf subtitles=subs.srt -c:v libx264 -b:v 5000k -pass 1 -an -f mp4 /dev/null | |
| ffmpeg -y -i input.mp4 -vf subtitles=subs.srt -c:v libx264 -b:v 5000k -pass 2 -c:a copy output.mp4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ ! -d "../thumb" ] | |
| then | |
| mkdir ../thumb | |
| fi | |
| for i in * | |
| do | |
| if [[ $i == *.RWZ ]] || [[ $i == *.RW2 ]] || [[ $i == *.CR2 ]] || [[ $i == *.DNG ]] || [[ $i == *.ARW ]] || [[ $i == *.ERF ]] || [[ $i == *.NRW ]] || [[ $i == *.RAF ]] || [[ $i == *.NEF ]] || [[ $i == *.K25 ]] || [[ $i == *.DNG ]] || [[ $i == *.SRF ]] || [[ $i == *.EIP ]] || [[ $i == *.DCR ]] || [[ $i == *.RAW ]] || [[ $i == *.CRW ]] || [[ $i == *.3FR ]] || [[ $i == *.BAY ]] || [[ $i == *.MEF ]] || [[ $i == *.CS1 ]] || [[ $i == *.KDC ]] || [[ $i == *.ORF ]] || [[ $i == *.ARI ]] || [[ $i == *.SR2 ]] || [[ $i == *.MOS ]] || [[ $i == *.MFW ]] || [[ $i == *.CR3 ]] || [[ $i == *.FFF ]] || [[ $i == *.SRW ]] || [[ $i == *.J6I ]] || [[ $i == *.X3F ]] || [[ $i == *.KC2 ]] || [[ $i == *.RWL ]] || [[ $i == *.MRW ]] || [[ $i == *.PEF ]] || [[ $i == *.IIQ ]] || [[ $i == *.CXI ]] || [[ $i == *.MDC ]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Converts to proper case, deals with some edge cases, and capitalizes many medical acronyms. | |
| // this assumes that the title is completely uppercase or completely lowercase that we get no hints | |
| function proper_case($title) | |
| { | |
| // http://www.superheronation.com/2011/08/16/words-that-should-not-be-capitalized-in-titles/#comment-1945084 | |
| $lowercase_words = array('a ', 'aboard ', 'about ', 'above ', 'across ', 'after ', 'against ', 'along ', 'amid ', 'among ', 'an ', 'and ', 'anti ', 'around ', 'as ', 'at ', 'before ', 'behind ', 'below ', 'beneath ', 'beside ', 'besides ', 'between ', 'beyond ', 'but ', 'by ', 'concerning ', 'considering ', 'despite ', 'down ', 'during ', 'except ', 'excepting ', 'excluding ', 'following ', 'for ', 'from ', 'in ', 'inside ', 'into ', 'like ', 'minus ', 'near ', 'of ', 'off ', 'on ', 'onto ', 'opposite ', 'or ', 'outside ', 'over ', 'past ', 'per ', 'plus ', 'regarding ', 'round ', 'save ', 'since ', 'so ', 'than ', 'the ', 'through ', 'to ', 'toward ', 'towards ', 'unde |