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:
| // by Erik Wrenholt | |
| import java.util.*; | |
| class Mandelbrot | |
| { | |
| static int BAILOUT = 16; | |
| static int MAX_ITERATIONS = 1000; | |
| private static int iterate(float x, float y) | |
| { |
| <?php | |
| /** | |
| * Подключение к БД | |
| * | |
| * @param $host | |
| * @param $user | |
| * @param $pass | |
| * @param $db | |
| * @return bool|resource | |
| */ |
| /** | |
| * Checks if a value exists in an array | |
| * @param {mixed} needle : The searched value | |
| * @param {array} haystack : The array | |
| * @return {bool} | |
| */ | |
| var in_array = (function (needle, haystack) { | |
| return ( haystack.indexOf(needle) !== -1 ); | |
| }); |
| /** | |
| * Remove all occurrences of a given value from an array | |
| * @param {mixed} val : value to delete | |
| */ | |
| Array.prototype.unset = function(val){ | |
| var index; | |
| while ( (index = this.indexOf(val)) !== -1 ) { | |
| this.splice(index,1); | |
| } |
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Text; | |
| namespace csv | |
| { | |
| static class CSV | |
| { |
| # Add the following 'help' target to your Makefile | |
| # And add help text after each target name starting with '\#\#' | |
| help: ## Show this help. | |
| @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | |
| # Everything below is an example | |
| target00: ## This message will show up when typing 'make help' | |
| @echo does nothing |
| // vanilla JavaScript | |
| var links = document.links; | |
| for (var i = 0, linksLength = links.length; i < linksLength; i++) { | |
| if (links[i].hostname != window.location.hostname) { | |
| links[i].target = '_blank'; | |
| } | |
| } | |
| // or in jQuery |
| <?php | |
| // Same approach as of `fizzbuzz_short.php` but with some generators love so you | |
| // can fizzbuzz all you want without blowing up you memory. HOW GREAT IS IT? | |
| $fbrange = function ($start, $stop) { | |
| if ($start > 0) { | |
| for ($n = $start; $n < $stop; $n++) { | |
| yield (($f=!($n%3))|($b=!($n%5)))?($f?'Fizz':'').($b?'Buzz':''):"$n"; | |
| } |
| <?php | |
| // from http://php.net/manual/en/function.filesize.php | |
| function formatBytes($bytes, $precision = 2) { | |
| $units = array('B', 'KB', 'MB', 'GB', 'TB'); | |
| $bytes = max($bytes, 0); | |
| $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); | |
| $pow = min($pow, count($units) - 1); | |