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| [ { "gentilico" : "afegãne", | |
| "nome_pais" : "Afeganistão", | |
| "nome_pais_int" : "Afghanistan", | |
| "sigla" : "AF" | |
| }, | |
| { "gentilico" : "sul-africana", | |
| "nome_pais" : "África do Sul", | |
| "nome_pais_int" : "South Africa", | |
| "sigla" : "ZA" | |
| }, |
| <template> | |
| <div class="conteiner"> | |
| <div class="row col-md-7"> | |
| <form v-on:submit.prevent="send()" v-if="!isSend"> | |
| <div class="form-group" v-bind:class="{ 'has-error': errors.name && errors.name.length > 0 }"> | |
| <label for="nome">Nome:<span class="glyphicon-asterisk"></span></label> | |
| <input type="text" class="form-control" id="nome" v-model="name" placeholder="Digite seu nome"> | |
| <small class="text-danger" | |
| v-if="errors.name" |
| #!/usr/bin/env node | |
| /* | |
| * Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js | |
| * Modified from https://gist.github.com/paolorossi/1993068 | |
| */ | |
| var http = require('http') | |
| , fs = require('fs') | |
| , util = require('util') |
A curated list of amazingly awesome PHP libraries, resources and shiny things.
| -- Decoding | |
| SELECT CONVERT_FROM(DECODE(field, 'BASE64'), 'UTF-8') FROM table; | |
| -- Encoding | |
| SELECT ENCODE(CONVERT_TO(field, 'UTF-8'), 'base64') FROM table; |
lanetix=# \d foo
Table "scripting.foo"
Column | Type | Modifiers
--------+-----------------------+-----------
id | integer | not null
a | character varying(40) | not null
b | character varying(40) | not null
c | character varying(40) | not nullMinimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:
| /* | |
| https://www.smashingmagazine.com/2016/07/improving-user-flow-through-page-transitions/ | |
| You can copy paste this code in your console on smashingmagazine.com | |
| in order to have cross-fade transition when change page. | |
| */ | |
| var cache = {}; | |
| function loadPage(url) { | |
| if (cache[url]) { |
| # webm | |
| ffmpeg -i IN -f webm -vcodec libvpx -acodec libvorbis -ab 128000 -crf 22 -s 640x360 OUT.webm | |
| # mp4 | |
| ffmpeg -i IN -acodec aac -strict experimental -ac 2 -ab 128k -vcodec libx264 -vpre slow -f mp4 -crf 22 -s 640x360 OUT.mp4 | |
| # ogg (if you want to support older Firefox) | |
| ffmpeg2theora IN -o OUT.ogv -x 640 -y 360 --videoquality 5 --audioquality 0 --frontend |