In article 498f921e.236483187@localhost, Don Pearce (Don Pearce) wrote:
On Sat, 07 Feb 2009 13:19:45 +0000 (GMT), Jim Lesurf
wrote:
In article 498e68ba.225887281@localhost, Don Pearce (Don Pearce)
wrote:
The header is much more than that. It specifies the sampling rate, the
coding type, mono or stereo - and that is without all the metadata. The
filetype (three letter extension) is a purely visual matter. A .wav file
can contain just about any compressed or uncompressed format, based on
the format of the header (look up RIFF for info).
Yes. I know that formats like WAV format can do that, and that headers can
be useful. But so far as I can tell, the mp3 data files I'm using don't
have headers at the file level. They may have them at the 'frame' level,
but that is a different matter.
But the point here is that the files play OK even when data snipped
from the middle of a recording. So no header information seems present
at the file level. There is other info - e.g. the bitrate is recognised
- even though the filetype give no clue to this. I can't see how the
player could recognise the bitrate from a chopped up section if it
needed a file header I haven't provided.
Thinking about it, I can believe that it is quite possible to chop a
section out of an MP3 stream and write a header to fit it. All the
information is there.
I'm sure it would be. But I *did* write the program I am using to snip up
mp3 and ac3 files. It simply lifts chunks of data from one file with a 'C'
fread() and writes them to another with an fwrite(). The program certainly
does not add or alter any file header info. And such info at the start of
the source file of data would only appear at the start of the first output
file in a sequence as I create them. None of the following files would have
such info.
I've just checked, and the snipped mp3 files play fine as mp3 files on my
Rega Apollo as well as computer, so I suspect they will also play OK with
the other machines I have.
Do you have a hex editor? Have a look at the start of one of your saved
files and compare it to this
http://www.mpgedit.org/mpgedit/mpeg_...MP3Format.html
I'll have a look. But as I say, since I know how the files I've snipped by
editing are created I can be sure that those other than the first won't
have any header that only appears at the start of the source data file. Yet
they play OK.
Slainte,
Jim
--
Change 'noise' to 'jcgl' if you wish to email me.
Electronics
http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio
http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc
http://www.audiomisc.co.uk/index.html