Audio Banter

Audio Banter (https://www.audiobanter.co.uk/forum.php)
-   uk.rec.audio (General Audio and Hi-Fi) (https://www.audiobanter.co.uk/uk-rec-audio-general-audio/)
-   -   Internet radio - classical music, etc (https://www.audiobanter.co.uk/uk-rec-audio-general-audio/7651-internet-radio-classical-music-etc.html)

Jim Lesurf[_2_] February 7th 09 09:14 AM

Internet radio - classical music, etc
 
On 07 Feb, wrote:
In article , Don Pearce
wrote:
On Fri, 06 Feb 2009 09:41:02 +0000 (GMT), Jim Lesurf
wrote:



Can you really do that - record an MP3 stream as an MP3 file, I mean?
I thought the file got decoded to straight PCM, the recoded as MP3 for
writing to the file. How else would you generate the file header?



I'll do some experiments to check. I'll also ask the author of the
software as he explained to me how to do recordings in the first place.


Now done a quick experiment...

So far as I can tell, the files have no 'file header'. I've just
experimented using a simple application (program) I wrote a few weeks ago.
This allows me to snip up a file into tracks. I just give it the data rate
(kbps per sec) and it then uses an edit list to snip the track at specified
instants with a resolution of 1 second.

I just snipped up an mp3 radio recording I played. Each of the individual
files plays fine, and the player reports the actual length of that file.

My understanding is that the format works in what I can call 'frames' of
data, so that provided you snip or join in chunks composed of an integer
number of frames you should have no problems. My application makes no
attempt to understand the data, so works also for ac3 files, etc, which
also have this 'framed' approach. It just reads chunks of data from the
source file, and writes them into the sequence of output files indicated by
the edit file list I have given to it.

Perhaps other operating systems tend to use software that adds in a
'header' - e.g. like the way 'WAVE' or 'JPEG' allows a variety of types of
data format. But this does not seem to be the case with the files I've been
working with.

However I am not sure that the recordings are simply the mp3 streams. I'll
check with the author of the program I used to make my recording. I did
base my recordings on his 'C' source code, etc, but without being clear on
all the details as he is a far better programmer than myself! :-)

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


Don Pearce[_2_] February 7th 09 09:54 AM

Internet radio - classical music, etc
 
On Sat, 07 Feb 2009 00:53:33 +0000 (GMT), "Dave Plowman (News)"
wrote:

In article 498e8bea.169358828@localhost,
Don Pearce (Don Pearce) wrote:
Indeed. Most of these comments come with the benefit of hindsight. DAB was
a long time in the planning - and making radical changes late in that
process would have been difficult.
I remember driving round Birmingham on a coach equipped with a
demonstration system long before actual transmissions started - and the
difference in reception between that and FM was quite astounding.


How come you didn't go on the Kingswood Warren coach? Much more
convenient.


It was laid on for an IBS meeting taking place at Pebble Mill. I don't
know which came first - but Birmingham bull ring is (was?) notorious for
poor FM reception. Could have been the same coach - it was said to have
state of the art aerials and receivers for both DAB and FM.


Sounds the same - 12 seater minibus?

d

Don Pearce[_2_] February 7th 09 09:59 AM

Internet radio - classical music, etc
 
On Sat, 07 Feb 2009 10:14:47 +0000 (GMT), Jim Lesurf
wrote:

On 07 Feb, wrote:
In article , Don Pearce
wrote:
On Fri, 06 Feb 2009 09:41:02 +0000 (GMT), Jim Lesurf
wrote:



Can you really do that - record an MP3 stream as an MP3 file, I mean?
I thought the file got decoded to straight PCM, the recoded as MP3 for
writing to the file. How else would you generate the file header?



I'll do some experiments to check. I'll also ask the author of the
software as he explained to me how to do recordings in the first place.


Now done a quick experiment...

So far as I can tell, the files have no 'file header'. I've just
experimented using a simple application (program) I wrote a few weeks ago.
This allows me to snip up a file into tracks. I just give it the data rate
(kbps per sec) and it then uses an edit list to snip the track at specified
instants with a resolution of 1 second.

I just snipped up an mp3 radio recording I played. Each of the individual
files plays fine, and the player reports the actual length of that file.

My understanding is that the format works in what I can call 'frames' of
data, so that provided you snip or join in chunks composed of an integer
number of frames you should have no problems. My application makes no
attempt to understand the data, so works also for ac3 files, etc, which
also have this 'framed' approach. It just reads chunks of data from the
source file, and writes them into the sequence of output files indicated by
the edit file list I have given to it.

Perhaps other operating systems tend to use software that adds in a
'header' - e.g. like the way 'WAVE' or 'JPEG' allows a variety of types of
data format. But this does not seem to be the case with the files I've been
working with.

However I am not sure that the recordings are simply the mp3 streams. I'll
check with the author of the program I used to make my recording. I did
base my recordings on his 'C' source code, etc, but without being clear on
all the details as he is a far better programmer than myself! :-)

Slainte,

Jim


An MP3 file has to have a header or the playing software won't know
what to do with it. Of course if you have written your own, so it only
accepts MP3 in a single format, maybe you can do without.


d

Rob February 7th 09 10:39 AM

Internet radio - classical music, etc
 
Jim Lesurf wrote:
In article , Rob
wrote:
Jim Lesurf wrote:


Erm... that is what I have been doing. Recording the mp3 stream as an
mp3 file on my computer. Then writing these files into a CDRW for
playing on various 'audio'/'video' disc players.


No, you're not capturing the *stream* AIUI, you're capturing the audio
once it's been through your sound card, and you've then converted it
again to mp3.


Erm, again. My computer doesn't have a 'sound card'. I use an application
(software) that can fetch the steam and this can then either save it to a
file and/or covert it for playing.

To use a video analogy, you're allowing video to stream through your
media player, assuming your clockwork computer has such a thing, and
capturing the video using screen capture software. Better to capture the
stream before it hits software.


You may be right. However I wonder if you know much about how my computer
system works. It is easy to presume that what happens with the OS/hardware
you are accustomed to is 'universal'.


I may be wrong - which is it to be? Could you tell me a little about the
'capture' software you use, such as the name?

Cheers, Rob

Jim Lesurf[_2_] February 7th 09 12:10 PM

Internet radio - classical music, etc
 
In article , Dave Plowman (News)
wrote:
In article , Jim Lesurf
wrote:
The above sums up my own experience of DAB. Although these days I
mainly listen to DTTV rather than DAB.


Indeed - and DDTV tuners are rather cheaper than DAB ones. And most will
already have a UHF aerial. Only slight snag can be selecting the correct
station without having a TV attached.


Yes. Particulary annoying with the Nokia DDTV RX box I have in the living
room. This insists on keeping 'radio' and 'TV' stations in distinct lists
so you can't switch between them simply by selecting the channel number
with the remote. With practice I can navigate the menus without the TV
being on, but it is a PITA.

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


Jim Lesurf[_2_] February 7th 09 12:19 PM

Internet radio - classical music, etc
 
In article 498e68ba.225887281@localhost, Don Pearce (Don Pearce) wrote:
On Sat, 07 Feb 2009 10:14:47 +0000 (GMT), Jim Lesurf
wrote:



An MP3 file has to have a header or the playing software won't know what
to do with it. Of course if you have written your own, so it only
accepts MP3 in a single format, maybe you can do without.


Nope. I didn't write the software used for playing. And it plays a variety
of formats. Main ones I've been using are mp3 and ac3, but it does others
and some of the internet stations I've been listening to are non-mp3.
However RO machine associate a filetype with a file (not part of the name),
so the filer can be used to tell the player without a need for a header.

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.

So far as I know, any 'header' may simply be a convenience for filer
systems that don't provide a filetype mechanism. But the mp3 and ac3 files
I've experimented with seem fine even when you snip out a section and don't
add any 'file header'. Datarate is recognised OK. I presume this info is
present at frame level as part of the data decoding process. (Hence the
existence of variable rate formats.)

I will investigate further. But so far as I can tell, I am recording the
streams as they arrive with no lossy conversions. I'll check by recording a
non-mp3 stream and see how that works. I am now curious about this...

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


Jim Lesurf[_2_] February 7th 09 12:33 PM

Internet radio - classical music, etc
 
In article , Rob
wrote:
Jim Lesurf wrote:



I may be wrong - which is it to be? Could you tell me a little about the
'capture' software you use, such as the name?


It is based on a RO application called !DigitalCD. With this you can get a
set of modules that decode/play various formats, etc. There is also a
utility to record what is being presented for playing and I've been
experimenting with that. The utility will also fetch the stream if given a
URL so works even with the player not playing. So I can record with or
without listening as I wish. (The snag being knowing when to start/stop
recording if I canna hear what is happening!)

Note that you need a RO machine for the system to work. (It may work with
an emulator, but I can't say.) However the code for what I'm using is based
on source code provided as an example. This is in 'C' so if you can follow
'C' you can read it.

http://users.skynet.be/Andre.Timmerm...r/download.htm

The above is the URL for the main page about this.

if you download the zips, note that the example program for recording is
buried in one of the documents folders (directories). IIRC To find this,
look in the 'docs.zip' file's Docs.Disksample.Example directory for the
DiskPlay command line tool. I've been basing my recordings on this code. It
allows you to choose either the input stream or the results decoded to
LPCM.

Note again that the compiled versions *don't* run under windows or macs or
linux. They require ARM type CPUs and the RO hardware and architecture. But
the 'C' should be clear to programmers. But I'm afraid I can't comment on
how you'd do this on other systems as it involves things like interrupt
controlled buffers, etc. I've modified what is given, but can't say I fully
understand it! Happy enough with what I can do with my "clockwork
computer"... :-)

Good luck. :-)

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


Don Pearce[_2_] February 7th 09 12:59 PM

Internet radio - classical music, etc
 
On Sat, 07 Feb 2009 13:19:45 +0000 (GMT), Jim Lesurf
wrote:

In article 498e68ba.225887281@localhost, Don Pearce (Don Pearce) wrote:
On Sat, 07 Feb 2009 10:14:47 +0000 (GMT), Jim Lesurf
wrote:



An MP3 file has to have a header or the playing software won't know what
to do with it. Of course if you have written your own, so it only
accepts MP3 in a single format, maybe you can do without.


Nope. I didn't write the software used for playing. And it plays a variety
of formats. Main ones I've been using are mp3 and ac3, but it does others
and some of the internet stations I've been listening to are non-mp3.
However RO machine associate a filetype with a file (not part of the name),
so the filer can be used to tell the player without a need for a header.


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).

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.

So far as I know, any 'header' may simply be a convenience for filer
systems that don't provide a filetype mechanism. But the mp3 and ac3 files
I've experimented with seem fine even when you snip out a section and don't
add any 'file header'. Datarate is recognised OK. I presume this info is
present at frame level as part of the data decoding process. (Hence the
existence of variable rate formats.)


No the header is specified in some detail by the MPEG. It is a great
deal more than a convenience.

I will investigate further. But so far as I can tell, I am recording the
streams as they arrive with no lossy conversions. I'll check by recording a
non-mp3 stream and see how that works. I am now curious about this...

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

d

Dave Plowman (News) February 7th 09 01:40 PM

Internet radio - classical music, etc
 
In article 498d6859.225789953@localhost,
Don Pearce (Don Pearce) wrote:
It was laid on for an IBS meeting taking place at Pebble Mill. I don't
know which came first - but Birmingham bull ring is (was?) notorious for
poor FM reception. Could have been the same coach - it was said to have
state of the art aerials and receivers for both DAB and FM.


Sounds the same - 12 seater minibus?


No - a full sized one. 40? seater. There would have been a riot if it had
been small given the attendance at IBS meetings in those days. As it was I
think they had to do two trips to cover everyone. So the hospitality would
have taken a bashing during the wait. ;-)

--
*The statement above is false

Dave Plowman London SW
To e-mail, change noise into sound.

Dave Plowman (News) February 7th 09 01:42 PM

Internet radio - classical music, etc
 
In article ,
Jim Lesurf wrote:
Indeed - and DDTV tuners are rather cheaper than DAB ones. And most
will already have a UHF aerial. Only slight snag can be selecting the
correct station without having a TV attached.


Yes. Particulary annoying with the Nokia DDTV RX box I have in the living
room. This insists on keeping 'radio' and 'TV' stations in distinct lists
so you can't switch between them simply by selecting the channel number
with the remote. With practice I can navigate the menus without the TV
being on, but it is a PITA.


I have a Sony which is only used for radio - since the TVs have now built
in tuners. I have only the radio stations I want on the favourites list
which makes things rather easier.

--
*It's lonely at the top, but you eat better.

Dave Plowman London SW
To e-mail, change noise into sound.


All times are GMT. The time now is 07:12 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0
Copyright ©2004-2006 AudioBanter.co.uk