Java: how to intercept video and audio streams?
is there any Java library out there that can help intercept video and aud开发者_StackOverflow中文版io streams being sent through the browser?
So for example, a video starts loading through a flash player using some Flash server, the java application would listen for video/audio stream and capture and write it to video on the disk.
Maybe its to late, but scince google got me here I will answer this.
If you want to "Intercept" the data streams, the closer you can get to this is charlesproxy: http://www.charlesproxy.com/download/
which is a HTTP proxy / HTTP monitor / Reverse Proxy that enables a developer to view all of the HTTP and SSL / HTTPS traffic between their machine and the Internet.
You will have to play around with your browser configuration but it should do the trick.
its an aproach, dont know if this helps.
Is there any Java library out there that can help intercept video and audio streams being sent through the browser?
The simple answer is no.
There is probably not a library to do it in any language. (No operating system I've ever heard of allows one process to snoop on the socket-level data streams of another process.)
In theory you could do this with a network traffic analyser (e.g. wireshark) but the chances are that you'd miss stuff and the result would be a corrupted video / audio stream.
The only approach that I think would have a chance of working reliably would be to modify the browser and/or the plugins to capture the data streams.
精彩评论