TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 01-14-2010, 08:01 AM   #1 (permalink)
The Wanderer
 
andformore's Avatar
 
Join Date: Dec 2009
Posts: 17
Thanks: 2
andformore is on a distinguished road
Default 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?
andformore is offline  
Reply With Quote
Old 01-15-2010, 12:15 AM   #2 (permalink)
The Addict
 
Join Date: May 2009
Posts: 287
Thanks: 5
adamdecaf is on a distinguished road
Default

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.
__________________
My Site
adamdecaf is offline  
Reply With Quote
Old 01-15-2010, 04:33 AM   #3 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by andformore View Post
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.
__________________

Village Idiot is offline  
Reply With Quote
The Following User Says Thank You to Village Idiot For This Useful Post:
andformore (01-15-2010)
Old 01-15-2010, 05:50 AM   #4 (permalink)
The Wanderer
 
andformore's Avatar
 
Join Date: Dec 2009
Posts: 17
Thanks: 2
andformore is on a distinguished road
Default

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)
andformore is offline  
Reply With Quote
Old 01-15-2010, 06:51 AM   #5 (permalink)
The Acquainted
 
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
maeltar is on a distinguished road
Default

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
Send a message via MSN to maeltar
maeltar is offline  
Reply With Quote
The Following User Says Thank You to maeltar For This Useful Post:
andformore (01-15-2010)
Old 01-15-2010, 07:01 AM   #6 (permalink)
The Wanderer
 
andformore's Avatar
 
Join Date: Dec 2009
Posts: 17
Thanks: 2
andformore is on a distinguished road
Default

Quote:
Originally Posted by maeltar View Post
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 View Post
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.
__________________
Something interesting... If you visit one of my sites today, you'll probably double my unique visitors for the day! Shameless Plugs:
My Blog My Octopus Game My Flash Card Website
andformore is offline  
Reply With Quote
Old 01-15-2010, 07:36 AM   #7 (permalink)
The Acquainted
 
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
maeltar is on a distinguished road
Default

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
Send a message via MSN to maeltar
maeltar is offline  
Reply With Quote
Old 01-15-2010, 07:37 AM   #8 (permalink)
The Acquainted
 
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
maeltar is on a distinguished road
Default

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
Send a message via MSN to maeltar
maeltar is offline  
Reply With Quote
Old 01-15-2010, 07:39 AM   #9 (permalink)
The Acquainted
 
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
maeltar is on a distinguished road
Default

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
Send a message via MSN to maeltar
maeltar is offline  
Reply With Quote
Old 01-15-2010, 07:51 AM   #10 (permalink)
The Wanderer
 
andformore's Avatar
 
Join Date: Dec 2009
Posts: 17
Thanks: 2
andformore is on a distinguished road
Default

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
__________________
Something interesting... If you visit one of my sites today, you'll probably double my unique visitors for the day! Shameless Plugs:
My Blog My Octopus Game My Flash Card Website
andformore is offline  
Reply With Quote
Old 01-16-2010, 01:30 AM   #11 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by andformore View Post
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 View Post
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 View Post
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.
__________________

Village Idiot is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
web application blueprint sarmenhb Advanced PHP Programming 2 11-12-2012 07:45 AM
New Application Framework logikit Show Off 8 12-31-2009 07:31 AM
New web application looking for some suggestions mike2098 Absolute Beginners 0 11-28-2009 01:45 PM
Flex Application - PHP russellharrower General 0 09-08-2009 04:46 AM
Notepage like application to open large MySQL files Wildhoney General 6 12-07-2007 02:18 PM


All times are GMT. The time now is 02:48 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design