Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus| # Installation | |
| brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid | |
| # Easy Peasy | |
| ffmpeg -i video.mp4 video.webm |
| # Convert mp4 video to ogv and/or WebM | |
| # Browser support: | |
| # http://caniuse.com/#search=mp4 | |
| # http://caniuse.com/#search=ogv | |
| # http://caniuse.com/#search=webm | |
| # Installation: | |
| brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with- --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools |
| # tested with celery[redis]==3.1.17 | |
| # to run with default configuration -- tasks will take 14 seconds to complete the 20 tasks in start_all() below | |
| celery worker -A cluster_project.celery_app -Q tester -lINFO --concurrency=4 | |
| # to run with -Ofair -- tasks will take 10 seconds to complete | |
| celery worker -A cluster_project.celery_app -Q tester -lINFO --concurrency=4 -Ofair |
| # example video encoding for vidoe.js | |
| # for the mp4 video you need aac installed, on Ubuntu: | |
| sudo apt-get install libfaac0 | |
| # you seem to need two files for video js, a webm file and an mp4 file | |
| # using ffmpeg these can be generated hence, assuming you start from a .mov file. | |
| ffmpeg -i video.mov -codec:a aac -strict -2 -codec:v h264 -b:a 128k -b:v 1200k -flags +aic+mv4 video.mp4 | |
| ffmpeg -i video.mov -codec:a libvorbis -codec:v libvpx -b:a 128k -b:v 1200k video.webm |
| apk add --no-cache --virtual=build-dependencies build-base ncurses-dev icu-dev tar | |
| apk add --no-cache --virtual=build-dependencies --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ shadow | |
| mkdir /work && cd /work | |
| wget -O firebird-source.tar.bz2 http://downloads.sourceforge.net/project/firebird/firebird/2.5.4-Release/Firebird-2.5.4.26856-0.tar.bz2 | |
| tar --strip=1 -xf firebird-source.tar.bz2 | |
| #Patch rwlock.h (this has been fixed in later release of firebird 3.x) | |
| sed -i '194s/.*/#if 0/' src/common/classes/rwlock.h |
| /** | |
| * Include Roboto Condensed font in your project | |
| * | |
| * Download Roboto Condensed ttf files from Google Fonts and place it in the same directory of this CSS file | |
| * You can then use this font in your project by setting | |
| * font-face: "Roboto Condensed", Helvetica, Arial, sans-serif; | |
| * | |
| * @author Mattia Migliorini (deshack) | |
| * @license MIT | |
| */ |
| #!/usr/bin/env bash | |
| # courtesy of : <https://ryanfb.github.io/etc/2014/11/13/command_line_ocr_on_mac_os_x.html> | |
| # Check for Homebrew, | |
| # Install if we don't have it | |
| if test ! $(which brew); then | |
| echo "Installing homebrew..." | |
| ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| fi | |
| # Ensure `homebrew` is up-to-date and ready |
| import asyncio | |
| from django import http | |
| from django.core.urlresolvers import set_script_prefix | |
| from django.utils.encoding import force_str | |
| from django.core.handlers.wsgi import get_script_name | |
| from django_wsgi.handler import DjangoApplication | |
| import logging | |
| import logging | |
| import sys |