 |
Account Login
|
 |
 |
Latest Articles
|
 |
 |
IRC Channel
|
 |
 |
Associates
|
 |
 |
Associates
|
 |
|
 |
 |
|
 |
01-14-2010, 08:01 AM
|
#1 (permalink)
|
|
The Wanderer
Join Date: Dec 2009
Posts: 17
Thanks: 2
|
A Volume Adjusting Application?
Hey everyone.
I was just wondering about the feasibility of a program that detects when a flash video is playing an advertisement and then mutes the computer until the end of the advertisement. Ideally it would play some music and darken the screen too.
Is this possible? It seems that if its possible to do the detection, the other stuff would be possible.
Does anyone know what language would be best to do such a thing in? I mostly program in php but can do some java too. Is java capable of it? I'm assuming so, but I dont know how.
Thoughts?
|
|
|
|
01-15-2010, 12:15 AM
|
#2 (permalink)
|
|
The Addict
Join Date: May 2009
Posts: 287
Thanks: 5
|
I'm pretty sure that Java can't do that, your best bet would be something like C++ which checks the running processes or the current output to headphone jacks.
Otherwise, Javascript will be able to stop any .swf files and show an overlay. On clicking "ok" on the overlay it could load the .swf.
|
|
|
|
01-15-2010, 04:33 AM
|
#3 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
|
Quote:
Originally Posted by andformore
Hey everyone.
I was just wondering about the feasibility of a program that detects when a flash video is playing an advertisement and then mutes the computer until the end of the advertisement. Ideally it would play some music and darken the screen too.
Is this possible? It seems that if its possible to do the detection, the other stuff would be possible.
Does anyone know what language would be best to do such a thing in? I mostly program in php but can do some java too. Is java capable of it? I'm assuming so, but I dont know how.
Thoughts?
|
This can not be done from any web based language or client side script. Also, how would you distinguish a flash ad from a flash game or some other legit purpose? Keep in mind virtually every video sharing site like youtube uses flash to play videos.
It would be more feasible to crate a computer program at at the click of a button could do that. This way you would not have to decipher what is and is not legit, you would only have to do the process itself. This could probably be done in any computer programming language. If your purposes are exclusively Windows, I would recommend VB.net due to its easiness.
|
|
|
|
|
The Following User Says Thank You to Village Idiot For This Useful Post:
|
|
01-15-2010, 05:50 AM
|
#4 (permalink)
|
|
The Wanderer
Join Date: Dec 2009
Posts: 17
Thanks: 2
|
Hey guys, thanks for the replies.
Your question about distinguishing between ads and legitimate flash would definitely be the hardest part. I noticed that sites like hulu and comedy central seem to crank up the volume on ads, so I was hoping it would be possible to detect some type of pattern with the volume or other variables that could accurately distinguish between the two.
Now that I think about it, it seems like if it were possible to detect this it would be so unreliable that it wouldnt work in the great majority of cases.
I like your idea about the button though. That was my first idea, but I realized that when im actually watching a streaming show, I'm usually at least 10 feet away from my monitor.
What about a wireless mouse or keyboard or some type of bluetooth device to tell the computer when to switch to "ad mode" and when to switch back? I know some people have controlled their computer via wiimote before, and that would be awesome.
Lately all I use is linux, so I want to figure out how to write something to work in it. Which language would be best? I knew that web languages dont do this sort of thing which is why I was considering java.
So, would it be simple to make a java app that runs on startup, waits for a particular input that comes from a wireless device, and then plays music and darkens the screen when its told to? I dont know where to start, but i guess i'll start with google.
Thanks again for the responses.
(P.S. whats with the session timeout length for this site? I was logged out by the time i finished writing my post lol)
|
|
|
|
01-16-2010, 01:30 AM
|
#5 (permalink)
|
|
Wizard
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
|
Quote:
Originally Posted by andformore
What about a wireless mouse or keyboard or some type of bluetooth device to tell the computer when to switch to "ad mode" and when to switch back? I know some people have controlled their computer via wiimote before, and that would be awesome.
|
There are a number of ways to go about this, using a pre-existing product would be acceptable but could interfere with that product's normal use (such as a slideshow clicker). If you were to make your own device, you would need a good knowledge of electrical engineering and driver programming.
Quote:
Originally Posted by andformore
Lately all I use is linux, so I want to figure out how to write something to work in it. Which language would be best? I knew that web languages dont do this sort of thing which is why I was considering java.
|
There is no "best" language, java may be a good choice but keep in mind that the Java VM has to be running so it could slow down a machine when running in the background.
Quote:
Originally Posted by andformore
So, would it be simple to make a java app that runs on startup, waits for a particular input that comes from a wireless device, and then plays music and darkens the screen when its told to? I dont know where to start, but i guess i'll start with google.
|
I could not imagine it being too easy, the first thing you need to do is get some tests going with input reading, then separately develop the intended effect. When you know both, integrate them together.
|
|
|
|
01-15-2010, 06:51 AM
|
#6 (permalink)
|
|
The Acquainted
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
|
maybe worth having a look at a Media PC remote control device, then you can rewrite/hack the driver on your linux box ?
The way I see it if you are trying to click a button on your screen to put it into "add mode" you are going to have to move the cursor.. With a media remote, you can hit a button and maybe bring up the screensaver.. Just a thought, how are you going to know when the advert is finished ???
__________________
Thanks... Simon
Sex, Drugs & Linux Rules
|
|
|
|
The Following User Says Thank You to maeltar For This Useful Post:
|
|
01-15-2010, 07:01 AM
|
#7 (permalink)
|
|
The Wanderer
Join Date: Dec 2009
Posts: 17
Thanks: 2
|
Quote:
Originally Posted by maeltar
The way I see it if you are trying to click a button on your screen to put it into "add mode" you are going to have to move the cursor..
|
Thats true, I don't want to have to move a cursor which is why I was thinking maybe it would be best to use a wireless keyboard and use a hotkey combination or else the wiimote would be cool too. I'll definitely look into your recommended Media PC Remote.
Quote:
Originally Posted by maeltar
Just a thought, how are you going to know when the advert is finished ???
|
Haha, A very valid question indeed. I was thinking that either I'll be able to determine their length if all of them are the same length or else the screen must be dimmed only partially so i can still see when the show comes back on.
I only really watch streams on hulu lately, so I dont have a problem with hard coding it to work only for that site. This would make things simpler. All this stuff seems quite tricky though, I wonder if i could do it.
Also, budget is about zero bucks since im currently unemployed.
|
|
|
|
01-15-2010, 07:36 AM
|
#8 (permalink)
|
|
The Acquainted
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
|
Zero budget eh... ok, what you like with a soldering iron.. A quick goole I found..
http://www.instructables.com/id/IR-R...your-Computer/
Maybe you could knock something together like that and write a C++ driver, "shouldn't" be too hard given the nature of linux and the supporting community, am should you would find help or even someone who would do most of the work as it's a good idea...
I'd would suggest that the adverts are a set length, as most people sell advertising based on time, so you could in theory hit button on the remote that starts a timer of sorts which blanks the screen plays some background music (easy enough in a bash script) for a set length of time, and then revert back say maybe 2 secs before the end of the advert..
__________________
Thanks... Simon
Sex, Drugs & Linux Rules
|
|
|
01-15-2010, 07:37 AM
|
#9 (permalink)
|
|
The Acquainted
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
|
Zero budget eh... ok, what you like with a soldering iron.. A quick google I found..
http://www.instructables.com/id/IR-R...your-Computer/
Maybe you could knock something together like that and write a C++ driver, "shouldn't" be too hard given the nature of linux and the supporting community, am should you would find help or even someone who would do most of the work as it's a good idea...
I'd would suggest that the adverts are a set length, as most people sell advertising based on time, so you could in theory hit button on the remote that starts a timer of sorts which blanks the screen plays some background music (easy enough in a bash script) for a set length of time, and then revert back say maybe 2 secs before the end of the advert..
__________________
Thanks... Simon
Sex, Drugs & Linux Rules
|
|
|
01-15-2010, 07:39 AM
|
#10 (permalink)
|
|
The Acquainted
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
|
WoW.. Maybe I should have read the page properly... Thats for Windows...
have a look here instead.. http://www.lirc.org/
__________________
Thanks... Simon
Sex, Drugs & Linux Rules
|
|
|
01-15-2010, 07:51 AM
|
#11 (permalink)
|
|
The Wanderer
Join Date: Dec 2009
Posts: 17
Thanks: 2
|
Hmmm, your second link looks promising. Having a remote control which executes commands would be good for this application as well as other cool things, like controlling a music library from accross the room. I'm definitely gonna look into this, but not tonight since im going to bed soon. Lets keep this idea alive though, if it worked it would be pretty awesome I think
Edit: oh yea, zero bucks is a little bit of an exageration, i could spare a few if it was promising 
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|