LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-17-2005, 08:53 AM   #1
cgraf
LQ Newbie
 
Registered: Sep 2003
Posts: 17

Rep: Reputation: 0
Recording Digital UK Radio


I live in the UK and would like to use Linux to record digital radio in mp3 format. My question is two-fold -

1. What hardware do I need e.g. a pci card, usb device, a separate radio with a line-out?

2, What software could I use to control the dab receiver (change station etc) and record onto mp3 format?


Regards,

Chris.
 
Old 12-18-2005, 10:33 AM   #2
rjwilmsi
Member
 
Registered: Mar 2005
Location: UK
Distribution: opensuse 12.2 x86_64
Posts: 563

Rep: Reputation: 38
Right. I've just bought the Freecom DVB-T USB stick off Amazon and intend to set it up on Linux shortly. I've looked at http://www.linuxtv.org/wiki/index.php/Main_Page and it's supported. It seems like we have to install the firmware on that site, then media players like Kaffeine can use them. So for you, I suppose you can buy anything that's listed on linuxtv.org.
 
Old 12-18-2005, 01:15 PM   #3
rjwilmsi
Member
 
Registered: Mar 2005
Location: UK
Distribution: opensuse 12.2 x86_64
Posts: 563

Rep: Reputation: 38
I've now been playing with my Freecom and after putting the appropriate firmware from www.linuxtv.org in /lib/firmware/ and rebooting, Kaffeine sees the stick, and has scanning, EPG, playing and recording features. I can't yet get it to find any stations, but that might be because my laptop is USB 1.1 only. Still, it's promising.
 
Old 10-27-2006, 06:16 AM   #4
sixgunz
LQ Newbie
 
Registered: Oct 2005
Posts: 9

Rep: Reputation: 0
Hey guys, I have a laptop, with exactly the same stick!

Works great under linux.

Had used it before under windows, with a laptop and usb 1.1 - not a chance!

My current setup is a laptop, with mepis distro. The laptop has usb 2.0

Now, if you are using the supplied antenna, dump it - the only way to get a good signal is with a properly aligned DVB antenna. Got mine from Wickes for 35 - an absolute bargain, seeing as it was a 52 element. Dosent need a booster, even when pointing indirectly in the transmitters direction (needs to go through a house!)

Moral of the story:

You need USB2 because of the bandwidth of some of the muxes
You need to get a decent DVB (not the terrestrial one supplied) aerial

Okay and now for the second part:

Several ways of recording to mp3.

First, The theory:

DVB channels are actually streams of audio and video (called pids) that are taken from a mux (multiplex - name of a group of streams, which transmits on a given analogue frequency).

When you select a channel on DVB, what you are actually doing is changing the frequency of the analogue tuner, which will select the correct mux, then the selected channel will have a list of pids (audio and video) that are selected from that mux - that is how the tuner knows what to play!

So, selecting a radio station, will generally have just one pid - the audio! May have more than one for different languages, etc..

Anyway, supposing your channel has one pid, identified as pid 560: this is a stream of audio, generally streamed in mp2 format. You need mp3 format, so the best thing to do is to convert the stream as it is being received and dump it to a file with .mp3 suffix.

I have done something simillar with a DVB channel to convert the mpeg2 stream to divx.

You will need to install a command line interface for getting the stream from dvb. I use DVBSTREAM as it is fairly easy to use. DVBSTREAM is part of the DVBTOOLS package.

For audio you could use either LAME or FFMPEG.

You will need to know how to use "pipes" and command line.

my command line for this would go something like:

dvbstream -c 0 -f 706000 560 -o - | ffmpeg -i - -f mp2 outfile.mp3

Breakdown:

dvbstream = the command to tune the frequency and stream the pid
-c 0 = adapter number for dvbstream to use (0 is the first adapter)
-f 706000 = frequency to tune to
560 = the pid for the channel
-o - = tells dvb to stream to stdout
| = the pipe command - tells dvbstream to pipe the stdout to a command
ffmpeg = the command to convert the piped stream to another format
-i - = tells ffmpeg the input is the piped stream
-f mp2 = tells ffmpeg the format of the input is mp2
outfile.mp3 = tells ffmpeg to write mp3 format output to the file "outfile.mp3"

The command is an example. You will need to find the frequency and pid for the stream you are recording.

If you get stuck, I'll try radio 1 and then give you a properly formatted example.

Hope that helps!
 
Old 10-27-2006, 06:44 AM   #5
sixgunz
LQ Newbie
 
Registered: Oct 2005
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by cgraf
I live in the UK and would like to use Linux to record digital radio in mp3 format. My question is two-fold -

1. What hardware do I need e.g. a pci card, usb device, a separate radio with a line-out?

2, What software could I use to control the dab receiver (change station etc) and record onto mp3 format?


Regards,

Chris.

Think it's important to point out that DAB radio isn't the same as DVB radio.

DAB is broadcast over FM, whereas DVB is broadcase over UHF.

The digital principle is the same though: digital multiplex streams are sent over an analogue frequency. However, the channels received are different.

I found this on a website, so they are available:

http://www.gizoo.co.uk/Products/PCGa...adioDongle.htm

Also, I had a psion wavefinder, but it's broken so cant test

Just remember that the device must be supported by linux, or at least, have sourcecode to be able to build a driver.

If you are looking for a way of recording DAB, you could hook up a DAB's line out to your line in on a sound card and do something similar to the DVBSTREAM thing like:

cat /dev/audio | ffmpeg -i - outfile.mp3

But the audio won't be as pure as the actual digital stream - you are recording decoded digital audio, played (recorded) through an analogue device.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Recording radio stream foxxer Linux - Software 5 05-28-2005 03:56 PM
recording radio programs with gmplayer in mp3 file cris_orpi Linux - Software 0 05-13-2004 10:41 AM
Ardour: digital recording software released for linux! Nigel_Tufnel Linux - Software 8 07-05-2003 05:23 PM
internet radio and recording it jetfreggel Linux - Software 3 11-18-2002 05:19 PM
Digital Recording Software Nigel_Tufnel Linux - Software 6 08-13-2002 12:06 AM


All times are GMT -5. The time now is 10:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration