LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-17-2004, 08:21 PM   #1
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 457

Rep: Reputation: 41
file magic for m4a (mp4) ??


I have some audio files I acquired that are in m4a format, which I understand is the same as mp4. I can play or convert these with mplayer, and it provides the following information on them:

Playing audio.m4a
MOV: File-Type unknown Major-Brand: M4A
QuickTime/MOV file format detected.
--------------
MOV track #0: 305 chunks, 6405 samples
Audio bits: 16 chans: 2 rate: 44100
MOV: Found MPEG4 audio Elementary Stream Descriptor atom (51)!
Fourcc: mp4a

Most of my audio files are mp3 or ogg ... I use a script that parses the outfile of "file <audiofile>" to decide whether to use ogg123 or mpg321 for playback. Unfortunately, the output of "file audio.m4a" is "audio.m4a: data", rather unilluminating and I'ld rather not feed something that may destroy my soundcard, speakers (not to mention ears) through mplayer. While I can (and do) use the extension for identification, I prefer the more elegant solution of a file type identifier like the command "file". Anyone have a file command that works on these files, or have any suggestions besides my current hack.

Chris
 
Old 01-23-2004, 08:21 AM   #2
ascheepe
LQ Newbie
 
Registered: Jan 2004
Distribution: debian
Posts: 2

Rep: Reputation: 0
Sure, I like to (mis)use the file command for such things also.
For the time being you can edit /etc/magic, that's the file 'file' uses for personal settings, for the format see 'man magic' or the database located in /usr/share/misc/file/magic.* it's pretty straightforward.
(and you can do several neat things with it like parsing the bitrate and such, see the database for examples)
 
  


Reply


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
Can linux play M4a/mp4? love_academy Linux - Newbie 7 12-17-2008 08:20 AM
Anyone know how to rip CD's to Tagged m4a, AAC, mp4 files? carl0ski Linux - Software 2 04-17-2005 04:41 PM
trouble compiling xmms mp4 plugin from source: "no such file.." mayasedai Linux - Software 3 02-01-2005 11:13 AM
mp4 and k3b mikedeatworld Linux - Software 5 08-14-2004 09:17 PM
cannot login because file system check fails because of bad magic number trutnev Linux - Newbie 1 03-23-2004 06:44 PM


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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration