Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 19071  / 2 Years ago, sat, november 12, 2022, 11:31:13

I have audio files with .aif extensions (AIFF/Amiga/Mac audio). How to play them and, more important: how to convert them to mp3 or other more common audio format?






update: trying to run a command found here, namely for i in *.aif; do sox "$i" "$i.wav"; done, and having sox already installed, i get an error like




sox FAIL formats: can't open input file 'filename': Unsupported AIFC
compression type `ima4'







exiftool provides info such as:



File Size                       : 41 MB
File Modification Date/Time : 2013:04:23 15:54:02+02:00
File Permissions : rw-r--r--
File Type : AIFC
MIME Type : audio/x-aiff
Format Version Time : 1990:05:23 14:40:00
Num Channels : 1
Num Sample Frames : 1257382
Sample Size : 0
Sample Rate : 16000
Compression Type : Unknown (ima4)





for some reason sudo apt-get install ffmpeg libavcodec-unstripped-52 would not work (Unable to locate package - but Multiverse is enabled)


More From » sound

 Answers
5

Finding this solution here (also recommended in comments), for some reason sudo apt-get install ffmpeg libavcodec-unstripped-52 would not work (Unable to locate package - but Multiverse is enabled).



But in Synaptic I have seen that I had libavcodec53 installed, but not libavcodec-extra-53. Installing the later has uninstalled the former, and then the command ffmpeg -i inputfile.aif -f mp3 -acodec libmp3lame -ab 192000 -ar 44100 outputfile.mp3 worked.



So,



~$ sudo apt-get install libavcodec-extra-53
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libavutil-extra-51 libdirac-encoder0 libopencore-amrnb0 libopencore-amrwb0
libopenjpeg2 libvo-aacenc0 libvo-amrwbenc0 libx264-123
The following packages will be REMOVED:
libavcodec53 libavutil51
The following NEW packages will be installed:
libavcodec-extra-53 libavutil-extra-51 libdirac-encoder0 libopencore-amrnb0
libopencore-amrwb0 libopenjpeg2 libvo-aacenc0 libvo-amrwbenc0 libx264-123
0 upgraded, 9 newly installed, 2 to remove and 0 not upgraded.
Need to get 7,656 kB of archives.


After this, other commands and actions are now working, including those to convert to mp3, like avconv -i %f %f.mp3. To see that in Terminal, I have added to Thunar custom actions: gnome-terminal --window-with-profile=new1 -e "avconv -i %f %f.mp3". (In Gnome Terminal, create a new profile called "new1" and edit it ('Edit/Profiles/Title and Command') to 'When command exits: Hold the Terminal open'.)



Even after this, the aif files cannot be played by Totem, Parole, Xine, DeaDBeeF, Banshee or VLC; even in Audacity the sound is badly distorted, just like in Audacious. But mplayer (SMPlayer, Gnome Player, Mplayer) can play them just fine.


[#31559] Monday, November 14, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
inglehare

Total Points: 330
Total Questions: 111
Total Answers: 95

Location: Sint Maarten
Member since Tue, Mar 29, 2022
2 Years ago
;