Commands tagged flac (12)


  • 16
    for file in *.flac; do flac -cd "$file" | lame -q 0 --vbr-new -V 0 - "${file%.flac}.mp3"; done
    irae · 2010-04-11 05:35:06 10
  • find . -type f -iname '*.flac' # searches from the current folder recursively for .flac audio files | # the output (a .flac audio files with relative path from ./ ) is piped to while read FILE; do FILENAME="${FILE%.*}"; flac -cd "$FILE" | lame -b 192 - "${FILENAME}.mp3"; done # for each line on the list: # FILE gets the file with .flac extension and relative path # FILENAME gets FILE without the .flac extension # run flac for that FILE with output piped to lame conversion to mp3 using 192Kb bitrate Show Sample Output


    8
    find . -type f -iname '*.flac' | while read FILE; do FILENAME="${FILE%.*}"; flac -cd "$FILE" | lame -b 192 - "${FILENAME}.mp3"; done
    paulochf · 2010-08-15 19:02:19 3
  • Do you have an entire album in a unique file and want to split it in individual tracks? If you also have the cue file you can do it! Packages for Debian-based systems users: * cuetools shntool * FLAC (.flac): flac * WavPack (.wv): wavpack * Monkey's Audio (.ape): libmac2 monkeys-audio (deb http://www.debian-multimedia.org sid main) NOTE: "sid" packages are unstable, but I didn't have problems with them. If you prefer, use the "stable" version repository. To transfer the tags, you can use this (works with .flac, .ogg and .mp3): cuetag sample.cue split-track*.flac Show Sample Output


    5
    cuebreakpoints <cue file> | shnsplit -o <lossless audio type> <audio file>
    o6291408 · 2009-04-29 10:42:57 4
  • Takes all .flac directories, feeds them into a simple transcode pipeline to spit out .wavs with the same name (but correct extension).


    5
    for i in *.flac; do gst-launch filesrc location="$i" ! flacdec ! wavenc ! filesink location="${i%.flac}.wav"; done
    JamesHarrison · 2010-07-17 22:48:22 5

  • 5
    for f in *;do flac -cd $f |lame -b 192 - $f.mp3;done
    nickleus · 2010-10-19 07:55:11 3
  • if you haven't already done so, install lame and flac: sudo apt-get install lame flac Show Sample Output


    2
    flac -cd input.flac |lame -h - output.mp3
    nickleus · 2010-03-05 23:54:21 4

  • 2
    shnsplit -t "%n-%t" -f <cue file> <audio file>
    proudzhu · 2013-11-18 12:22:57 7
  • Sometimes I get FLAC files that RhythmBox can't play but VLC can. So I re-encode them using GStreamer at highest compression.


    0
    find . -type f -iname '*.flac' | while read i; do mv -- "$i" "$i.tmp"; gst-launch filesrc location="$i.tmp" ! flacdec ! flacenc quality=8 ! filesink location="${i%.tmp}"; rm -- "$i.tmp"; done
    qdrizh · 2014-07-10 19:21:22 7
  • Converts all monkey audio files below currently directory to FLAC. For only current directory, use `for f in *.ape; do avconv -i "$f" "${f%.ape}.flac"; done` To remove APE files afterward, use `rm */*.ape`


    0
    for f in */*.ape; do avconv -i "$f" "${f%.ape}.flac"; done
    qdrizh · 2014-10-10 12:33:00 8
  • Make it better.


    0
    for i in *.flac; do flac -d -c "${i}" |lame -h --preset 196 --ta "Artist Here" --tl "Disc Title Here" --add-id3v2 - "./MP3/$i.mp3"; done
    arlequin · 2016-04-06 13:39:52 12
  • Uses ffmpeg to convert all that annoying .FLAC files to MP3 files keeping all the Artist's information in them. There's not much more to it. Show Sample Output


    0
    find . -name "*.flac" -exec ffmpeg -i {} -ab 160k -map_metadata 0 -id3v2_version 3 {}.mp3 \;
    gustavohmsilva · 2016-06-28 19:35:06 10
  • You'll need to install sox and flac packages in Debian/Ubuntu.


    -3
    rec -c 2 -r 44100 -s -t wav - | flac - --sign=signed --channels=2 --endian=big --sample-rate=44100 --bps=16 -f -o file.flac
    bohwaz · 2011-08-30 03:14:32 3

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands


Check These Out

list files recursively by size

List the URLs of tabs of the frontmost Chrome window in OS X
This also works with Safari if you just change the application name. Replace $ window 1 with $ windows to list the URLs of tabs in all windows instead of only the frontmost window. This also includes titles: $ osascript -e{'set o to""','tell app"google chrome"','repeat with t in tabs of window 1','set o to o&url of t&"\n"&" "&title of t&"\n"',end,end}|sed \$d .

list files recursively by size

list files recursively by size

Create QR codes from a URL.
QR codes are those funny square 2d bar codes that everyone seems to be pointing their smart phones at. Try the following... $ qrurl http://xkcd.com Then open qr.*.png in your favorite image viewer. Point your the bar code reader on your smart phone at the code, and you'll shortly be reading xkcd on your phone. URLs are not the only thing that can be encoded by QR codes... short texts (to around 2K) can be encoded this way, although this function doesn't do any URL encoding, so unless you want to do that by hand it won't be useful for that.

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

diff two unsorted files without creating temporary files
bash/ksh subshell redirection (as file descriptors) used as input to diff

Rename files in batch

ROT13 using the tr command

Print environment information.
Print environment (system) information using Perl.


Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: