Skip to content

Instantly share code, notes, and snippets.

View process_directory_oop.php
<?php
function processDirectory($start = './', $format = 'array') {
if (!empty($start)) {
$start = rtrim($start, '/') . '/';
}
if (!empty($start) && !is_dir($start)) {
return 'json' === $format ? 'false' : false;
}
@spirit-q2
spirit-q2 / ffmpeg.md
Created April 29, 2020 08:20 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files
View ffmpeg.md

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal 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: