LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 03-31-2010, 08:47 PM   #1
CrashedAgain
Member
 
Registered: Jan 2004
Posts: 307

Rep: Reputation: 33
How do I record these podcasts


How do I record the podcasts from this source http://www.cbc.ca/vinyltap/audio.html ?
I have tried mplayer I get a "stream not seekable" error.
I also tried arecord which I thought was supposed to record whatever sound is coming through the computer.
I tried to use the "sound recorder" that comes with Ubuntu but that records only from the microphone (source is "capture" with no other options.
Using Ubuntu 9.04 on an Acer Aspire one netbook.....
Having even less success with Ubuntu 9.04 on my Acer desktop computer.
 
Old 03-31-2010, 09:19 PM   #2
itsbrad212
Member
 
Registered: Nov 2009
Location: Chicago
Distribution: Arch and OpenBSD
Posts: 104

Rep: Reputation: 19
What microphone do you use?
 
Old 03-31-2010, 09:58 PM   #3
Kenhelm
Member
 
Registered: Mar 2008
Location: N. W. England
Distribution: Mandriva
Posts: 360

Rep: Reputation: 170Reputation: 170
You don't need to record the podcasts as their URLs are in the webpage.
The URLs can be used to download the podcasts as mp3 files.

This strips the 110 podcast URLs from the webpage:
Code:
wget -qO- http://www.cbc.ca/vinyltap/audio.html |
grep -o 'http://podcast[^"]*\.mp3'

# Output:
http://podcast.cbc.ca/mp3/vinyltapstreaming_20100403_29816.mp3
http://podcast.cbc.ca/mp3/vinyltapstreaming_20100403_29823.mp3
http://podcast.cbc.ca/mp3/vinyltapstreaming_20100327_29811.mp3
....
....
....
http://podcast.cbc.ca/mp3/vinyltapstreaming_20081004_8059.mp3
http://podcast.cbc.ca/mp3/vinyltapstreaming_20080928_8003.mp3
http://podcast.cbc.ca/mp3/vinyltapstreaming_20080928_8015.mp3
 
Old 04-01-2010, 09:39 AM   #4
CrashedAgain
Member
 
Registered: Jan 2004
Posts: 307

Original Poster
Rep: Reputation: 33
Thank you very much.

Next questions....

What is the best way to copy these mp3's? Mplayer works but is there a better way?

Is there a way to copy all of the files without having to d/l each one individually? (I've done some very elementary scripting but I'm not very familiar with it)
 
Old 04-01-2010, 11:13 PM   #5
Kenhelm
Member
 
Registered: Mar 2008
Location: N. W. England
Distribution: Mandriva
Posts: 360

Rep: Reputation: 170Reputation: 170
Try downloading the podcast file into a directory then use 'mp3splt' to split it into smaller files.
For example, if you paste this command into a terminal it will download the podcast file into the terminal's present working directory.
The name of the file will be 'vinyltapstreaming_20100403_29816.mp3'
Code:
wget http://podcast.cbc.ca/mp3/vinyltapstreaming_20100403_29816.mp3
The file can also be taken from the Firefox 'Cache' directory.
The mp3 file is left there after the podcast has been played in Firefox.
But, if the Firefox cache size has been set too small to hold the mp3 file, it could be in the /tmp directory instead and in that case will probably be deleted after it has finished playing in Firefox.
Look for a file of around 24MB.

There are two versions of mp3splt:
mp3splt is a command line tool.
mp3splt-gtk has a graphical user interface.
Both are able to split up a mp3 file into several files without any loss of sound quality.
Screenshot of mp3splt-gtk: http://en.wikipedia.org/wiki/File:Mp3splt-gtk-0.3.png

Last edited by Kenhelm; 04-02-2010 at 09:35 AM. Reason: spelling
 
Old 04-04-2010, 04:54 PM   #6
CrashedAgain
Member
 
Registered: Jan 2004
Posts: 307

Original Poster
Rep: Reputation: 33
Kenhelm....you misunderstand what I want. The problem is not that the files are too big, the question is how to download all 110 of them without having to do each download separately.

I made up this script which seems to be working
Code:
#!/bin/bash

#echo "Echo"
#sample http://podcast.cbc.ca/mp3/vinyltapstreaming_20081004_8062.mp3
Inlist=VinylTapList
COUNT=0

#cd to a dir which has lots of room
cd /media/sdb2/VinylTap
#get the files list
wget -qO- http://www.cbc.ca/vinyltap/audio.html | grep -o 'http://podcast[^"]*\.mp3' > VinylTapList

#cat $Inlist

for i in `cat $Inlist`; do
let COUNT=COUNT+1
echo "Downloading $COUNT of 110"
	
	DumpFileName=`expr substr $i 27 40` 
#	echo $DumpFileName
#use if to avoid duplicating downloaded files
	if [ -a $DumpFileName ]
  		then
    		echo "$DumpFileName exists."
		else 
		echo "$DumpFileName does not exist"
		
		wget $i 
	fi


#...was going to use mplayer 
	#mplayer -dumpstream $i -novideo -dumpfile "$DumpFileName"

done
It appears to take about 45 seconds per file so the entire job should take just under 2 hours.

It would have been a lot easier if I could just do wget http://podcast.cbc.ca/mp3/vinyltapstreaming_*.* but wget doesn't allow wildcards in http downloads. Also there may be a "skip existing files" option in wget but I couldn't find it, thus had to use the "if" construct.

You also mentioned trying to recover the file from Firefox's cache as a downloading method.

I have had some difficulty with using this method recently, I don't think Flash 10 deposits files in the cache and then leaves them there like previous versions of Flash did. Anyone else encountering this??

Last edited by CrashedAgain; 04-04-2010 at 05:01 PM.
 
  


Reply



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
how to make resolver ask for A record before AAAA record Skaperen Linux - Networking 25 03-02-2010 06:36 PM
podcasts themanwhowas LQ Suggestions & Feedback 1 10-08-2009 12:02 PM
DDNS record and a static PTR record mou5e Linux - Networking 2 01-22-2008 01:16 AM
Linux Podcasts dragonmortal Linux - General 1 08-16-2005 02:21 AM
Unable to record mic-in with SoundBlaster Live! while able to record other sources max76230 Linux - Newbie 2 03-14-2005 04:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:30 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
Open Source Consulting | Domain Registration