Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

19 votes
3 answers
12478 views
Why can I not split a .ape file?
I would like to split a `.ape` album into individual tracks in `.flac` format using a `.cue` sheet. For this I followed a [tutorial][1] I found. In short I pass this command to the terminal: cuebreakpoints example.cue | shnsplit -o flac example.ape But I get the following error back: shnsplit: warni...
I would like to split a .ape album into individual tracks in .flac format using a .cue sheet. For this I followed a tutorial I found. In short I pass this command to the terminal: cuebreakpoints example.cue | shnsplit -o flac example.ape But I get the following error back: shnsplit: warning: failed to read data from input file using format: [ape] shnsplit: + you may not have permission to read file: [example.ape] shnsplit: + arguments may be incorrect for decoder: [mac] shnsplit: + verify that the decoder is installed and in your PATH shnsplit: + this file may be unsupported, truncated or corrupt shnsplit: error: cannot continue due to error(s) shown above Unfortunately I don't know how to overcome this issue. One thing I think can be discarded is the file being corrupt since I had the same error with another .ape and I have followed this procedure with origin .flac files with no problem. How can I solve this problem?
Chris Daniels (191 rep)
Nov 2, 2014, 02:59 AM • Last activity: Apr 18, 2025, 08:51 PM
2 votes
1 answers
113 views
Does adding silence to a flac with an ffmpeg filter result in any quality loss?
I'm attempting to add a few seconds of silence to the end of several flac audio files. [One recommended method][1] is: ``` # ffmpeg -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=48000 -t 5 silence.flac # ffmpeg -i 'concat:input.flac|silence.flac' -c:a copy output.flac ``` When I do this, ho...
I'm attempting to add a few seconds of silence to the end of several flac audio files. One recommended method is:
# ffmpeg -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=48000 -t 5 silence.flac 
# ffmpeg -i 'concat:input.flac|silence.flac' -c:a copy output.flac
When I do this, however, the output.flac appears to have the same length as input.flac (as reported, e.g., by ffprobe, mediainfo, or when played in vlc). I'm not sure why it's not working, but the following also does what I want by extending the file by five seconds as silence:
# ffmpeg -i input.flac -af apad=pad_dur=5s output.flac
I've read that the latter approach has the disadvantage of re-encoding the file. But if the input and output are both flac, does that mean the re-encoding is done with no quality loss? Separately, any suggestions on why the first method is not generating a longer audio file with five seconds of silence at the end?
Adam J. Kessel (81 rep)
Mar 24, 2025, 06:09 PM • Last activity: Mar 24, 2025, 06:26 PM
108 votes
11 answers
109033 views
How do I split a flac with a cue?
I've got a full album flac and a cue file for it. How can I split this into a flac per track? I'm a KDE user, so I would prefer a KDE/Qt way. I would like to see command line and other GUI answers as well, but they are not my preferred method.
I've got a full album flac and a cue file for it. How can I split this into a flac per track? I'm a KDE user, so I would prefer a KDE/Qt way. I would like to see command line and other GUI answers as well, but they are not my preferred method.
xenoterracide (61203 rep)
Mar 28, 2011, 10:57 PM • Last activity: Dec 13, 2024, 05:26 PM
4 votes
1 answers
3978 views
Is there a way to check the losslessness of a FLAC file in Linux?
Let me explain my question with greater detail: I know `FLAC` is a lossless audio format **with respect to the original file;** this is, any piece of audio encoded with `FLAC` will be preserved completely. But say I got an CD album in `MP3` format (which is, of course, lossy) and then decide to re-e...
Let me explain my question with greater detail: I know FLAC is a lossless audio format **with respect to the original file;** this is, any piece of audio encoded with FLAC will be preserved completely. But say I got an CD album in MP3 format (which is, of course, lossy) and then decide to re-encode it in FLAC and give this "lossless" version to a friend. How does he/she know that the file received from me is not an exact copy of the CD album but a camouflaged lossy copy? I've read something about it and it seems there is some app for Windows which identifies this fake FLACs but I haven't found anything like that for Linux. So my question is: Is there a way to tell real FLACs from fake ones in Linux?
Carl Rojas (1139 rep)
Dec 29, 2014, 02:15 AM • Last activity: Dec 10, 2024, 12:25 PM
3 votes
3 answers
6344 views
Splitting WavPack files when the .cue file and .wv file have different names?
If a directory contains an album encoded as one large .wv file and a .cue file, splitting the entire album into individual .flac tracks is a simple task: `$ cuebreakpoints foo.cue | shnsplit -o flac foo.wv` What I'd like to know is how to split a file where the names don't match up, e.g.: 'foobar.wv...
If a directory contains an album encoded as one large .wv file and a .cue file, splitting the entire album into individual .flac tracks is a simple task: $ cuebreakpoints foo.cue | shnsplit -o flac foo.wv What I'd like to know is how to split a file where the names don't match up, e.g.: 'foobar.wv' and 'foo.cue'. If I attempt this I get this error message: shnsplit: warning: none of the builtin format modules handle input file: [foobar.wv] shnsplit: error: cannot continue due to error(s) shown above Do I need to alter the .cue file? Because simply renaming 'foobar.wv' to 'foo.wv' prior to splitting doesn't seem to work for me. Or is there something wrong with the wavpack package? PS: I didn't know how to tag this question properly. Sorry 'bout that. **Some more info** To be clear, I should point out that the text inside the .cue files points to the appropriate .wv files. **Yet more info** I'm having a bit of luck, for whatever reason, by decompressing the .wv to .wav and then altering the .cue file accordingly. Not ideal but it's working so far.
boehj (2660 rep)
Apr 23, 2011, 06:30 PM • Last activity: Jul 8, 2024, 06:35 PM
10 votes
3 answers
4454 views
Copy all tags from one FLAC file to another?
Is there a way to copy all tags from one FLAC file to another seamlessly using a command-line tool?
Is there a way to copy all tags from one FLAC file to another seamlessly using a command-line tool?
Naftuli Kay (41346 rep)
Jun 21, 2012, 06:15 PM • Last activity: Apr 5, 2024, 09:12 AM
2 votes
1 answers
912 views
can't encode a WAV file to FLAC; returns 'ERROR: unsupported format type 3'
The error reportedly originates from files created on Windows. When attempting to convert, `flac 1.4.3` prints: $ flac --best ~/music/unknown-80s-german-song.wav unknown-80s-german-song.wav: ERROR: unsupported format type 3 I opened the file in Audacity 3.4.2 (Flatpak) and attempted exporting — the...
The error reportedly originates from files created on Windows. When attempting to convert, flac 1.4.3 prints: $ flac --best ~/music/unknown-80s-german-song.wav unknown-80s-german-song.wav: ERROR: unsupported format type 3 I opened the file in Audacity 3.4.2 (Flatpak) and attempted exporting — the program defaults to 'signed 16-bit PCM' encoding while the file presents itself as 32-bit: $ mediainfo ~/music/unknown-80s-german-song.wav General Complete name : /home/user/music/unknown-80s-german-song.wav Format : Wave Format settings : PcmWaveformat File size : 60.6 MiB Duration : 2 min 59 s Overall bit rate mode : Constant Overall bit rate : 2 822 kb/s Audio Format : PCM Format profile : Float Codec ID : 3 Codec ID/Hint : IEEE Duration : 2 min 59 s Bit rate mode : Constant Bit rate : 2 822 kb/s Channel(s) : 2 channels Sampling rate : 44.1 kHz Bit depth : 32 bits Stream size : 60.6 MiB (100%) For automation I prefer a command-line method. --- While this is on the grey area (the state of copyright = **unknown**), [the file emerged on a community centered around a certain unidentified song](https://old.reddit.com/r/TheMysteriousSong/comments/qyhw82/highquality_version_of_the_newly_found_copy_of_tms/) (digitized tape).
user598527 (735 rep)
Mar 18, 2024, 11:23 AM • Last activity: Mar 19, 2024, 09:10 AM
4 votes
2 answers
7790 views
How to convert APE files to FLAC in Linux?
is there a way to convert a bunch of APE files to FLAC in Linux without altering them in any way? I mean without applying any replaygain, etc..
is there a way to convert a bunch of APE files to FLAC in Linux without altering them in any way? I mean without applying any replaygain, etc..
Zoltan King (431 rep)
Jun 18, 2021, 03:16 PM • Last activity: Feb 4, 2024, 03:28 PM
2 votes
2 answers
1709 views
How do I get song names and artists from mp3 files in a dir?
I have a recovered dir with mp3 and flac files. The names were lost. So all I got is a mess of around 30,000 files iwth names like f30818304.flac I played some and see that the tags in the files are intact. But the thing is, most of it I probably don't need. I just want to see if there's any raritie...
I have a recovered dir with mp3 and flac files. The names were lost. So all I got is a mess of around 30,000 files iwth names like f30818304.flac I played some and see that the tags in the files are intact. But the thing is, most of it I probably don't need. I just want to see if there's any rarities in those files. So what I need is a way to massively write the tags to a file. Like "Artist - Song", one per line would be enough. Anyone know of a way to do this ? command line preferably.
Nelson Teixeira (470 rep)
Apr 16, 2017, 09:59 PM • Last activity: Dec 18, 2023, 05:59 PM
0 votes
1 answers
741 views
How to copy all FLAC tags using ffmpeg?
I'm using `ffmpeg` to perform audio filtering on my music library. However, it is not copying all FLAC tags (in particular, it's dropping [chapter information](https://wiki.xiph.org/Chapter_Extension)). https://unix.stackexchange.com/questions/41304 has a potential work-around, but is there a way to...
I'm using ffmpeg to perform audio filtering on my music library. However, it is not copying all FLAC tags (in particular, it's dropping [chapter information](https://wiki.xiph.org/Chapter_Extension)) . https://unix.stackexchange.com/questions/41304 has a potential work-around, but is there a way to get **ffmpeg** to copy chapter information from the input to the output?
Matthew (209 rep)
Oct 29, 2023, 10:32 PM • Last activity: Oct 31, 2023, 05:46 AM
2 votes
1 answers
1818 views
Converting FLAC with images into OGG with ffmpeg/libvorbis creates corrupt files
I have a [script](https://github.com/akerbos/scripts/blob/master/music2thumb.rb) that extracts a specified subset of my music collection. Most of my music is FLAC; since space (and supported formats) may be an issue on the target device (smartphon, car radio, ...) it can also convert "down" to OGG f...
I have a [script](https://github.com/akerbos/scripts/blob/master/music2thumb.rb) that extracts a specified subset of my music collection. Most of my music is FLAC; since space (and supported formats) may be an issue on the target device (smartphon, car radio, ...) it can also convert "down" to OGG for MP3. I figured out [a while ago](https://unix.stackexchange.com/a/176948/17409) how to convert FLAC to OGG so that meta data is kept: ffmpeg -v quiet -y -i "${infile}" \ -codec:a libvorbis -qscale:a 6 -map_metadata 0 \ "${outfile}" However, I noticed that the resulting file won't play in my Android app if the FLAC contained a cover image. I did [some digging](https://github.com/akerbos/OGGvAMF) ; the short of it is, ffmpeg seems to create corrupt OGGs in this case. Is this a bug, or do I have to pick different parameters?
Raphael (2095 rep)
Feb 1, 2017, 10:20 PM • Last activity: Oct 22, 2023, 06:06 PM
1 votes
2 answers
3771 views
Convert WAV to FLAC while preserving tags
Is there a command utility that can convert between various audio formats (or more specifically from wav to flac) while preserving tags? Or an utility that can copy tags from one audio file to another? There are various tags, not just track name and artist. There are also custom tags (i.e. tags with...
Is there a command utility that can convert between various audio formats (or more specifically from wav to flac) while preserving tags? Or an utility that can copy tags from one audio file to another? There are various tags, not just track name and artist. There are also custom tags (i.e. tags with custom names not commonly found in tag databases). Tags are generated by different tools and every tool saves tags in different formats. Some tools just make a "LIST" chunk with type "INFO". Other tools also make an "ID3 " or "id3 " chunk with ID3v2 tags inside. Other tools just stick ID3v2 tags to the end of the file without even making a RIFF chunk.
user3469976 (243 rep)
Oct 29, 2019, 08:08 AM • Last activity: Aug 28, 2023, 03:01 PM
4 votes
2 answers
2508 views
Copy FLAC tags to MP3 files?
I have a number of FLAC files that I'm converting into MP3 files with the following: flac -cd file.flac | lame ... - file.mp3 Is there a utility which will copy Vorbis (FLAC and OGG) metadata, convert it to appropriate ID3 tags, and tag an MP3 with the same tags as the FLAC file?
I have a number of FLAC files that I'm converting into MP3 files with the following: flac -cd file.flac | lame ... - file.mp3 Is there a utility which will copy Vorbis (FLAC and OGG) metadata, convert it to appropriate ID3 tags, and tag an MP3 with the same tags as the FLAC file?
Naftuli Kay (41346 rep)
Jan 2, 2015, 04:14 AM • Last activity: Feb 28, 2023, 03:15 PM
9 votes
4 answers
16894 views
How to display technical codec info for a FLAC file?
Given a `.flac` file, how is it possible to query and display the technical info relating to the codec? I looked into `man flac` with no luck (the `--analyze` output is not humanly parseable). I'm specifically interested in the **bit rate** (say, 16 bits per sample), the **sample rate** (say, 44.1 K...
Given a .flac file, how is it possible to query and display the technical info relating to the codec? I looked into man flac with no luck (the --analyze output is not humanly parseable). I'm specifically interested in the **bit rate** (say, 16 bits per sample), the **sample rate** (say, 44.1 KHz) and the **number of channels**. Either GUI or CLI utilities are acceptable.
landroni (11586 rep)
Mar 20, 2014, 04:09 PM • Last activity: Jan 12, 2023, 02:34 AM
5 votes
4 answers
9650 views
How to convert all .wav files in subdirectories to .flac?
I have some songs in wav format. I would like to convert them to flac (which is also lossless, but has compression). The solution needs to recurse through subdirectories to find .wav or .WAV files (ideally case insensitive), convert them to .flac and output the .flac files to a different directory t...
I have some songs in wav format. I would like to convert them to flac (which is also lossless, but has compression). The solution needs to recurse through subdirectories to find .wav or .WAV files (ideally case insensitive), convert them to .flac and output the .flac files to a different directory tree. The original wav files are in ~/Music and the output flac files could go into ~/Music_Flac. I am using Arch Linux x86_64 and I have ffmpeg as follows: ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7.3.0 (GCC) configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-avresample --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-shared --enable-version3 --enable-omx libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100
MountainX (18888 rep)
Mar 4, 2018, 08:35 AM • Last activity: Dec 26, 2022, 07:42 PM
10 votes
4 answers
3785 views
Mass .flac --> .mp3 transcoding: How to write a shell script that preserves ID3 tag information?
In recent weeks I've gone from a fairly 'hands-on' approach to .flac --> .mp3 transcoding, to one that's far more 'set & forget'. The first step was to stop using a GUI front end (Audacity with a LAME plug-in) and instead use the method I outlined [here][1]. The second step was to find a bash shell...
In recent weeks I've gone from a fairly 'hands-on' approach to .flac --> .mp3 transcoding, to one that's far more 'set & forget'. The first step was to stop using a GUI front end (Audacity with a LAME plug-in) and instead use the method I outlined here . The second step was to find a bash shell script that would tell that command loop to work recursively, allowing directories with many subdirectories containing .flac files to be transcoded in one simple step. That answer was provided by a user at askubuntu.com. Now I wish to learn how to further refine things so that ID3 tag information is preserved. The methods linked to above strip ID3 tag data, leaving the bare minimum (i.e. only the title field remains). Can anyone teach me how to write such a shell script? *** The shell script has been updated thus: #!/bin/bash file="$1" flac -cd "$file" | lame --preset fast extreme - "${file%.flac}.mp3" id3cp "$file" "${file%.flac}.mp3" Doing find . -name '*.flac' -exec ~/bin/flac2mp3 '{}' \; in ~/Desktop/stack gives the following output: 01 - Amon Tobin - Chomp Samba.flac: done LAME 3.98.4 64bits (http://www.mp3dev.org/) Using polyphase lowpass filter, transition band: 19383 Hz - 19916 Hz Encoding to ./01 - Amon Tobin - Chomp Samba.mp3 Encoding as 44.1 kHz j-stereo MPEG-1 Layer III VBR(q=0) Parsing ./01 - Amon Tobin - Chomp Samba.flac: done. Copying to ./01 - Amon Tobin - Chomp Samba.mp3: done id3info for the original .flac and resultant .mp3 gives, respectively: *** Tag information for 01 - Amon Tobin - Chomp Samba.flac (i.e. nothing); *** Tag information for 01 - Amon Tobin - Chomp Samba.mp3 *** mp3 info MPEG1/layer III Bitrate: 128KBps Frequency: 44KHz The .flac definitely has tag information. I can verify this by opening up EasyTAG. EasyTAG refers to this as 'FLAC Vorbis Tag' but 'ID3 Tag' for the .mp3. Is this the problem?
boehj (2660 rep)
Mar 27, 2011, 11:39 AM • Last activity: Nov 12, 2022, 08:58 PM
1 votes
1 answers
1015 views
FLAC encoders – any difference in output between the command-line tools?
I would like to know if there is any difference in the final output between the various command-line tools for encoding FLAC files, like `ffmpeg`, `sox`, the “official” `flac` etc. In some contexts, I have noticed that it's recommended to use `flac` over the others, but given that FLAC represents lo...
I would like to know if there is any difference in the final output between the various command-line tools for encoding FLAC files, like ffmpeg, sox, the “official” flac etc. In some contexts, I have noticed that it's recommended to use flac over the others, but given that FLAC represents lossless encoding, am I correct in assuming that they should all produce identical output (given the same options)?
fnix (63 rep)
Jun 12, 2022, 08:01 PM • Last activity: Jun 13, 2022, 08:55 AM
5 votes
3 answers
4450 views
FLAC correctness using MD5 placed in STREAMINFO
I know from [Sources], that FLAC computes CRC and MD5. What I am afraid that `flac --test` only does CRC test - as stated in `man flac` : `same as -d except no decoded file is written` . How to check flac file correctness, using MD5 of raw PCM placed in STREAMINFO in given .flac file ? If `flac --te...
I know from [Sources], that FLAC computes CRC and MD5. What I am afraid that flac --test only does CRC test - as stated in man flac : same as -d except no decoded file is written . How to check flac file correctness, using MD5 of raw PCM placed in STREAMINFO in given .flac file ? If flac --test makes job, are there any reliable (like in flac documentation) references that shows it? Sources: http://en.wikipedia.org/wiki/Free_Lossless_Audio_Codec we can find: > FLAC uses CRC checksums for identifying corrupted frames when used in a streaming protocol, and also has a complete MD5 hash of the raw PCM audio stored in its STREAMINFO metadata header. http://flac.sourceforge.net/comparison.html > By default when processing files, flac computes the MD5 sum while encoding and decoding. To see md5sums in STEAMINFO we can use: $ metaflac --show-md5sum *.flac
Grzegorz Wierzowiecki (14740 rep)
Oct 3, 2011, 02:47 PM • Last activity: Feb 12, 2022, 05:29 AM
0 votes
1 answers
300 views
Music player with seek function from command line
Popular Linux music players (Audacious, cmus...) don't have a seek function that can be invoked from command line. Is there any player with such a function to play FLAC format from a start time to an end time? It should allow something like `$ player --from 1:00 --to 2:00 sample.flac` so `sample.fla...
Popular Linux music players (Audacious, cmus...) don't have a seek function that can be invoked from command line. Is there any player with such a function to play FLAC format from a start time to an end time? It should allow something like $ player --from 1:00 --to 2:00 sample.flac so sample.flac plays from time 1:00 to 2:00.
nightcod3r (972 rep)
Jan 28, 2022, 12:47 PM • Last activity: Jan 28, 2022, 09:41 PM
0 votes
1 answers
75 views
Unable to Compress MP3 with Flac
I am trying to use FLAC to compress an mp3 file like below: ```bash flac -8 1-5f15c799beb953837480f0e29d872eb9.mp3 ``` However, I keep getting the error ```ERROR: input file 1-5f15c799beb953837480f0e29d872eb9.mp3 has an ID3v2 tag```. I have read through numerous stack exchange answers such as [this]...
I am trying to use FLAC to compress an mp3 file like below:
flac -8 1-5f15c799beb953837480f0e29d872eb9.mp3
However, I keep getting the error
: input file 1-5f15c799beb953837480f0e29d872eb9.mp3 has an ID3v2 tag
. I have read through numerous stack exchange answers such as this , this , or this . One of the answers suggested using ffmpeg but I received an error regarding something with tags. I then tried using eyeD3 but when I installed it with pip3 install, I wasn't able to run the binary file. The most promising approach was using ip3v2. I did
apt-get install ip3v2
and then ran
-s 1-5f15c799beb953837480f0e29d872eb9.mp3
which gave the ouptut
Stripping id3 tag in "1-5f15c799beb953837480f0e29d872eb9.mp3"...id3v1 stripped.
When I tried running the flac command again, it failed again saying that ID3v2 tags were still present. Does anyone have any ideas on where I can strip these ID3v2 tags?
Polydynamical (101 rep)
Nov 9, 2021, 12:41 AM • Last activity: Nov 9, 2021, 12:43 AM
Showing page 1 of 20 total questions