Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Extension changed mp3->mpeg

0 views
Skip to first unread message

Oskar

unread,
Jun 23, 2005, 7:27:48 AM6/23/05
to
I "Save target [mp3-file] as..." and Opera saves the file with an mpeg
extension. Why? Who changes the extension?

Helpful comments would be greatly appreciated.

Oskar von dem Hagen

Details:
On the page
http://www.musikschule.bremen.de/aktuell.html
there is a link "Jede Woche neu!":
<a href="http://www.ag-lemke.de/snd/quodlibet.mp3">Jede Woche neu!</a>

If I "Save target as...", it saves "quodlibet.mpeg"

I was told, the file quodlibet.mp3 is a music file of 22MB size. If a
friend does this (different OS, different browser) he has quodlibet.mp3
on his harddisk.

I am using W2K and Opera 8 (Build 7561)

Antonio Remedios

unread,
Jun 23, 2005, 9:25:16 AM6/23/05
to

Get .mp3 here with WXP and 8.01 b7642 - try upgrading?

--
Ant :)

Lee Harvey

unread,
Jun 23, 2005, 5:02:35 PM6/23/05
to

I got the same result as Antonio: no file extension change using 8.01 on
WinXP SP2.

Do you have any media center library software that constantly runs/scans
your local drives for media files? If so, you might wanna check there
too...


Antonio Remedios

unread,
Jun 23, 2005, 5:34:25 PM6/23/05
to
On Thu, 23 Jun 2005 22:02:35 +0100, Lee Harvey <leeh...@grassyknoll.com>
wrote:

If you do find that that's the cause, you should give it a darned good
slapping too, cos it's definitely an mp3 :)

--
Ant :)

Andrew Gregory

unread,
Jun 23, 2005, 10:36:37 PM6/23/05
to
On Thu, 23 Jun 2005 19:27:48 +0800, Oskar <gar...@vondemhagen.de> wrote:

> <a href="http://www.ag-lemke.de/snd/quodlibet.mp3">Jede Woche neu!</a>
>
> If I "Save target as...", it saves "quodlibet.mpeg"

The file is being served as type "audio/x-mpeg".

Go to Tools > Preferences > Advanced > Downloads. Untick the "hide"
checkbox. Enter "mpeg" into the search field. For "audio/x-mpeg", "mpeg"
is the first listed extension, but "mp3" isn't listed. Just add "mp3" to
the list of extensions.

HTH,
--
Andrew Gregory
<URL: http://www.scss.com.au/family/andrew/ >

Oskar

unread,
Jun 23, 2005, 11:00:10 PM6/23/05
to
Andrew Gregory wrote:
> The file is being served as type "audio/x-mpeg".
>
> Go to Tools > Preferences > Advanced > Downloads. Untick the "hide"
> checkbox. Enter "mpeg" into the search field. For "audio/x-mpeg", "mpeg"
> is the first listed extension, but "mp3" isn't listed.

Right. This I noticed. But the question remains: why is it classified
as "audio/x-mpeg" when the file extension "mp3" 'belongs'(?) to
"audio/mpeg"?


> Just add "mp3" to the list of extensions.

Thanks. This works - now opera saves the file as mp3. But why don't
other people in this thread have the same problem?

Oskar von dem Hagen

Steven V. Gunhouse

unread,
Jun 23, 2005, 11:51:42 PM6/23/05
to
On Thu, 23 Jun 2005 23:00:10 -0400, Oskar <gar...@vondemhagen.de> wrote:

> Andrew Gregory wrote:
>> The file is being served as type "audio/x-mpeg".
>>
>> Go to Tools > Preferences > Advanced > Downloads. Untick the "hide"
>> checkbox. Enter "mpeg" into the search field. For "audio/x-mpeg", "mpeg"
>> is the first listed extension, but "mp3" isn't listed.
>
> Right. This I noticed. But the question remains: why is it classified
> as "audio/x-mpeg" when the file extension "mp3" 'belongs'(?) to
> "audio/mpeg"?

You're asking the question backwards - or asking the wrong person. Opera
goes by the MIME type provided by the server. If the server says it is
audio/x-mpeg, then that's what it is - regardless of the extension. But
the fact it is still "audio" should mean it is an MP3.

>> Just add "mp3" to the list of extensions.
> Thanks. This works - now opera saves the file as mp3. But why don't
> other people in this thread have the same problem?

I've added a few extensions there, but also if you have a plugin it might
have added the extensions as well. Opera for Windows will read the MIME
types defined in your registry also.

--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

Oskar

unread,
Jun 24, 2005, 1:20:22 AM6/24/05
to
Steven V. Gunhouse wrote:
> On Thu, 23 Jun 2005 23:00:10 -0400, Oskar <gar...@vondemhagen.de> wrote:
>
>
> You're asking the question backwards - or asking the wrong person. Opera
> goes by the MIME type provided by the server. If the server says it is
> audio/x-mpeg, then that's what it is - regardless of the extension. But
> the fact it is still "audio" should mean it is an MP3.

My perception, so far, was that the extension determines the filetype.
You are saying it's the other way round?

Anyway, if the target is called quodlibet.mp3 and I want to save the
target, why would a reasonable program change the extension without
asking? I *hate* programs that try to outguess my intentions.

Oskar von dem Hagen

Matthew Winn

unread,
Jun 24, 2005, 3:42:05 AM6/24/05
to
On 23 Jun 2005 22:20:22 -0700, Oskar <gar...@vondemhagen.de> wrote:

> Steven V. Gunhouse wrote:
> > You're asking the question backwards - or asking the wrong person. Opera
> > goes by the MIME type provided by the server. If the server says it is
> > audio/x-mpeg, then that's what it is - regardless of the extension. But
> > the fact it is still "audio" should mean it is an MP3.
>
> My perception, so far, was that the extension determines the filetype.
> You are saying it's the other way round?

Yes.

The problem with using file extensions to identify the file type
is that there's no standard for them, and different systems have
different ideas about what an extension means. On Windows, for
example, an extension of "exe" indicates an executable file, while
on Unix it means nothing at all: Unix identifies executable files
using a mechanism that's completely independent of the file name.

If you only ever use one machine that's not a problem because you
can stick to your own system's convention, but the internet throws
a spanner in the works because you have to deal with other systems'
conventions as well. If you're downloading a file from a Unix server
to a Windows PC the file on the server will be stored using Unix's
conventions for file naming, but your browser will have to save the
file using the conventions of Windows. Someone using a Mac to view
the same site will have to save the file using the Mac's conventions.
And so on.

The solution adopted by the wonderful people who devised HTTP was to
ignore the filename and include separate information in the response
to say what the returned data is. In this case the response contains
audio data, so the MIME type tells the browser "I don't care what you
think the filename or extension means; this is audio data and you must
treat it as audio data". This completely bypasses the problem of
different systems having different conventions for filenames: instead
of the browser having to use the filename to guess how to handle data,
the information is explicitly stated in an unambiguous manner.

However, once you've saved the file the problem occurs in a different
form. The response from the server tells the browser what the data is
and how it should be handled, but if you save the file for later use
that information is lost because files don't have MIME types. To
solve this problem and ensure that the file will still be treated as
audio data when you try to use it later, on Windows the browser gives
the file an extension that it knows will cause it to be processed as
audio data by the system. If Opera isn't aware that an extension of
"mp3" is associated with audio data then it will remove the extension
and replace it with one it knows is correct.

> Anyway, if the target is called quodlibet.mp3 and I want to save the
> target, why would a reasonable program change the extension without
> asking? I *hate* programs that try to outguess my intentions.

It's a security feature. There have been many exploits that have
relied on browsers treating a downloaded file as one type when saving
it, but the operating system treating it as a different type when
loading the saved file at a later date. It can be used to smuggle
carefully crafted files on to a system to target vulnerabilities in
other applications.

--
Matthew Winn
[If replying by email remove the "r" from "urk"]

Pascal Ricard

unread,
Jun 24, 2005, 5:57:44 AM6/24/05
to
Hi all,
Hi Matthew.

Thank you for your valuable explanation.

Pascal, newbie regarding mime types.

Mark V

unread,
Jun 24, 2005, 9:47:33 AM6/24/05
to
In opera.general Matthew Winn wrote:

> On 23 Jun 2005 22:20:22 -0700, Oskar <gar...@vondemhagen.de>
> wrote:
>> Steven V. Gunhouse wrote:
>> > You're asking the question backwards - or asking the wrong
>> > person. Opera goes by the MIME type provided by the server.
>> > If the server says it is audio/x-mpeg, then that's what it is
>> > - regardless of the extension. But the fact it is still
>> > "audio" should mean it is an MP3.
>>
>> My perception, so far, was that the extension determines the
>> filetype. You are saying it's the other way round?
>
> Yes.
>
> The problem with using file extensions to identify the file type

[ ]

All very nicely put Mathew. Thanks. That's a keeper. :-)

--
(Opera Win32 8.01 7642 (registered); W2K, SP4; ADSL; Sun JRE 1.4.2_
08)

0 new messages