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
import os | |
exportdir = 'new' | |
# Create a 'new' directory to put merged files | |
os.system('mkdir ' + exportdir) | |
# Iterate over files and combine using tiffcp | |
for file in os.listdir('.'): | |
if file.endswith('@2x.tiff'): |
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
<div id="synth"> | |
<svg width="100%" viewBox="0 0 270 152" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | |
<g id="synth-base"> | |
<rect id="Shadow" fill-opacity="0.1" fill="#000000" x="0" y="4" width="270" height="148" rx="12"></rect> | |
<rect fill="#40445E" x="0" y="0" width="270" height="148" rx="12"></rect> | |
<path d="M0,9.99832468 C0,4.47640243 4.47593818,0 10,0 L20,0 L20,148 L10,148 C4.4771525,148 0,143.530333 0,138.001675 L0,9.99832468 Z" id="Left-Endcap" fill="#272B43"></path> | |
<path d="M250,0 L260,0 C265.522847,0 270,4.46966749 270,9.99832468 L270,138.001675 C270,143.523598 265.524062,148 260,148 L250,148 L250,0 Z" id="Right-Endcap" fill="#272B43"></path> | |
</g> | |
<g id="synth-keys" transform="translate(24.000000, 60.000000)"> |
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
# Calculations courtesy of http://www.microsoftbob.com/post/Adjusting-Pitch-for-MP3-Files-with-FFmpeg | |
# Up half step | |
ffmpeg -i input.wav -filter:a "asetrate=r=46722.3224612449211671764955071340,atempo=0.94387431268169349664191315" output_up_halfstep.wav | |
# Up whole step | |
ffmpeg -i input.wav -filter:a "asetrate=r=49500.5763304433484812188074908520,atempo=0.8908987181403393047402262055" output_up_wholestep.wav | |
# Up 3 half steps | |
ffmpeg -i input.wav -filter:a "asetrate=r=52444.0337716199990422417487017170,atempo=0.84089641525371454303112547623321" output_up_3halfsteps.wav |
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
# Command to lower the bitrate of an mp3 using FFMPEG | |
# Options: | |
# Low: 96k | |
# Medium (Radio quality): 128k | |
# Medium-High (CD quality): 192k | |
# High: 320k | |
# "Converting an MP3 to a higher bit rate does not add any more | |
# audio information to the file, so the sound quality does not |
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 use with https://github.com/tonistiigi/audiosprite | |
# and https://github.com/goldfire/howler.js/ | |
# Replace outputNameWithoutExtension with whatever you want. | |
# | |
# *.mp3 will find all mp3 files in the current directory. | |
# | |
# * will find ALL files in the current directory, allowing you | |
# to mix wav, mp3, etc into the final combined sprite. |
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
# This will overwrite the original file! Be careful! | |
# I use ZSH. If you use Bash, the syntax will be different here. | |
# Options: | |
# Change -20dB to whatever threshold you consider "silent" to be. | |
for file in *.mp3; ffmpeg -y -i $file -af silenceremove=1:0:-20dB ${file%.mp3}.mp3 |
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
# Change 10dB to the amount you'd like to bump the volume. | |
# You can use negative values to decrease volume, too. | |
ffmpeg -i input.wav -filter:a "volume=10dB" output.wav |
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
# Generate a poster from the first frame | |
ffmpeg -i input.mp4 -vframes 1 output.png | |
# Generate a poster from the frame starting at 5 seconds | |
ffmpeg -i input.mp4 -ss 00:00:05 -vframes 1 output.png |
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.mov" "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
# 1 frame per second | |
ffmpeg -framerate 1 -pattern_type glob -i '*.png' \ | |
-c:v libx264 -r 30 -pix_fmt yuv420p out.mp4 | |
# 30 frames per second | |
ffmpeg -framerate 30 -pattern_type glob -i '*.png' \ | |
-i audio.ogg -c:a copy -shortest -c:v libx264 -pix_fmt yuv420p out.mp4 |
OlderNewer