Linux audio: Difference between revisions
Jump to navigation
Jump to search
Line 86: | Line 86: | ||
* Quality seems to be <code>lame --preset fast standard</code> |
* Quality seems to be <code>lame --preset fast standard</code> |
||
* Export in <tt>/Artist/Album/Track - Title.mp3</tt> |
* Export in <tt>/Artist/Album/Track - Title.mp3</tt> |
||
== Web Radio == |
|||
Several ways to play internet radios in Linux (sources [http://forums.opensuse.org/english/get-technical-help-here/multimedia/482796-internet-radio-supposed-work-2.html]). |
|||
Let's consider the following radios: |
|||
* Chromanova.fm Chillout ([http://www.chromanova.de/home_3.htm homepage]) - [http://www.chromanova.de/chromanova.-.chill.high.pls playlist (.pls)] content: |
|||
[playlist] |
|||
numberofentries=5 |
|||
File1=http://85.25.86.69:8100 |
|||
Title1=(#1 - 25/160) Chromanova.fm presents: Ambient & Chillout Deejay Sets |
|||
Length1=-1 |
|||
File2=http://212.112.241.88:8100 |
|||
Title2=(#2 - 25/120) Chromanova.fm presents: Ambient & Chillout Deejay Sets |
|||
Length1=-1 |
|||
File3=http://85.25.86.69:9000 |
|||
Title3=(#3 - 159/160) Chromanova.fm presents: Ambient & Chillout Deejay Sets |
|||
Length1=-1 |
|||
Here we list the various way to play the radios listed above. |
|||
;Mplayer |
|||
* Mplayer can play most streams. Give it the *stream* URL, not the playlist. Use <tt>-cache 1000</tt> to cache audio stream. Works also fine with proxies. |
|||
mplayer -cache 1000 http://85.25.86.69:8100 |
|||
;mpg123 |
|||
* mpg123 can also play most radio stream. Works also fine with proxies. |
|||
mpg123 -cache 1000 http://85.25.86.69:8100 |
|||
;audacious |
|||
* TBC |
|||
;streamtuner2 |
|||
* TBC |
|||
streamtuner2 -r # Then tell audacious to open http://localhost:8000 |
|||
;streamripper |
|||
* TBC |
|||
xterm -e streamripper %srv -D "%S/%q -- %A - %T" |
|||
;banshee |
|||
* '''{{red|NOT WORKING}}''' — can't make it work, at least behind a proxy. Giving either .pls, or stream URL, nothing works (w/o error msg) |
|||
;rythmbox |
|||
* '''{{red|NOT WORKING}}''' — can't make it work, at least behind a proxy. Giving either .pls, or stream URL, nothing works (w/o error msg) |
|||
;amarok |
|||
* '''STATE UNKNOWN''' — Used to work in the past, but need some weird configuration for the proxy. |
Revision as of 12:03, 15 October 2013
Audio Conversion using Virtual FS
Example:
mp3fs -b 224 ~/Music /mnt/mp3 -o allow_other,ro
GUI Audio Conversion
Nautilus Audio Converter
- Install with
sudo apt-get install wavpack mppenc libmpcdec3 faac flac vorbis-tools faad lame libid3-3.8.3-dev nautilus-script-audio-convert
- libid3-3.8.3-dev needed for id3tag.
- See Ubuntu Geek - Simplest way to convert audio file(s) on Ubuntu Linux
Gnome Sound Converter
Very nice utility.
- Can convert to flac, ogg, mp3.
- Output to given directory, in {artis - album} format
- mp3, support lame vbr (but apparently --vbr-old only) — done via GStreamer pipeline.
CLI Audio Conversion
flac - FLAC encoder / decoder
flac -d source.flac
flac -d source.flac -o output.wav
flac -d source.flac -c # Write output to stdout
lame - MP3 encoder / decoder
See also Technical information on encoding settings.
lame -m auto --preset standard input.wav output.mp3 # Equiv to fast standard
lame -m auto --preset fast standard input.wav output.mp3 # Equiv to -V2 (~192kbps)
lame -m auto --preset extreme input.wav output.mp3 # Equiv to fast extreme
lame -m auto --preset fast extreme input.wav output.mp3 # Equiv to -V0 (~256kbps)
lame -m auto --preset insane input.wav output.mp3 # Equiv to -b 320
twolame - MP2 encoder / decoder
twolame -b 256 input.wav -o "output.mp3"
pacpl - Multi-format encoder / decoder in Perl
# From FLAC to MP3 - Using LAME (extreme quality) - recurse & keep directory structure
pacpl --to mp3 -r -p flac/ --outdir /media/USB --encoder lame --defopts 0 --eopts="-m auto --preset fast extreme"
# To decrease encoding priority:
nice -n 19 pacpl ...
To change the directory structure from "Artist - Album" to "Artist/Album":
for i in *; do eval $(echo $i | sed -r '/ - /!s/(.*)/ARTIST=Various;ALBUM="\1"/; / - /s/(.*) - (.*)/ARTIST="\1"; ALBUM="\2"/'); mkdir "$ARTIST"; mv "$i" "$ARTIST/$ALBUM"; done
yaflac2mp3 - Yet Another FLAC to MP3 script
An handy script to transcode from FLAC to MP3. Could be used as a basis for customized script. See also [1] for more ideas.
yaflac2mp3.sh -s . -d mp3
Conversion in integrated players
Banshee
- Plug external mp3 player device
- Right click on device in Banshee
- Select the media type (ogg, mp3), then click on edit button.
- For mp3, quality goes from 0 (worst) to 9 (best). 7 seems equivalent to
lame -V 2
, i.e. fast standard preset, and 9 seems equivalent tolame -V 0
, ie. fast extreme preset
- For mp3, quality goes from 0 (worst) to 9 (best). 7 seems equivalent to
- BUG? — apparently can't save to .ogg although ogg is selected as encoder... — SOLVED see below.
- BUG? — export all files in device root directory — SOLVED see below.
- Create a file named ..is_audio_player in device root directory. For instance, to have audio files added in OGG format to the device, using a 1-folder deep structure (ie. Artist - Album/Track. Title), use the following:
name=SAMSUNG\ YP-U1\ (1GB)
folder_depth=1
output_formats=application/ogg,audio/mpeg,audio/mp3
RythmBox
- Can also export to external mp3 player
- BUG? — Apparently only in mp3 (although there are some settings about preferred format in preferences)
- Quality seems to be
lame --preset fast standard
- Export in /Artist/Album/Track - Title.mp3
Web Radio
Several ways to play internet radios in Linux (sources [6]).
Let's consider the following radios:
- Chromanova.fm Chillout (homepage) - playlist (.pls) content:
[playlist] numberofentries=5 File1=http://85.25.86.69:8100 Title1=(#1 - 25/160) Chromanova.fm presents: Ambient & Chillout Deejay Sets Length1=-1 File2=http://212.112.241.88:8100 Title2=(#2 - 25/120) Chromanova.fm presents: Ambient & Chillout Deejay Sets Length1=-1 File3=http://85.25.86.69:9000 Title3=(#3 - 159/160) Chromanova.fm presents: Ambient & Chillout Deejay Sets Length1=-1
Here we list the various way to play the radios listed above.
- Mplayer
- Mplayer can play most streams. Give it the *stream* URL, not the playlist. Use -cache 1000 to cache audio stream. Works also fine with proxies.
mplayer -cache 1000 http://85.25.86.69:8100
- mpg123
- mpg123 can also play most radio stream. Works also fine with proxies.
mpg123 -cache 1000 http://85.25.86.69:8100
- audacious
- TBC
- streamtuner2
- TBC
streamtuner2 -r # Then tell audacious to open http://localhost:8000
- streamripper
- TBC
xterm -e streamripper %srv -D "%S/%q -- %A - %T"
- banshee
- NOT WORKING — can't make it work, at least behind a proxy. Giving either .pls, or stream URL, nothing works (w/o error msg)
- rythmbox
- NOT WORKING — can't make it work, at least behind a proxy. Giving either .pls, or stream URL, nothing works (w/o error msg)
- amarok
- STATE UNKNOWN — Used to work in the past, but need some weird configuration for the proxy.