Stopping AAC(.m4a) from showing as text in a browser

Forum for hijacking, general discussion, chatting and off-topic posting
Post Reply
atariboy
Forum Guru
Posts: 201
Joined: 03 Dec 2002, 09:08
Location: Melbourne, Australia
Contact:

Stopping AAC(.m4a) from showing as text in a browser

Post by atariboy » 14 Mar 2004, 11:01

AKA How to make AAC/m4a stream in safari
AKA make AAC work like mp3
and so on :)

To get this to work, you need access to upload files to a web server (duh!)

Put a .htaccess in the root or folder(directory) where your music is stored with these 2 lines:
AddType audio/x-m4a .m4a
AddType audio/x-mp4 .mp4

If there already is a .htaccess file, just add those 2 lines.

Note the . at the beginning of the file name.

If you are on OS X and make a file starting with a . it will be hidden from view (under default settings). i suggest calling it htaccess on your hard drive, upload it to your server then rename it via your FTP application.

Magic! AAC (.m4a) files now act like mp3s. .mp4 files are now saved to the hardrive but beats it loading as text into your safari window :)

I know many people are having problems with this so I hope this helps.
Last edited by atariboy on 23 Mar 2004, 16:25, edited 1 time in total.
music, blog, stuff: http://atariboy.com software: http://plasq.com
1.63g PB, Athlon PC, 20" iMac, MPC1000, AN1x, xStation, SK-1! + software 8)
UI Design: Rax, Wormhole2, Bidule, musolomo, 'plasq' iDrum, Zebra & Comic Life

Jason Hyerstay
Forum Guru
Posts: 1673
Joined: 05 Mar 2003, 01:43
Location: Vermont

Post by Jason Hyerstay » 14 Mar 2004, 13:48

I did a bit of research after we talked about this. m4p is what Apple uses for it's iTunes Store (DRM) AAC files. m4a is for user-created (non-DRM) AAC files. And of course mp4 is for video. Functionally, AAC files will play with any of those extensions, but it is still worth it to name them correctly.

Cheers
Last edited by Jason Hyerstay on 14 Mar 2004, 14:18, edited 1 time in total.

Jason Hyerstay
Forum Guru
Posts: 1673
Joined: 05 Mar 2003, 01:43
Location: Vermont

Post by Jason Hyerstay » 14 Mar 2004, 13:55

You can also use More Internet to manage these file/application connections.

http://www.macupdate.com/info.php/id/12849

atariboy
Forum Guru
Posts: 201
Joined: 03 Dec 2002, 09:08
Location: Melbourne, Australia
Contact:

Post by atariboy » 14 Mar 2004, 14:00

iTunes calls its encoded AAC files .m4a
QuickTime Pro exported AAC calls them .mp4.

Safari treats them differently too :roll:

DRM AAC files have the .m4p extension

Great link. thanks hyerstay! It's weird that this functionality is missing from OS X now.
music, blog, stuff: http://atariboy.com software: http://plasq.com
1.63g PB, Athlon PC, 20" iMac, MPC1000, AN1x, xStation, SK-1! + software 8)
UI Design: Rax, Wormhole2, Bidule, musolomo, 'plasq' iDrum, Zebra & Comic Life

Jason Hyerstay
Forum Guru
Posts: 1673
Joined: 05 Mar 2003, 01:43
Location: Vermont

Post by Jason Hyerstay » 14 Mar 2004, 14:16

I give up. Let me go see if I can find the info again.

I just edited my post to make it look like I got it right the first time. Don't tell!

atariboy
Forum Guru
Posts: 201
Joined: 03 Dec 2002, 09:08
Location: Melbourne, Australia
Contact:

Post by atariboy » 14 Mar 2004, 14:54

*giggle*
music, blog, stuff: http://atariboy.com software: http://plasq.com
1.63g PB, Athlon PC, 20" iMac, MPC1000, AN1x, xStation, SK-1! + software 8)
UI Design: Rax, Wormhole2, Bidule, musolomo, 'plasq' iDrum, Zebra & Comic Life

Progressivebreaks
Site Supporter
Posts: 33
Joined: 06 Jan 2003, 08:59
Location: UK
Contact:

Post by Progressivebreaks » 22 Mar 2004, 16:09

Interesting that this problem still exists even in the latest version of Safari.
I was working around it by making a html file every time:

<html>
<a href="youraac.m4a>here</a>
</html>

and contextual clicking to download it.
Wierd huh?


PB
__________________
www.sunscape.org.uk

Sighmansea
Posts: 123
Joined: 21 Jan 2003, 15:49
Location: London, England
Contact:

Post by Sighmansea » 22 Mar 2004, 16:14

Getting AAC files to stream in Safari is only solving 2% of the problem. What about the 98% of people using other browsers?

Si.
PowerMac G5 Dual 2GHz, 2GB RAM, MOTU 828 MKII, Line6 Pod Pro, OSX 10.4.1, Logic Pro 7.1
Current iTMS Recommendation (Updated 21st May)

atariboy
Forum Guru
Posts: 201
Joined: 03 Dec 2002, 09:08
Location: Melbourne, Australia
Contact:

Post by atariboy » 22 Mar 2004, 16:33

Sighmansea wrote:Getting AAC files to stream in Safari is only solving 2% of the problem. What about the 98% of people using other browsers?
That's a whole other story though Sig.

Different browsers treat files differently. Generally though, if the use has Quicktime installed, it should work - even on PC.

This fix is not just about getting AAC to stream in Safari though. It is something that helps all browsers know that those file types are an audio file. It is then up to how the user has set up their browser or what that users browser allows(or its default settings). That is completely out of our hands in this case.

The main reason of doing this though, is NOT streaming even but actually stopping the browser from loading it as a page full of text garbage. This fixes that.

Eventually all web-servers will be updated to know these files *hopefully*. Until then, we have to do it ourselves.
music, blog, stuff: http://atariboy.com software: http://plasq.com
1.63g PB, Athlon PC, 20" iMac, MPC1000, AN1x, xStation, SK-1! + software 8)
UI Design: Rax, Wormhole2, Bidule, musolomo, 'plasq' iDrum, Zebra & Comic Life

Jason Hyerstay
Forum Guru
Posts: 1673
Joined: 05 Mar 2003, 01:43
Location: Vermont

Post by Jason Hyerstay » 22 Mar 2004, 17:37

Well, we all need to get used to the format:

http://www.highfidelityreview.com/news/ ... r=13634395

Progressivebreaks
Site Supporter
Posts: 33
Joined: 06 Jan 2003, 08:59
Location: UK
Contact:

Post by Progressivebreaks » 05 Apr 2004, 07:02

This issue occurs with .sitx files too.


PB
__________________
www.sunscape.org.uk

djfreak
Site Supporter
Posts: 283
Joined: 30 Jan 2003, 14:24
Location: San Francisco, CA

Book

Post by djfreak » 05 Apr 2004, 08:53

I just spent about a gazillion hours dealing with this issue.

I highly recommend a book called "QuickTime for the Web" which goes for about $60 and is more than worth it.

Or you can steal my code by going to http://www.beathustler.com/radio.html and use any of the code from the drop down htm's that are triggered on that page. Be sure and take the javascript code that's the most important part. The War between Quicktime and microsoft has made browswer based javascripting of multi-media files in Quicktime (like mp4 files) a NIGHTMARE. But it is possible.

The unfortunate part is that 20-30 people come to my radio page every day but only about 5-10% seem to have quicktime. The rest are too lazy or are unwilling to install it so my idea of having a QuickTime only site is going to have to be revised.

If you don't want to buy the book then go to google and search for QuickTime javascript browswer detect and implement that javascript code.

Sorry that's the only way I know how to do it.

Evan

Post Reply