Hot answers tagged

26

Ok, I was probably a little quick to ask here but for the sake of future reference here is the answer: One should pass the flag -acodec alac to ffmpeg for a lossless conversion between FLAC and ALAC: ffmpeg -i track.flac -acodec alac track.m4a


22

Flacon is an intuitive open-source GUI that does exactly that: split a FLAC with a CUE. Flacon extracts individual tracks from one big audio file containing the entire album of music and saves them as separate audio files. To do this, it uses information from the appropriate CUE file. It supports among other things: Supported input formats: WAV, FLAC, APE,...


16

Both WAV and FLAC formats are lossless, which means they do not lose any quality from an original music CD. WAV however is uncompressed, while FLAC uses a lossless compression mechanism (pretty much like a ZIP lossless compression) specifically designed for efficient packing of audio data. FLAC files can then be played with your favorite player, just like ...


16

First of all, -aq sets a quality-based variable bit rate - I think you're looking for -ab (note that I'm an ffmpeg user, so my knowledge of avconv syntax is limited - I've no idea how far it's drifted since the fork). Regardless, the built-in avconv/ffmpeg AAC encoder is pretty bad. fdk_aac The only really good AAC encoder for avconv/ffmpeg is libfdk_aac ...


15

You can use a graphical converter like soundconverter. However, since you need to add it to the ogg collection, I believe you might be looking for some command line solutions. You can probably try, ffmpeg -i musicfile.flac musicfile.ogg Or even, find . -name "*flac" -exec oggenc -q 7 {} \; Once, you have identified an efficient way for file conversion, ...


13

shntool on Ubuntu 14.04 sudo add-apt-repository -y ppa:flacon sudo apt-get update sudo apt-get install -y flacon shntool split -f *.cue -o flac -t '%n - %p - %t' *.ape flacon is a GUI for shntool, but it comes with all the codecs it needs... In particular, the flacon PPA furnishes the mac package (Monkey's Audio Console), on which flacon depends, which ...


13

The ffmpeg error you're getting makes me think you might just have a corrupted file. You could try sox audiofile.wv audiofile.flac. Alternatively, you could use the wavpack tools: wvunpack audiofile.wv -o - | flac - -o audiofile.flac Note that wiill not copy over any metadata; you'll need to do that separately. If even the wavpack tools can't ...


8

if high-quality files are being used, shnsplit is happily erroring out with shnsplit: error: m:ss.ff format can only be used with CD-quality files fortunately the flac binary supports --skip=mm:ss.ss and --until=mm:ss.ss so a script can use cuebreakpoints like this: [..] time[0]="00:00.00" c=1 for ts in $(cuebreakpoints "${cue_file}"); do time[${c}]=$...


8

metaflac --list will display that information (and more) for all blocks in a FLAC file. You can additionally use --block-number=X, where X is the block you want to have information about, to only get information about that particular block.


6

I suggest using FFmpeg to convert from FLAC to AAC. FFmpeg is easily installed on a Mac OS X machine with brew: brew install ffmpeg Then run the following command to convert all FLAC files in the current directory to AAC: for i in *flac;do of="${i/.flac/.m4a}"; ffmpeg -i "${i}" -vn -acodec libvo_aacenc -b:a 320k -f mp4 -y "${of}";done And to convert ...


6

Install the flac command from the package of the same name and run #!/bin/bash find . -name '*.wav' | while read file # eg stuff/artist/album/title.wav do file="$PWD/${file#./}" # make absolute to get more info album=${file%/*} # stuff/artist/album artist=${album%/*} # stuff/artist album=${album##*/} # album artist=$...


5

Easiest is to use the Unix command line utility file. For example: file "example.flac" example.flac: FLAC audio bitstream data, 16 bit, stereo, 44.1 kHz, 2474304 samples


5

If you only want the text part of metadata, you should use metaflac with the --no-utf8-convert option on export and on import, otherwise characters that are not in your shell's characters set get mangled (e.g. for me Japanese metadata did get mangled without it): metaflac --no-uft8-convert --export-tags-to=- src.flac | metaflac --import-tags-from=- --remove-...


5

Run MediaInfo on the two files. It will tell you why they differ. FLAC is always lossless as compared to the input file, but that doesn't mean there aren't good reasons why two FLAC files of the same song could differ in size: FLAC offers multiple levels of lossless compression. The exact same input file compressed with two different compression settings ...


4

You can use the ffprobe CLI tool that's included with ffmpeg: $ ffprobe -hide_banner 10\ Ivory\ Tower.flac Input #0, flac, from '10 Ivory Tower.flac': Metadata: ARTIST : Van Morrison TITLE : Ivory Tower ALBUM : No Guru, No Method, No Teacher DATE : 1986 track : 10 GENRE : ...


4

Can I format an SSD as one of the read-only CDFS-style formats? Yes. You can use mkisofs to write directly to your SSD, no existing filesystem or partition table necessary. mkisofs -o /dev/sdg /path2musicdir Then the block device (SSD) can be mounted the same as any other iso file mount -o loop,ro /dev/sdg /mountpt NOTE: Files need to be named ...


3

If you don't mind using command lines, you could use ffmpeg. If you simply run: ffmpeg -i file.wv -acodec flac file.flac (Assuming of course the file you want to convert is called "file.wv"), will produce a file called file.flac. Of course, if you want to, you can change that last bit of the command so that ffmpeg outputs a different filename. Or, if you ...


3

The flac encoder definitely will not do sample rate / bit depth conversion. However, sox can do this for you on the fly. Try this out: arecord -d4 -f dat -t wav -r 48000 -c 2 | sox - -b16 -r16k -c1 -t wav - | flac - -o message.flac Arguments to sox are: - use stdin -b16 output bit depth -r16k output 16kHz sample rate -c1 output one channel -t wav ...


3

From the man page, # -a, --analyze # Analyze a FLAC encoded file (same as -d except an analysis file is written) flac -a myfile.flac EDIT It might be easier to use soxi from the Sound eXchange project. On most Linux systems you need to install the sox package. On Debian derived distributions (including Ubuntu), you would use sudo apt-get install sox


3

You can encode flac to flac. Not sure how much the compression level will help, though. I tested with a voice message recorded by my IP phone. for level in {0..8} do flac --verify -$level -o tam818.$level.flac tam818.flac done Result: $ stat -c '%s %n' *.flac | sort 232049 tam818.8.flac 232406 tam818.7.flac 232845 tam818.6.flac 233596 tam818.5.flac ...


3

As you can see in the output, you encoded your audio into Format : FLAC. This is a format with lossless compression. ogg is just a container, and can hold different formats. To keep a similar size and quality as your mp3 you can choose the more usual vorbis format explicitly: ffmpeg -i in.mp3 -c libvorbis out.ogg The fact that it did not do this by default ...


3

find + ffmpeg solution: find ~/Music -type f -iname "*.wav" -exec sh -c \ 'bn=${1##*/}; bn=${bn%.*}; ffmpeg -loglevel 16 -i "$1" "${0}${bn}.flac"' ~/Music_Flac/ {} \; $0 - passed into shell command as a destination directory ~/Music_Flac/ $1 - passed into shell command as a filepath {} bn=${1##*/} - file basename without directory path bn=${bn%.*} - file ...


3

To strip any character likely to be unloved by Windows from the filenames of FLAC files in the current directory: for f in *.flac; do mv "$f" "$(echo -n "$f" | tr -cd ' -~' | tr '<>:"/\\|?*' '_')" done This will: Delete any non-ASCII or non-printable characters in the filename: tr -cd ' -~'; Replace with underscores any printable ASCII characters ...


3

ffmpeg accepts multiple output formats. Set the input file.format with -i followed by the output file.format: ffmpeg -i input.wav output.ogg output.mp3 output.flac Batch conversion: As a simple one liner with putting each format in a separate folder: mkdir mp3 ogg flac; for i in *.wav; do ffmpeg -i "$i" -b:a 320000 "./mp3/${i%.*}.mp3" -b:a 320000 "./ogg/${...


3

The standard flac command will perform the re-encoding step: flac some.wav -o some.flac For tagging, Kid3 provides a command-line interface, and recognizes tags in WAV files. kid3-cli has its own interactive command interpreter, so to copy tags from one file to another, you could use: $ kid3-cli kid3-cli> select some.wav kid3-cli> copy kid3-cli> ...


2

There is a project that works for several input files: split2flac From the project description: split2flac splits one big APE/FLAC/TTA/WV/WAV audio image (or a collection of such files, recursively) with CUE sheet into FLAC/M4A/MP3/OGG_VORBIS/WAV tracks with tagging, renaming, charset conversion of cue sheet, album cover images. It also uses ...


2

This is my script wrapping ffmpeg for converting any supported audio format to AAC (using libfdk-aac encoder which is the recommended aac encoder by ffmpeg wiki). #!/usr/bin/env python2.7 from optparse import OptionParser from subprocess import call from os.path import splitext import sys, os def ffaac(filename, opts): cmd = ['ffmpeg', '-hide_banner', ...


2

It can't calculate the final length through pipe, so it can't write it to the header of flac. It doesn't break the file, it saves as a livestream, which you shouldn't know when will be the end, and the header is on the beginning of the file.


2

The answer by AlexP is a great one, but if you're willing to install some extra software, there's an even easier option. Look into detox. It's a dead-simple program packaged by most distributions that does almost exactly the same thing as the shell script AlexP posted, while automatically iterating through the entire folder it's run on. For the sheer ...


2

Using GNU Parallel you can run: parallel ffmpeg -i {1} {1.}.{2} ::: *.wav ::: ogg mp3 flac {1} = replacement string for first input source {1.} = replacement string for first input source with extension removed {2} = replacement string for second input source ::: *.wav = input source 1 ::: ogg mp3 flac = input source 2 This will use all your cores.


Only top voted, non community-wiki answers of a minimum length are eligible