Examples usage of various codecs with FFMpeg.
- flac.sh : An Icecast Source Client
- for Windows (Cygwin is required)
- and macOS (
brew install ffmpeg)
- another_examples.sh : Samples
- FFMpeg can push to Icecast2 in various formats: Opus/Vorbis/AAC/MP3
| require 'digest/sha2' | |
| class ProofOfWork | |
| @charset = (" ".."~").to_a | |
| def self.solve(target,maxlength) | |
| for i in 1..maxlength+1 | |
| ProofOfWork.chain(ProofOfWork.product(i)) do |candidate| | |
| hashval = Digest::SHA256.hexdigest(candidate) | |
| if hashval.start_with?(target) |
| IP=127.0.0.1 | |
| PORT=443 | |
| while true | |
| do | |
| DATE=$(date +%s) | |
| iperf3 -c $IP -p $PORT -J --logfile ${DATE}_forward.json | |
| iperf3 -R -c $IP -p $PORT -J --logfile ${DATE}_reverse.json | |
| sleep 600 | |
| done |
| #!/bin/bash | |
| BANKSELECT='gm' | |
| SF="$HOME/Timbres Of Heaven GM_GS_XG_SFX V 3.2 Final.sf2" | |
| find "$1" -type f -iname "*.mid" -print0 | while IFS= read -r -d '' fullfile; do | |
| file=`basename ${fullfile}` | |
| fluidsynth -g 0.01 -o synth.midi-bank-select=$BANKSELECT -o synth.midi-channels=256 -o synth.polyphony=4096 -r 48000 -O double -F "${file}_raw.wav" "${SF}" "${fullfile}" | |
| sox --norm=-1 "${file}_raw.wav" -b 32 -e signed-integer "${file}.wav" | |
| rm "${file}_raw.wav" & |
| var di = 0.81 * temp + 0.01 * rh * (0.99 * temp - 14.3) + 46.3 ; |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #define MAX_FRAME_SIZE 256*1024 // KB | |
| #define CONTENT_LENGTH "Content-Length: " | |
| #define PAYLOAD "\r\n" | |
| int main() | |
| { |
| import math | |
| src_data = ((14,2735,"TKB"), | |
| (13,253,"MAC"), | |
| (8,27,"COBOL"), | |
| (6,27,"BASIC"), | |
| (6,12,"Pascal"), | |
| (4,91,"EDT"), | |
| (1,33,"SOS")) |
| function eschtml(body) { | |
| return jQuery('<div>').text(body).html(); | |
| } | |
| $(document).ready(function(){ | |
| var exts = ["aif","m4a","mp3","ogg","opus","wav"]; | |
| var queue = []; | |
| var current = {}; | |
| #!/bin/bash | |
| CONV='/usr/bin/convert.exe' | |
| #find "$1" -type f \( -iname "*.bmp" \) -print0 | while IFS= read -r -d '' fullfile; do # BMP->PNG (Lossless) | |
| find "$1" -type f \( -iname "*.bmp" -o -iname "*.png" \) -print0 | while IFS= read -r -d '' fullfile; do # any Lossless to Lossy JPEG | |
| #$CONV "${fullfile}" "${fullfile}.png" && rm -f "${fullfile}" # BMP->PNG (Lossless) | |
| $CONV -quality 80 "${fullfile}" "${fullfile}.jpg" && rm -f "${fullfile}" # any Lossless to Lossy JPEG | |
| done |
| #!/bin/bash | |
| UNAR='/cygdrive/d/apps/unar/unar.exe' | |
| find "$1" -type f \( -iname "*.lzh" -o -iname "*.arc" -o -iname "*.zip" -o -iname "*.7z" -o -iname "*.rar" \) -print0 | while IFS= read -r -d '' fullfile; do | |
| fullpath=$(readlink -f "${fullfile}") | |
| fulldir=$(dirname "${fullfile}") | |
| $UNAR -t -o "${fulldir}" "${fullfile}" && rm -f "${fullfile}" | |
| done |