Updated: 2020-02 and again 2021-08

a simple:

apt update
apt install ffmpeg

BRINGS BACK ALL THE FFMPEG GLORY!

THANK YOU DEBIAN! 🙂

(and all involved)

so my script works again! 🙂

(can convert almost ANY format (aac, m4a you name it) to mp3!)

SO NICE!

shortcut: the fix for this seems to be to simply replace

https://stackoverflow.com/questions/9477115/what-are-the-differences-and-similarities-between-ffmpeg-libav-and-avconv

“This program (ffmpeg) is not developed anymore and is only provided for compatibility. Use avconv instead”

not true see here: http://blog.pkh.me/p/13-the-ffmpeg-libav-situation.html

instead of forking ffmpeg, libav developers wanted to take over and kill ffmpeg 😬

luckily ffmpeg is still alive and kickin’ 😀👍😎✌️ good job all involved! love it!

ffmpeg -i "$1" -acodec libmp3lame -ac 2 -q:a 2 "$1.mp3";
# avconv synonym for ffmpeg?
avconv -i "$1" -acodec libmp3lame -ac 2 -q:a 2 "$1.mp3";

see: https://dwaves.de/2016/07/05/linux-avconv-alternative-to-ffmpeg-encode-anything-aac-m4a-to-mp3/

another reason i hate updates… one CentOS based workstation i did not update for ages… and this script

# create the file
vim /scripts/mp3.sh
# fill with
#!/bin/bash
echo "$1";
ffmpeg -i "$1" -c:a libmp3lame -ac 2 -q:a 2 "$1.mp3";
# save and quit in vim
:wq
# mark runnable
chmod +x /scripts/mp3.sh
# let's convert some files :)
/scripts/mp3.sh file.m4a
... beep bop ...
# in the same folder one will find
file.mp3
# GOOOOOD JOB! :)

do not to forget to celebrate!

… also the small achievements! (this is a BIG one so double-celebrate!)

hostnamectl; # tested on
  Operating System: Debian GNU/Linux 10 (buster)
            Kernel: Linux 4.19.0-6-amd64
      Architecture: x86-64

still works fine on version:

ffmpeg -version
ffmpeg version 2.8.14 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-16)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil      54. 31.100 / 54. 31.100
libavcodec     56. 60.100 / 56. 60.100
libavformat    56. 40.101 / 56. 40.101
libavdevice    56.  4.100 / 56.  4.100
libavfilter     5. 40.101 /  5. 40.101
libavresample   2.  1.  0 /  2.  1.  0
libswscale      3.  1.101 /  3.  1.101
libswresample   1.  2.101 /  1.  2.101
libpostproc    53.  3.100 / 53.  3.100

and on the debian laptops, that i kept up to date it ain’t workin anymore… because a lot of arguments and options to the ffmpeg command have changed:

/scripts/mp3.sh Geschenk.aac 

ffmpeg version 0.8.17-6:0.8.17-2, Copyright (c) 2000-2014 the Libav developers
  built on Mar  2 2016 23:31:28 with gcc 4.7.2
The ffmpeg program is only provided for script compatibility and will be removed
in a future release. It has been deprecated in the Libav project to allow for
incompatible command line syntax improvements in its replacement called avconv
(see Changelog for details). Please use avconv instead.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Geschenk.aac':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6mp41
    creation_time   : 2018-10-29 12:41:32
  Duration: 00:07:48.34, start: 234.173243, bitrate: 63 kb/s
    Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16
    Metadata:
      creation_time   : 2018-10-29 12:41:32
Unrecognized option 'c:a'
Failed to set value 'libmp3lame' for option 'c:a'

vim /scripts/mp3.sh

ffmpeg version 0.8.17-6:0.8.17-2, Copyright (c) 2000-2014 the Libav developers
  built on Mar  2 2016 23:31:28 with gcc 4.7.2
The ffmpeg program is only provided for script compatibility and will be removed
in a future release. It has been deprecated in the Libav project to allow for
incompatible command line syntax improvements in its replacement called avconv
(see Changelog for details). Please use avconv instead.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Geschenk.aac':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6mp41
    creation_time   : 2018-10-29 12:41:32
  Duration: 00:07:48.34, start: 234.173243, bitrate: 63 kb/s
    Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16
    Metadata:
      creation_time   : 2018-10-29 12:41:32
Unrecognized option 'c:a'
Failed to set value 'libmp3lame' for option 'c:a'

/scripts/mp3.sh Geschenk.aac 
Geschenk.aac
ffmpeg version 0.8.17-6:0.8.17-2, Copyright (c) 2000-2014 the Libav developers
  built on Mar  2 2016 23:31:28 with gcc 4.7.2
The ffmpeg program is only provided for script compatibility and will be removed
in a future release. It has been deprecated in the Libav project to allow for
incompatible command line syntax improvements in its replacement called avconv
(see Changelog for details). Please use avconv instead.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Geschenk.aac':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6mp41
    creation_time   : 2018-10-29 12:41:32
  Duration: 00:07:48.34, start: 234.173243, bitrate: 63 kb/s
    Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16
    Metadata:
      creation_time   : 2018-10-29 12:41:32
Unrecognized option 'q:a'
Failed to set value '2' for option 'q:a'

ffmpeg -version
ffmpeg version 0.8.17-6:0.8.17-2, Copyright (c) 2000-2014 the Libav developers
  built on Mar  2 2016 23:31:28 with gcc 4.7.2
The ffmpeg program is only provided for script compatibility and will be removed
in a future release. It has been deprecated in the Libav project to allow for
incompatible command line syntax improvements in its replacement called avconv
(see Changelog for details). Please use avconv instead.
ffmpeg 0.8.17-6:0.8.17-2
libavutil    51. 22. 3 / 51. 22. 3
libavcodec   53. 35. 0 / 53. 35. 0
libavformat  53. 21. 1 / 53. 21. 1
libavdevice  53.  2. 0 / 53.  2. 0
libavfilter   2. 15. 0 /  2. 15. 0
libswscale    2.  1. 0 /  2.  1. 0
libpostproc  52.  0. 0 / 52.  0.100

let’s batch it

will convert all.wav files into all.wav.mp3 files in the current directory (modified version of src)

cat /scripts/mp3.sh

#!/bin/bash
for FILE in *.wav ; do
    ffmpeg -i "$FILE" -c:a libmp3lame -ac 2 -q:a 2 "$FILE.mp3";
done


liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin