anonradio: add ffmpeg transcode preset
Also provide token documentation and a real example. Signed-off-by: Joseph B. Konno <thac0@tx0.org>
This commit is contained in:
parent
26ced8f59c
commit
f97f3c2550
|
@ -0,0 +1,20 @@
|
|||
# aNONradio
|
||||
|
||||
For the coolest DJs on the interwebs.
|
||||
|
||||
The magic values for the encoder? They come from the [Open Mic page][openmic].
|
||||
|
||||
[openmic]: https://anonradio.net/openmic/
|
||||
|
||||
## ffmpeg
|
||||
|
||||
`transcode.ffpreset` shows how you provide arguments to ffmpeg in a file instead of the command line. In preset files, you can also add comments. Anyone who's spent any time with ffmpeg knows the argument list can get out of control quickly. Note this is a "generic" preset example-- you can get fancy by adding per-codec presets. If you want the full story, consult [the documentation][ffpresets].
|
||||
|
||||
`transcode.bash` just puts things together, and takes two positional arguments:
|
||||
- input filename
|
||||
- output filename
|
||||
|
||||
Example invocation:
|
||||
- `$ bash transcode.bash sintel_trailer-audio.flac trailer.mp3`
|
||||
|
||||
[ffpresets]: https://ffmpeg.org/ffmpeg.html#Preset-files
|
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: 0BSD
|
||||
|
||||
if [ -z $1 ] || [ -z $2 ]; then
|
||||
echo "ERROR: expecting 2 arguments: input file (1) and output file (2)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FFMPEG_DATADIR="$PWD" \
|
||||
ffmpeg -i "$1" -fpre transcode.ffpreset "$2"
|
|
@ -0,0 +1,4 @@
|
|||
acodec=libmp3lame
|
||||
ac=2
|
||||
ar=44100
|
||||
b=192k
|
Loading…
Reference in New Issue