When I upload .m4a (enhanced podcast files created in Garageband) using the audio module, it uploads the files and creates a link to them with a file.quicktime extension. This is similar to when an mp3 is uploaded using the audio module (i.e. link created is file.mp3), however when you subscribe to the feed through iTunes it will not display any of the AAC files added, typically iTunes gives an error that says it is a file type that is not recognized.

I can upload the same podcasts through the Blog module as an attachment and send the feed through iTunes and it works fine. I've attached the relevant portions of the RSS feed to demonstrate the difference. Would there be a way to add file.m4a at the end of those type of audio files (realizing they couldn't be played with the flash player) instead of file.quicktime?

Here's the RSS feeds:
From Blog - works in iTunes

<item>
<title>test - Lost Dutchman</title>
<link>http://core.gilbert.k12.az.us/coreweb/core/2006/05/04/test_lost_dutchman
</link>
<description><p>test</p>
</description>
<comments>http://core.gilbert.k12.az.us/coreweb/core/2006/05/04/test_lost_dutchman#comment</comments>
<enclosure url="http://core.gilbert.k12.az.us/coreweb/files/LostDutchman.m4a" length="4548770" type="audio/x-m4a"/>
<pubDate>Thu, 04 May 2006 10:51:16 -0700</pubDate>
<dc:creator>core</dc:creator>
<guid isPermaLink="false">280 at http://core.gilbert.k12.az.us/coreweb</guid>
</item>

Audio Module RSS Feed (taken from a taxonomy feed of just audio files):

<item>
<title>Maggie  Freitag - TCRP-Riparian Preserve</title>
<link>
http://core.gilbert.k12.az.us/coreweb/podcasts/traveling_classroom_podcast/276
</link>
<description>
<span class="audio"><a href="http://core.gilbert.k12.az.us/coreweb/audio/play/276">Click to play</a></span>
 2:18 minutes (1.89 MB)
</description>
<comments>
http://core.gilbert.k12.az.us/coreweb/podcasts/traveling_classroom_podcast/276#comment
</comments>
<enclosure url="http://core.gilbert.k12.az.us/coreweb/audio/download/276/file.quicktime" length="1981570" type="audio/x-m4a"/>
<itunes:duration>2:18</itunes:duration>
<itunes:author>Maggie  Freitag</itunes:author>
<category domain="http://core.gilbert.k12.az.us/coreweb/traveling_classroom_podcast_0">Traveling Classroom Podcast</category>
<pubDate>Thu, 04 May 2006 10:34:17 -0700</pubDate>
<dc:creator>core</dc:creator>
<guid isPermaLink="false">276 at http://core.gilbert.k12.az.us/coreweb</guid>
</item>

I guess my other question is that are there any other benefits (other than being considered an "audio" node and wanting to keep those together) to submitting those AAC files as an audio node (since the flash player cannot play them)?

Comments

drewish’s picture

Status: Active » Closed (duplicate)

the file extension is based off of the mime type. at some point the browser/webserver has determined that the file is a quicktime file, not an m4a and the extension is generated accordingly. that actually done because itunes won't download the file unless the url ends with a supported file extension.

it's really part of the other bug (http://drupal.org/node/61899) you posted, so i'm going to mark this as a duplicate.

Anonymous’s picture

actually.. it's not the browser or apache that determines mime type.. it's php.. there's a call to a php mime magic function (assuming that the mime magic module is enabled). I was having this same problem until I recompiled php and enabled mime magic. Now the audio module can identify the correct mime type and behave properly.

drewish’s picture

brianlc, there's no call to mime_magic during a standard upload, only when importing with audio_import.

jamiemcparland’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev
Status: Closed (duplicate) » Active

Actually we're having this exact same problem with Drupal 5. Except we can't play the files in the browser either. The audio module shows this information

Format: QUICKTIME 0kHz 0Kbps ()

When you click to play it in Safari it just downloads a bunk file. If you click
Download audio file
Then it downloads to your desktop and works fine. I've never posted here before so i hope i did this right.

jasonpvp’s picture

I have a similar problem uploading m4a files using Firefox on Mac OS 10.4 and Drupal 5
Doing a packet trace I see that Firefox on OS X reports the mime type as audio/quicktime where as Firefox on Windows XP reports it as audio/x-m4a (which is what it needs to be for play back to work correctly through Drupal)

I was able to correct this by installing the mime edit plugin into Firefox on OS X and changing the mime type for m4a files, but this is not a preferable solution since we have 1000 Macs throughout the school district.

Apache seems to handle the file fine. If I browse to the URL of the m4a file directly after uploading it (even when Firefox reports the mime type as audio/quicktime on upload) it plays as it should.

If I go to it through Drupal Firefox just wants to save the file.

If I edit the entry in the audio_file table of the Drupal database to make filemime='audio/x-m4a' then Drupal handles it fine.

While I think the error originates with Firefox in OS X, I don't understand why Drupal has to depend on the mime type reported by the client browser when Apache already knows mime types based on file extension. Does Drupal have it's own place to set mime types for file extensions regardless of what the client reports?

(side note: Firefox on my co-workers OS 10.4 machine reports the mime type correctly even though we have the same version of Firefox and OS X and he doesn't have Mime Edit installed - that really confuses me)

darclex’s picture

If I edit the entry in the audio_file table of the Drupal database to make filemime='audio/x-m4a' then Drupal handles it fine.

filemime='audio/x-m4a'

does the mean that where the sql field is filemime, we should actually edit the field to filemime='audio/x-m4a' or do we edit somewhere else?