Wav to flac linux

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 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 

linux.com/learn/… is quite old but give you a lot of different possibilities : FUSE based GUI based Batch based

Источник

How do I convert WAV to FLAC and FLAC to OGG?

How do I convert a Waveform Audio File («.wav») to the Free Lossless Audio Codec («.flac»)? In addition, how do I convert Free Lossless Audio Codec («.flac») files to Ogg Vorbis («.ogg») files, for use on mobile devices? The requirement to convert WAV files to the FLAC is only for a single file and I don’t anticipate that I will need to do this again anytime soon (I honestly don’t even remember the last time I used a WAV file!), but the requirement to convert FLAC files to OGG will be an ongoing requirement (usually for a folder-at-a-time), as I rip my CDs into the FLAC for playback on «powerful» devices with «decent» speakers/audio output (the Sony PlayStation 3, the computer, etc. ) and use OGG exclusively on my mobile devices (my smartphone, my tablet, etc. ). I am semi-competent with Terminal and am not «scared» to use it as some people understandably are (in fact for many things, I prefer it). But with regards to this particular task, I would prefer to use something with a graphical interface where possible.

3 Answers 3

ffmpeg -i FILE.wav FILE.flac 
for i in *.wav; do ffmpeg -i "$i" "$i".ogg ; done 

Thanks for this. But I think the batch mode bit results in file names looking like whateverthesongname.wav.ogg ; so with a double extension. Something like the following would work to get just a .ogg file name: for i in *.wav; do ffmpeg -i «$i» «$(basename «$i» .wav)».ogg ; done . Picked up from here.

Читайте также:  Linux add command to autostart

Источник

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 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.

Does the flac —keep-foreign-metadata option do what you need? If not, please could you describe the «custom tags», and what you want to happen to them, in more detail?

So, it doesn’t recognize the kind of tags used in your WAV files. To find a tool that does, we’ll need to know more about those tags: Can you include a hexdump of the part of the file containing them? Do you know what tool created them? What software are you using that does recognize them?

Every software I use recognizes at least some of the tags. Those tags aren’t some ‘special’ metadata, I call them ‘custom’ because these tags have custom names, not just ‘ARTIST’ and ‘TITLE’. 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.

Источник

compizomania

SoundConverter — компьютерная программа для конвертирования аудиоформатов в операционной системе Linux. Кроме того, программа имеет функцию извлечения аудиодорожек из видеофайлов. Для чтения и конвертирования файлов используется мультимедийный фреймворк GStreamer и другие кодеки.
Программа оснащена быстрым и мощным движком, способным обрабатывать большое количество файлов в многопоточном режиме, за рекордно короткие сроки, используя все доступные ядра процессора. А также, имеется функция автоматизированного переименования файлов и создания папок.

Аудиоформаты — WAV, WavPack, FLAC, APE, ALAC, M4A, Shorten (англ.) (SHN), MPC, MP3, Ogg Vorbis, AAC, DTS, AC3.
форматы трекерной музыки — MOD, XM, S3M, SID и другие.
Видеоформаты — AVI, MPEG, MOV.

MP3, Ogg Vorbis, AAC, WAV и FLAC.

Работа с программой и ее управление сведено до максимальной простоты. Для начала, нужно добавить файлы на вашем компьютере, нажав на кнопку Добавить файл или Добавить папку (если вы хотите конвертировать большое количество файлов), затем переходите в Параметры, выставляете все что нужно: папку для сохранения; формат; качество и пр., а затем в основном окне Преобразовать.

Читайте также:  Linux operating system and mac

Как видно на снимке файл mp3 объёмом 53,5 МБ на моём компьютере был сконвертирован в формат wav за пять секунд:

Установка Sound Converter в Ubuntu и производные

Вы можете установить Sound Converter в Ubuntu и производные прямо из Центра приложений:

Либо выполнить в терминале следующую команду:

sudo apt install soundconverter

По окончании установки вы найдёте Sound Converter в системном меню, как Аудиоконвертер:

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

A series of linux shell scripts for converting audio formats

License

delinuxco/AudioConversionScripts

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

A series of linux shell scripts for converting audio formats in batch process, example .wav to .flac or .m4a to .mp3 and .flac to .wav etc.

Reasons for scripts These were orignally created for batch processing of multiple audio files with a one simple command. Just navigate to the directory where the audio files are and run the appropriate command.

If you have a PLEX server and you can’t get the server to find your .flac files even though they are there, the flac to flac scripts will usually cure most of these issues.

You can also extract audio directly from webm and mp4 video formats.

Clone repo, or download zip file and unzip. From terminal, cd to directory AudioConversionScripts and run the command:

This will copy the folder «acs» to your local/bin directory.

Next,the scripts need to be made executable by running these two commands:

chmod +x ~/.local/bin/acs/*
chmod +x ~/.local/bin/acs/.acs

Edit your ~/.profile and ~/.bash_profile and add the following at the end of the file:

Logout of your session and log back in and verify the scripts are in your path:

The scripts by default are set to use 2 threads, you can change this by editing the script directly and changing the FFMPEG flag «-threads 2» what ever number of threads you want. But for those of you with many threads, you are limited by your IO, so too many threads can actually hurt performance.

Читайте также:  Opera gx linux manjaro

You can edit any script with a text editor, either graphical or gui, example using the command line with the nano editor.

Because the scripts are in a folder that is in your PATH, executing the scripts is easy. First to see all of the current format combinations, open a terminal and type:

Be sure to include the period at the beginning. You should see a list like this

  • flac-flac-43
  • flac-flac-44
  • flac-flac-48
  • flac-m4a-44
  • flac-m4a-48
  • flac-ogg-44
  • flac-wav-44
  • flac-wav-48
  • m4a-flac-43
  • m4a-flac-44
  • m4a-flac-48
  • m4a-mp3-44
  • mp3-m4a-44
  • mp3-m4a-48
  • mp3-ogg-43
  • mp3-ogg-44
  • mp3-ogg-48
  • mp4-flac-43
  • mp4-flac-44
  • mp4-flac-48
  • ogg-m4a-44
  • ogg-m4a-48
  • wav-flac-43
  • wav-flac-44
  • wav-flac-48
  • wav-m4a-44
  • wav-m4a-48
  • wav-mp3-44
  • webm-flac-43
  • webm-flac-44
  • webm-flac-48

The script name says what it does, for example «wav-flac-48» means that the script will convert files with a .wav extentions to .flac with a sample rate of 48000. Make a copy of a directory with audio files with an extention of either flac, m4a or mp3 etc. Open a terminal in that directory and if your files are .flac, and you want to convert them to .wav, simply type: flac-wav-48 and the script will convert all files in the current directory to .wav files.

The numbers at the end of the file name represent sample rates:

To encode files in .m4a, ffmpeg will need to have libfdk_aac enabled/compiled.

NOTE: The existing files will be deleted, so ALWAYS work with copies of original files.

Creating your own custom scripts

If you have other formats that you would like to convert, you can easily use any of of the existing scripts as a template. The only thing that need to be changed is the iext & oext extensions and the FFMPEG settings line if applicable. Save the file under a new name in the acs folder and make the new script executable. Do not add the .sh extention to the new script.

acs_example

When editing the FFMPEG flags (the green box in the above image), it is imparitive that the spaces before and after are there (red arrows) or the script will fail. You can add as many flags in the green box as necessary.

To batch process multiple directories, a separate script will execute the necessary script per directory. simply edit the bulkbatch file in ~/.local/bin/acs with your favorite editor. Edit/add the directories in the the section ***User Section ***. Please note that you may encounter errors in transcoding which causes the script to stop. As always, never work with origianl files, ALWAYS copies!

To use the script, once edited to your liking, simply run bulkbatch from the terminal, does not matter the location where the script is executed.

About

A series of linux shell scripts for converting audio formats

Источник

Оцените статью
Adblock
detector