I'm going to be creating a small application as a pet project that records of list of songs that a Pandora station plays over time. The challenge is that Pandora uses flash, so I'm unsure of how to grab the song title from the page.
Typically for something like this I would create a WebRequest and read the response, but with Flash in the mix, I'm not sure if this is the right way to proceed.
My question:
Is a WebRequest the right approach? If not, what alternatives might be available for grabbing this information? A tool like Selenium comes to mind, but I'm not sure that would handle this situation very gracefully.
I'll be doing this from a PC, so either developing an app using C# or another tool completely would both be options.
Related
My understanding of how this stuff works is very limited, as I usually just make library calls which make the audio / video magically show up.
I want to be able to do MITM "attacks" to programs on my own computer. (I'd be the guy intercepting signals between the software and the hardware). This kind of thing could be useful in a number or scenarios.
For instance, for audio:
XP doesn't have a way to change the audio for specific programs while keeping the others unchange. It only has one audio
manager across all its programs. If I could intercept the signal (and
detect which program it was coming from) I could in theory make my own audio manager.
I could record conversations, possibly testing out any audio -> text software I may have/create.
many more.
For video:
(Primary goal here): record conversations. I have used a third party program, but I'm guessing what it is doing is taking snapshots because 1) the video is choppy and 2) when the mouse or other thing gets in the way of the video, it records that too. Wouldn't it be easier just to record the signal going to the video card from the specific program of my interest, then play it back when I want to see it again?
For network traffic:
For recording traffic to and from my computer, possibly discovering
programs that are communicating that shouldn't be.
For keyboard/mouse:
This could be useful for easily creating macros to fill out forms or
whatever, and I could custom encrypt the data to make sure it's
secure rather than relying on some third party software.
I'm sure there are many other applications for which this could be useful.
Thanks.
I'm an electronics engineer used to coding in embedded C and assembly, but I decided to start learning higher-level stuff like C#, .NET, etc., so I can start making software as a hobby. I have a great idea for one of my first projects, but after searching several forums for days on end, I'm left not really knowing what would be the easiest path forward.
The functionality that I'm looking to create is pretty similar to the idea of a photo slideshow, but applied to videos instead. The program would open a playlist or a folder full of videos and then play the videos in a random order, starting from a random starting position, and with a fixed duration (let's say 10 seconds as an example). You would end up being able to watch a sort of "video montage" that consisted of small clips from random parts of the videos in the playlist, shown in a random order, ad infinitum until the program is closed.
There are a number of ways I could tackle the problem:
Develop a standalone video player with the fixed functionality of showing "video slideshows." DirectX has the Microsoft.DirectX.AudioVideoPlayback API that
could be a good starting point. I found an example here: http://www.dreamincode.net/forums/topic/111181-adding-video-to-an-application/
Modify an open source project to add the desired functionality. I've seen a few cool projects that could get me started, like this simple C# Movie Player: http://www.codeproject.com/Articles/18552/C-Movie-Player
Use a scripting interface to implement this functionality on an existing media player, like VLC or Winamp. You could also control VLC via C#, like the example here: Controlling VLC via c#
I realize that the obvious answer for most people would be to "use whatever you're most comfortable with," but since I'm a pure beginner, I don't really have any allegiances to a particular language or development environment. So, I was just curious if anybody had an idea of what might be the least painful option for a beginner.
I also apologize that this is not a very specific programming question. I'm sort of just testing the waters to get my footing. Hopefully, once I get started on the project, I'll be able to come back and post more intelligent and relevant questions!
While your background would lend you toward C#, I recommend investigating something like this and using WPF for the media player. You can then control the media player using a background worker in order to stop the video or queue up the next one. Some other .NET concepts that will be of use to you are FileInfo and DirectoryInfo objects, to provide you with the necessary information about the files. I'm not sure if you've had experience with generic data structures in .NET, but the System.Collections.Generic namespace would be a good place to start to get a feel for data structure you want to keep your playlist in. WPF will also be able to help you with transitions between video clips.
Admittedly WPF is easier with an understanding of the MVVM or MVC design patterns, but I think you'll be able to get something working without having to delve too far into that right up front.
Back in December I released Elpis, an open source Pandora Radio client... and then Pandora promptly squashed the ability for third party clients like mine to connect to the service without some seriously complicated work-arounds. It still somewhat works, as long as you never skip a song or change the station :P But I've pretty much ended support of Elpis because it's just not worth playing an ever harder game of cat a mouse...
So... there are a TON of streaming music services out there and I'm trying to figure out if there is at least one that has a decently open API with which I would be able to retrofit Elpis to use that service instead. I'm guess, due to licensing, the answer is going to be a definite no... but I wanted to at least query the community before giving up?
An no, I'm not talking about something like Last.FM's api that just lets you get the song info but something that actually lets you play the music. I don't really care if there's already a C# API for it... as long as it's got a REST, RPC, etc. web API, I can make it work.
Any suggestions?
I ended up recording my speaker in c# using a wasapi loopback capture routine. It has a webbrowser control so it knows the title, artist and album. The browser streams the music to my audio output jack, and a separate thread reads the music from my sound card. The only way they could ever protect against that is to stop streaming in the first place.
Spotify has an API that allows you to stream music. I've never personally used it, but a colleague of mine was working on a personal project that allowed him to change what was playing on his machine via a web service; accessible from another machine over the network or internet.
Note: I believe you need to have a Pro account to develop with it, though.
Its an idea i have had for many years and i want to finally start doing it.I am still a newbie , but i have enough experience to understand new things.The basic idea is this.There will be an animal.A spider for example, which can run across systems connected in lan.It comes and sits in one computer, and if the user nudges it it crawls away to visit a nearby or random computer, where it stays until nudged again.That's it.
Now i want to know the following things
1)Which languages are best for this one?I have some knowledge of C# and java.I can do flash animations also
2)What all should i search for to get started?
Its a nonsense project and has no use to anybody.But i will get immense pleasure if i see it work.I will be posting more questions as i progress.
This wouldn't be too difficult in C#. You could create a program (or service) that runs on the systems across the lan, and use WCF Discovery to find other copies of the program running on other systems.
When you want to make the spider move, just see which other systems are available, and send a message to that system that you want it to go there. You'd then make your spider crawl away, and on that system, crawl into place.
I would like to know if it is possible to mute only a specific window. For example I have got Firefox open and two more windows. I want to mute everything related to Firefox but not the whole sound of my computer.
Is this possible? If so, how can it be done?
look, basically, there isn't any relation between the window handle and the sound which something in its code is playing.. the audio card can't tell who wants it to play.
theoretically, there is an option to do what you want on web browsers, but it's not easy, and not 100%. it goes like this:
most of the audio that is playing from browsers are from known objects like wmp/quick time/vlc/flash/etc..
when the user will choose to mute all audio from firefox, your application will search those known objects in the firefox tabs, and mute/unmute them using their api.
in order to do that, you will need to write an extension to firefox, so you could have an access to the tabs memory from your application.
btw, what os?
and check this out: http://www.indev.no/?p=projects#flashmute (flashmute) i believe it does what is said - only for flash.
On Vista/Windows 7:
I expect there to be some API which can change the volume on a per process basis which the audiomanager uses. Should be relatively straight forward to use.
On XP
I don't think there is any built in functionality for what you want to do. I recommend just not offering that feature on XP. But if you really want to, there are some hackish solutions:
Usermode API hooking. Intercept the calls to audioapis with your own functions. These change the volume or manipulate the audiosignal so you get what you want. You need to do this differently for any of the several available audio-apis. I guess DirectSound and DirectShow are particularly annoying. And this requires injection of a dll into any process you want to manipulate. And this dll better not require the .net runtime. Search for IAT(import address table) or EAT(export address table) hooking.
Kernel mode audio hooking. Write a driver which intercepts the audio in the kernel and changes it on a per process basis. No clue how to do that.
But as you can see both solutions aren't good.