LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-01-2005, 08:26 PM   #1
nazarioz
LQ Newbie
 
Registered: Sep 2004
Posts: 25

Rep: Reputation: 15
MPlayer: Recording specific time period of audio stream


Is it possible to record a stream starting from a specific time in the stream, ending at some other time? What I mean is, you can use MPlayer to listen to an audio stream from a website, and record the stream to a file using the -dumpstream option. But this will record all the stream, from the very start till the end. What if I want to record starting say from minute 30 and ending in minute 50 for example? Can MPlayer do that? How can I do it?
 
Old 06-01-2005, 08:34 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
If timing is not needed to be perfect then look for mp3record. It is a command that starts recording the pcm channel when you answer all the questions it ask then you esc when done.

Brian1
 
Old 06-01-2005, 08:51 PM   #3
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
Check at the bottom of this link for scheduling your captures.

http://grimthing.com/archives/2004/0...-with-mplayer/

KC
 
Old 06-01-2005, 09:58 PM   #4
nazarioz
LQ Newbie
 
Registered: Sep 2004
Posts: 25

Original Poster
Rep: Reputation: 15
I looked at the website you mentioned kencaz, but I am not sure how that setup will help me. I can start mplayer beforehand and leave it playing, but I see no way to start dumping sections of the stream after the playing has already started.

As I understand it, a script named streamrecorder, with lines like
#!/bin/sh

mplayer -playlist /home/username/scripts/playlist.txt -ao pcm -aofile /tmp/mystream.wav -vc dummy -vo null ;

used in Cron

05 06 * * 1-5 /home/username/scripts/ streamrecorder >& /dev/null

will start recording at 6:05, but it will open whatever URL is in the playlist file, and it will start dumping the stream into the file stream.wav since the beginning of the strem. This is what I do not want. I want to start the dumping the stream when say 35 minutes of streaming time have already passed. So it should start streaming first and then at some different time afterwards it should start the dumping. This is what I do not know how to make mplayer do.

Now, I tried mp3recorder as Brian suggested. It seems to be recording something and it generates an mp3 file. But when I try to listen to it, no sound is produced. It has some minutes of silent recording. Any clue of why it is doing that? Suggestions on how to fix it and make audio come out of it? I will appreciate your help a lot.
 
Old 06-01-2005, 10:34 PM   #5
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
Hmmm, you may have to play with -cache and -dumpstream together but I don't know how you would time it the way you want though...

http://www.mplayerhq.hu/DOCS/HTML/en/streaming.html

KC
 
Old 06-02-2005, 10:36 PM   #6
nazarioz
LQ Newbie
 
Registered: Sep 2004
Posts: 25

Original Poster
Rep: Reputation: 15
Anyone knows what can be wrong with my mp3record that it seems to record, and it generates an mp3 file aparently with information on it, but when I play it, no audio comes out of it? I hear nothing! What is happening? what can I do?

I'll appreciate your help.
 
Old 06-02-2005, 10:43 PM   #7
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
Are you using Fedora or SUSE. If so you may have to install .mp3 support. There may be some other Distro's involved in this copywrite stuff but these are two that I have heard that don't install with .mp3 support.

KC
 
0 members found this post helpful.
Old 06-02-2005, 10:47 PM   #8
nazarioz
LQ Newbie
 
Registered: Sep 2004
Posts: 25

Original Poster
Rep: Reputation: 15
I am using RedHat 9.
This problem seems to be happening with mp3record only. I can for example convert files to mp3 using lame and that works fine, but mp3record does not seem to work :-S
 
0 members found this post helpful.
  


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
Running a program for a specific period of time CaptainHowdy Linux - Software 2 08-22-2004 08:02 PM
Only starting command in a specific time period jeroenvrp Linux - Software 3 07-21-2004 12:18 AM
Internet Audio Stream Recording From Linux treedstang Linux - Software 1 04-30-2004 04:31 PM
Recording a real audio stream fancypiper Linux - Software 4 11-12-2003 05:39 PM
timer recording an audio stream deadite66 Linux - Software 2 05-09-2003 08:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:14 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration