Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
You can get the list of installed codecs with:
| # Colorful Bash Prompt, inspired by "Extravagant Zsh Prompt" | |
| # Screenshot: http://img.gf3.ca/d54942f474256ec26a49893681c49b5a.png | |
| # A big thanks to \amethyst on Freenode | |
| if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then export TERM=gnome-256color | |
| elif infocmp xterm-256color >/dev/null 2>&1; then export TERM=xterm-256color | |
| fi | |
| if tput setaf 1 &> /dev/null; then | |
| tput sgr0 |
| // Boring | |
| if (isThisAwesome) { | |
| alert('yes'); // it's not | |
| } | |
| // Awesome | |
| isThisAwesome && alert('yes'); | |
| // Also cool for guarding your code | |
| var aCoolFunction = undefined; |
| App.Router.map(function() { | |
| this.resource('post', { path: '/posts/:post_id' }); | |
| }); | |
| App.PostRoute = Ember.Route.extend({ | |
| model: function(params) { | |
| return this.store.find('post', params.post_id); | |
| } | |
| }); |
| /* global google */ | |
| var GoogleMapComponent = Ember.Component.extend({ | |
| places: [], | |
| width: 500, | |
| height: 500, | |
| attributeBindings: ['style'], | |
| style: function () { | |
| return 'width:'+this.width+'px; height:'+this.height+'px'; |
| // Generated on 2014-09-03 using | |
| // generator-webapp 0.5.0 | |
| 'use strict'; | |
| // # Globbing | |
| // for performance reasons we're only matching one level down: | |
| // 'test/spec/{,*/}*.js' | |
| // If you want to recursively match all subfolders, use: | |
| // 'test/spec/**/*.js' |
| // Promise.all is good for executing many promises at once | |
| Promise.all([ | |
| promise1, | |
| promise2 | |
| ]); | |
| // Promise.resolve is good for wrapping synchronous code | |
| Promise.resolve().then(function () { | |
| if (somethingIsNotRight()) { | |
| throw new Error("I will be rejected asynchronously!"); |
| <script> | |
| // A minimal polyfill for copying text to clipboard that works most of the time in most capable browsers. | |
| // Note that: | |
| // - You may not need this. `navigator.clipboard.writeText()` works directly in all modern browsers as of 2020. | |
| // - In Edge, this may call `resolve()` even if copying failed. | |
| // - In Safari, this may fail if there is nothing selected on the page. | |
| // See https://github.com/lgarron/clipboard-polyfill for a more robust solution. | |
| // | |
| // License for this Gist: public domain / Unlicense | |
| function writeText(str) { |
| /** | |
| * Sending a TCP SYN packet properly using the raw-socket package. | |
| */ | |
| var raw = require('raw-socket'); | |
| var crypto = require('crypto'); | |
| // create a raw socket using TCP | |
| var s = raw.createSocket({ | |
| protocol: raw.Protocol.TCP | |
| }); |