Click here to Skip to main content
15,888,803 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hi,

I would like to record a specific website's audio output.
Now here is how it should look like:
I open a website (maybe .NET WebBroswer class?), and I can record that site's audio output, so I can navigate to other site's while it's recording, and then I could play it back.
Imagine it as a YouTube song "downloader". (of course that's not the purpose)

Or if I could record a specified application's sound that would be a possible solution too, as I open a website then whenever I press the record button it starts recording that WebBrowser's button.

Thank you for your answers in advance.
Posted
Comments
Sergey Alexandrovich Kryukov 13-Mar-13 17:54pm    
How would you define "site's audio"? It outputs some audio at one time, that something else, and it may depend on what you do as a client, and other factors...
—SA

1 solution

I hate to tell you that, but in general case this is absolutely impossible. My comment to the question should give you some hint.

However, you can cover some special simple cases, maybe for some specific sites. For example, if the pages contain background music or just downloadable audio files via href, you can simply download music source:
http://www.thesitewizard.com/webdesign/backgroundmusic.shtml[^].

In such simple cases, you would need to use the Web scraping techniques, http://en.wikipedia.org/wiki/Web_scraping[^].
For more detail, please see my past answers:
get specific data from web page[^],
How to get the data from another site[^].

There are much more difficult cases that are really hard to cover. The site can use audio streaming and use many different protocols which are hard to cover just because it's hard to implement them all, and direct download is not available, because this is not pure HTTP. Some protocols are proprietary, not properly documented and are modified from time to time; one notoriously difficult case is Microsoft MMS or HMMS, MMS via HTTP. For example, FFMpeg can cope with downloading such a stream. Even if you cover many protocols, you cannot guarantee that something else is used.

And finally, you may be curious why I used such strong expression as "absolutely impossible". Well, because this is so in a general case. The site can use some algorithm of pseudo-random, more exactly, theoretically unpredictable sequence of audio samples; another variant of this idea is automatic generation of music. There is a very general theorem in computer science telling us that prediction of algorithm behavior is in general case theoretically impossible. (See for example, http://en.wikipedia.org/wiki/Halting_problem[^].) And, in practice, it's "even more impossible" :-), because you don't even have access to such unpredictable algorithm; it is hidden on the server part of the site…

The general problem of scraping of all site's audio output does not even make sense.

—SA
 
Share this answer
 
v2
Comments
velvet7 14-Mar-13 1:43am    
Thanks for your answer. :) Well, in Mac OSx it is possible, and I am just trying to do the same. I guess then in Windows it's impossible.
(On osx: http://www.bitcartel.com/irecordmusic/index.html )
Sergey Alexandrovich Kryukov 14-Mar-13 1:57am    
You are welcome.

Don't mix two different things: "it's possible" with "some site told me it is possible". What you say about possibility is not true. I don't care what someone says. Or maybe you did not understand what exactly possible in what cases. Some things have strong proofs.

I answered. The problem is irrelevant to the OS where you work on the client side, it all depends on the Web application.

OK, will you accept the answer formally (green button) — thanks.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900