LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-16-2008, 07:47 AM   #1
dotancohen
Member
 
Registered: Dec 2004
Location: Haifa
Distribution: Fedora Core 4, Kubuntu
Posts: 235

Rep: Reputation: 32
Playing (not converting) amr files on Linux


I have a few tens of .amr sound files produced on Nokia 6280's and 6288's that I need to hear on my laptop. Here is an example of such a file (my daughter laughing):
http://dotancohen.com/images/example...v_laughing.amr

I have tried to play with VLC 0.8.6 and mplayer 1.0RC1 on Ubuntu 7.04, but neither of them play the files for me. I did find a program that converts the files to mp3, the Mobile Media Converter (http://www.miksoft.net/mobileMediaConverter.htm), however, I'd like to actually play the files rather than convert them. Google makes me think that Quicktime for Windows might play them but I've no windows box and anyway, I'd like to avoid wine if there is a Linux solution out there.

I do see that it is possible to compile mplayer to play the files if compiled with these options: "--enable-amr_nb --enable-amr_nb-fixed --enable-amr_wb" (found on linuxquestion.org). Are those the only options that I will need? How can I find what options are recommended for Ubuntu installations? I tried searching the mplayer website, but found nothing.
 
Old 01-16-2008, 08:29 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946
Your file plays for me with ffmpeg/ffplay. I'm using the package offered by debianmultimedia.org and it shows --enable-libamr-nb and --enable-libamr-wb among the set flags. I don't know what comparable sources are available for *buntu, but I'd be surprised if one wasn't available somewhere. And when I play it in mplayer the output shows that it's calling up the same ffmpeg/libavcodec as the audio decoder.

So I'd say yes, all you need to do is compile mplayer and/or ffmpeg with the listed libamr flags, or find a package source that already has them compiled, and you should be set to go.

Last edited by David the H.; 01-16-2008 at 08:32 AM.
 
Old 01-17-2008, 02:24 PM   #3
dotancohen
Member
 
Registered: Dec 2004
Location: Haifa
Distribution: Fedora Core 4, Kubuntu
Posts: 235

Original Poster
Rep: Reputation: 32
Thanks, David. How does one go about searching for an mplayer deb that was built with the proper flags? I looked at mplayer from debian-multimedia.org (not debianmultimedia.org, which is a parked page) and I don't see what it was built with.

Can I configure Ubuntu to use the debian-multimedia.org repo? Or is that not recommended? Should I just add "deb http://www.debian-multimedia.org stable main" to sources.list?
 
Old 01-17-2008, 11:35 PM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946
Sorry, my mistake typing the url.

I don't know how to discover the enabled libraries in mplayer, but ffmpeg shows a list of its compiled flags whenever you run it. I think that you don't need to compile mplayer specifically with support as long as ffmpeg/libavcodec has it, since mplayer can use it as a decoder.

You can probably use the debian-multimedia sources in *buntu, since it's based of Debian (sid, I believe), but I don't know how well it will work. Most programs will run, I believe, but there may be differences between the two distros that can cause problems.

I was hoping someone else would pop up here and recommend a repository for *buntu that has the same kind of build.
 
Old 01-22-2008, 04:15 PM   #5
dotancohen
Member
 
Registered: Dec 2004
Location: Haifa
Distribution: Fedora Core 4, Kubuntu
Posts: 235

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by David the H. View Post
I was hoping someone else would pop up here and recommend a repository for *buntu that has the same kind of build.
I was also hoping for that! I don't want to enable a repo for another distro, lest I get myself into the dependency hell that was that hallmark of Fedora's Livna/Dag repos.
 
Old 02-21-2008, 05:33 PM   #6
andrew.46
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 643

Rep: Reputation: 90
Hi,

There is a solution and yes mplayer will play these files:


Quote:
Originally Posted by dotancohen View Post
I have a few tens of .amr sound files produced on Nokia 6280's and 6288's that I need to hear on my laptop. Here is an example of such a file (my daughter laughing):
http://dotancohen.com/images/example...v_laughing.amr
I took the liberty of downloading this file and playing it as follows:

Code:
andrew@ilium~/Desktop$ mplayer meirav_laughing.amr 
MPlayer dev-SVN-r26046-4.1.2 (C) 2000-2008 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (Family: 15, Model: 2, Stepping: 9)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

Playing meirav_laughing.amr.
libavformat file format detected.
[lavf] Audio stream found, -aid 0
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 8000 Hz, 1 ch, s16le, 0.0 kbit/0.00% (ratio: 0->16000)
Selected audio codec: [ffamrnb] afm: ffmpeg (AMR Narrowband)
==========================================================================
AO: [oss] 8000Hz 1ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:  82.5 (01:22.5) of 0.0 (unknown)  0.3% 

Exiting... (End of file)
So as you see it can be done quite easily with mplayer. BTW I have a grand-daughter who sounds just like that: it is a beautiful and very special time.

Quote:
I do see that it is possible to compile mplayer to play the files if compiled with these options: "--enable-amr_nb --enable-amr_nb-fixed --enable-amr_wb" (found on linuxquestion.org). Are those the only options that I will need? How can I find what options are recommended for Ubuntu installations? I tried searching the mplayer website, but found nothing.
You do not have to specify any options for mplayer, simply install the required libraries and the configure script will pick it up for you. The files are found here:

http://www.penguin.cz/~utx/amr

and mplayer documentation references them here:

http://www.mplayerhq.hu/DOCS/HTML/en/audio-codecs.html

Can I suggest as well that you would be better to use the svn mplayer? I believe you use Ubuntu, if so you could use a walkthrough I have written at:

http://ubuntuforums.org/showthread.php?t=558538

For which I have added an amr section specifically to address your needs:

http://ubuntuforums.org/showpost.php...&postcount=195

Simply install the amr material first, install the svn mplayer and all will be well :-)

Andrew

Last edited by andrew.46; 02-21-2008 at 06:27 PM. Reason: Added URI to amr svn info
 
1 members found this post helpful.
Old 02-25-2008, 04:44 AM   #7
dotancohen
Member
 
Registered: Dec 2004
Location: Haifa
Distribution: Fedora Core 4, Kubuntu
Posts: 235

Original Poster
Rep: Reputation: 32
Thank you Andrew. The instructions that you posted on the Ubuntu forum were almost too easy to follow. And you explained _why_, not only _how_. Great job and I thank you.
 
Old 02-25-2008, 05:22 AM   #8
andrew.46
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 643

Rep: Reputation: 90
Hi again!

Quote:
Originally Posted by dotancohen View Post
Thank you Andrew. The instructions that you posted on the Ubuntu forum were almost too easy to follow. And you explained _why_, not only _how_. Great job and I thank you.
It is my pleasure :-)

Andrew
 
  


Reply

Tags
mplayer


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
converting a doc/ppt Windows files in html files under linux env agrosu Programming 7 02-23-2006 03:07 PM
playing amr format in mplayer mohtasham1983 Linux - Software 3 09-27-2005 08:40 AM
does the OSS driver in linux has support for the AMR format audio files stephenwalter Programming 1 07-14-2005 10:42 AM
Converting Shorten files using Linux haystacs Linux - Software 5 05-08-2003 11:47 AM
converting MS-DOS files to Linux dalraidia Linux - Newbie 10 12-25-2002 07:49 PM


All times are GMT -5. The time now is 03:22 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration