[vorbis] Why the commotion about file extensions?
Tom Felker
tcfelker at mtco.com
Fri Jul 18 19:36:34 PDT 2003
On Friday 18 July 2003 7:46 pm, Oscar Sundbom wrote:
> On Thu, 17 Jul 2003 15:04:44 +0300 (IDT)
> >
> > Lossy vs. lossless is very important. If I have both I can only keep
> > the lossless and always be able to recreate the lossy one but not vice
> > versa. Consider the frequent scenario: you encode a bunch of .wav
> > files into `.ogg` files. Then you listen and decide the quality is
> > not high enough, so you delete the `.ogg` files and reencode them with
> > higher quality. Then you are satisfied and delete the `.wav` files to
> > save space. Imagine how confusing it would be if the `.wav` files
> > would also have the same `.ogg` extension. But FLAC is exactly like
> > WAV in this rescpect, it's only a bit smaller.
>
> Wouldn't just a more elaborate naming scheme (sans extension) on your part
> be a better choice for that? For example "Artist - Songtitle [FLAC].ogg",
> or why not just ".flac.ogg". File naming can never be written in stone
> anyways (well, it can, but you get my point), meaning that of course a
> person can choose the naming most appropriate for that person's personal
> use. I think the thing most interesting here is some sort of official
> recommendation on fundamental extensions for use with files with
> fundamentaly different properties. Personally, I think video vs. audio
> (only) is a good separation. Sticking a codec name before the extension
> won't change it, it'll just inform the more knowledgeable users of what it
> is, so calling it an extension is dubious.
I'd rather see .flac for Ogg Flac files. Consider oggenc and OggDrop, which
make Vorbis files from other formats. If Ogg Flac has the same extension as
Ogg Vorbis, how would the files be renamed? I think that the distinction
between lossless and lossy audio is very important, because they are used
differently. Arguably, that distinction is more important than between audio
and video, because you convert from lossless to lossy more often than you
convert from video to audio. It's easier to automate this if there's a
convention for naming the files. The most widespread and well-supported
naming convention is extensions. ("[FLAC].ogg" isn't a naming convention
anyone would use: brackets in filenames are evil.)
> > > Wouldn't the scheme with the secondary optional codec extension work
> > > for you as well?
> >
> > Work - yes, as well - no ;-). It's inconvenient and not supperted
> > well enough on windows as already mentioned in this thread.
>
> Hmm ... seems I already answered this ... kinda. I don't think, actually,
> I'm kind of sure that the optional codec extension is just shown by Windows
> (treated as part of the file name).
Yes, only the first extension will be hidden, so it will work in Windows. The
broken part is that Windows can't, for example, form seperate associations
(or use different icons for) .ogg and .flac.ogg. I personally don't care,
but I think different icons (and sort by file type) would be useful to
Windows users.
If this group just dismisses the issue, .flac.ogg is what I'll probably use,
and I'd have to bug the oggenc guys to rename .flac.ogg files to .ogg or
.vorbis.ogg when transcoding. .flac is most useful to Windows users, whose
OS can't associate with more than one-period extensions.
> Following here are some more ramblings on parts of this thread that I just
> haven't gotten around to answering before:
>
> We don't need no steenking file extensions."
> The claim that has come up a few times here that "this isn't '95" and
> "files are no longer identified by their extension by any software" is
> right, but oh so wrong. The two statements are correct, but the point at
> which they're heading isn't. I can't imagine many pieces of software that
> have ever identified files based on extension. File formats just doesn't
> work like that. They usually have some identifier in them and contain
> header information etc. that need to be checked by the software. It's
> reading the file anyways, so why shouldn't it check for the validity of the
> file it's using. Extensions are there for the user, not the software (other
> than displaying interesting files to the user). On a related note. Having
> the OS do file format checking (which then most probably has to be done all
> over by the software again) before launching appropriate software could
> prove to be an even more malicious thing than Windows hiding extensions per
> default. You'd double click on an .avi (for example), believing it was a
> movie and instead launching a virus 'cause the OS decided it was an
> executable and didn't care the least what you wanted to do with the file.
I agree, extensions (or permission bits) are much better to rely upon than
scanning the file. They're more efficient (because you don't have to open
the file, and you don't have to know what to look for), and they're more
convenient (because you can tell what a file is just by looking at it).
Your last observation is spookily insightful: there have been buffer overrun
vulnerabilities in the Linux "file" command, which parses unknown binaries to
see what type they are. Luckily, sane OSes don't decide whether to execute a
file by it's extensions or contents, but by it's permissions.
> Finally I'd just like to agree with Hauke: What if the format gets very
> popular and people start using ogg containers instead of avi (for example).
> That would create a whole array of codecs that can be used and have to be
> mentioned in the extension (if such a recommendation is made)
> .flac_mjpeg_ogg someone?
I certainly wouldn't want extensions that long or involved. Better would be a
name specific to that group of codecs, or the most important codec. But
that's in the future, we don't know what people will want to do.
I'd prefer to just make (by default) "flac --ogg" use the .flac extension.
It's a small change; it would only require programs that decode both Flac and
Ogg Flac to do a simple check ('fLaC' vs. 'OggS') of what type of file it is
before parsing it. They probably already do this.
PS: I'm sorry for continuing this thread; I know some people don't see the
issue, or would prefer for it not to clog their inbox. However, to me and a
few others, extensions are important, and whatever we do should be done
because it's the right thing, not just because we don't want to discuss it
further. It's easy to hide threads.
--
Tom Felker
Verbing weirds language.
-- Calvin, Bill Watterson
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis
mailing list