LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-21-2005, 10:27 PM   #1
despotic
LQ Newbie
 
Registered: Jun 2004
Distribution: Slackware 10.1
Posts: 15

Rep: Reputation: 0
Recording: Windows Media Audio 9 stream


I appologize if a similar topic has been posted before.

I have a problem recording a Windows Media Audio 9 stream with mplayer. The issue seems to happen only with some Windows Media Audio 9 streams and not with others.
For example, I have tried to record streams from the following radio stations, both streaming Windows Media Audio 9:
1) http://64.34.147.109:3690/CFMJAM -- does not work
2) http://ccri.eonstreams.com/ccri_ne_omaha_kfab_am.asf -- works

When I try to record the first stream with mplayer, I get a dump of the stream, but then I cannot play it in Windows Media Player. On the contrary, if I try to record the second stream, Windows Media Player is able to play the file. I am using the same command for both stations:
Code:
mplayer URL -dumpstream -dumpfile test.wma -vc dummy -vo null

Can you tell me if you have the same issue with the above stream. Also, I'd like to know if any1 knows of another way I can record the stream without using mplayer or maybe how I can properly record a playable file with mplayer.

Thank you for your help!
 
Old 12-22-2005, 11:38 AM   #2
despotic
LQ Newbie
 
Registered: Jun 2004
Distribution: Slackware 10.1
Posts: 15

Original Poster
Rep: Reputation: 0
I sloved my problem

For those of you interested, here is the solution:

I realized that the mime-type of the stream that wasn't recorded properly was not recognized. It has a mime-type "application/x-mms-framed", while the stream that I am able to record has a mime-type "video/x-ms-asf". Looking in mplayer's source code (libmpdemux/network.c), I noticed that "video/x-ms-asf" is in the mime-type table and "application/x-mms-framed" was not. So what I had to do is simply add the new mime-type and recompile. Now, the code for mime_type_table looks like:

Code:
mime_struct_t mime_type_table[] = {
	// MP3 streaming, some MP3 streaming server answer with audio/mpeg
	{ "audio/mpeg", DEMUXER_TYPE_AUDIO },
	// MPEG streaming
	{ "video/mpeg", DEMUXER_TYPE_UNKNOWN },
	{ "video/x-mpeg", DEMUXER_TYPE_UNKNOWN },
	{ "video/x-mpeg2", DEMUXER_TYPE_UNKNOWN },
	// AVI ??? => video/x-msvideo
	{ "video/x-msvideo", DEMUXER_TYPE_AVI },
	// MOV => video/quicktime
	{ "video/quicktime", DEMUXER_TYPE_MOV },
	// ASF
        { "audio/x-ms-wax", DEMUXER_TYPE_ASF },
	{ "audio/x-ms-wma", DEMUXER_TYPE_ASF },
	{ "video/x-ms-asf", DEMUXER_TYPE_ASF },
	{ "video/x-ms-afs", DEMUXER_TYPE_ASF },
	{ "video/x-ms-wvx", DEMUXER_TYPE_ASF },
	{ "video/x-ms-wmv", DEMUXER_TYPE_ASF },
	{ "video/x-ms-wma", DEMUXER_TYPE_ASF },
	{ "application/x-mms-framed", DEMUXER_TYPE_ASF },
	// Playlists
	{ "video/x-ms-wmx", DEMUXER_TYPE_PLAYLIST },
	{ "audio/x-scpls", DEMUXER_TYPE_PLAYLIST },
	{ "audio/x-mpegurl", DEMUXER_TYPE_PLAYLIST },
	{ "audio/x-pls", DEMUXER_TYPE_PLAYLIST },
	// Real Media
//	{ "audio/x-pn-realaudio", DEMUXER_TYPE_REAL },
	// OGG Streaming
	{ "application/x-ogg", DEMUXER_TYPE_OGG },
	// NullSoft Streaming Video
	{ "video/nsv", DEMUXER_TYPE_NSV},
	{ "misc/ultravox", DEMUXER_TYPE_NSV},
	{ NULL, DEMUXER_TYPE_UNKNOWN},
};
Heads up if you have similar problems ... check the stream mime-type and make sure mplayer recognizes it properly.

Last edited by despotic; 12-22-2005 at 11:46 AM.
 
Old 01-19-2006, 02:57 PM   #3
utopicdog
Member
 
Registered: Aug 2003
Location: france
Distribution: suse/fedora
Posts: 105

Rep: Reputation: 15
there is a simpler way, just play the stream and record the mixer channel.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MPlayer: Recording specific time period of audio stream nazarioz Linux - Newbie 7 06-02-2005 09:47 PM
Windows Media Playlist for Icecast stream funkatron General 0 04-11-2005 05:46 PM
Internet Audio Stream Recording From Linux treedstang Linux - Software 1 04-30-2004 03:31 PM
Recording a real audio stream fancypiper Linux - Software 4 11-12-2003 04:39 PM
timer recording an audio stream deadite66 Linux - Software 2 05-09-2003 07:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:26 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