Is there a HTTP Request header that indicates that browser wants a low-bandwidth or low-power version of the webpage? - http

Recently, I was solving the problem of disabling a background video if the user was on a mobile device. Not only were the solutions very hacky, but they weren't even the right solutions. Instead of checking whether the device was a mobile, what I really wanted was to know whether the device prefers a low-bandwidth, low-battery usage version of the page.
It seems like this is a recurring problem: Don't send retina images for a low-res phone, Don't show HD videos on a low-bandwidth connection, Don't use highly-detailed textures while playing a game etc. Also, even for the same device, these preferences pay change with time - say when the mobile has a wi-fi connection and it can handle more bandwidth or the mobile is plugged-in so that battery usage is less of a concern while playing a WebGL-based game.
So, I think the browser should indicate such preferences to the server with each request. The browser has the best information at all times. Relying on User-Agent detection seems inappropriate because it remains the same in both the above cases - when the connection type or power status changes.
Is there any web standard, a request header perhaps, that indicates browser's preferences like the above? Are there plans to develop such a standard?

This video by Brad Frost, as well as his blog contain heaps of information on this topic.
The short answer to your question: no. But for further reference, in this question are a number of methods you could try.

Related

Browser HTTP connection limitation and YouTube

I'm developing a service where people can stream multiple audio files at the same time.
Unfortunately, when streaming about 4 streams simultaneously, Chrome's HTTP connection limit seems to kick in: new stream requests only arive at the server when a previous connection was closed.
Interestingly enough, I can play 10+ videos at the same time on YouTube.
What kind of technique could YouTube have used here to circumvent the browser's simultaneous http connection limit?
The crucial point here I suppose is that YouTube streams are not directly controlled by the browser, they are embedded Flash players which use streams that are handled by Flash. If you want to hand off the streaming process to an external app/library (Flash, Java etc) you can circumvent these limitations quite easily.
The other point is that YouTube has a huge CDN, so there is no guarantee you're getting any two videos from the same server, which would also help to circumvent concurrency limitations (to a point, at least).
I'm not surprised that Chrome stops you after a while because Google did a load of research and experiments regarding browser concurrency and relative efficiency a while ago, and I remember reading somewhere that they concluded that 3-4 concurrent connections to the same server represented the the most efficient data transfer architecture over straight HTTP. Annoyingly, I can't find a reputable source to reference with that (although I got it from one in the first place), however this is related and probably part of the same research program.
This is also the sort of research Facebook get quite heavily involved in, and you might find some useful information in over at http://developers.facebook.com/ if you can be bothered sifting through the rubbish to find it...

Adobe Air: how to limit download speed?

Is there any possibility in Adobe AIR to control bandwidth usage with AIR when downloading a file using URLStream?
Short answer, you can't. It is not Air's purpose to 'limit' any kind of downloads (and I don't get why you would in the first place...) since if you're going over HTTP it actually uses the OS' default browser.
The only way you could limit it is by create a Socket and try to implement an HTTP protocol within that or implement your own protocol. Frankly, I wouldn't even try. I don't see much use for limiting bandwidth for download...
you can try and check if NetLimiter can handle this. Here is the link
http://www.netlimiter.com/
Hope this helps.
"eats all available traffic" is a good thing on the client side.
If a stream download speeds becomes slower then the time played the user will have to wait for buffering and this would be bad.
Your best bet is detect the speed of DL and if it lesser then XXX have it download a lower rez video. To do this you will need to have a few versions of the file on the server. This allows the client to get optimized speeds. You can also allow the user to override it To get HD quality if they really want to see high def

Identity Information over HTTP?

If a person clears their cookies and changes their IP address, is there ANY way for a website to identify that computer as a computer that has "been here before"? In other words, no identifiable information like MAC can ever be known over HTTP, right? (I've looked through the list of headers and only see cookies and user-agent).
Also - same goes for a mobile device. If the mobile clears cookies, is there any way to identify it as a repeat visitor?
Thanks!
Chad
If you look at a site such as browserspy, you will see that a website can find out quite a bit more from a browser then the stuff you see just by looking at your request headers. And security researchers have done some investigation of the idea of uniquely identifying a browser based on those characteristics (e.g. what plugins you have installed, what fonts you have installed, etc.). But nothing like this is truly reliable (for one thing, much of this will change simply by switching to a different browser on the same computer). There is certainly no "official" unique identifier such as a MAC address.
Not at the application level. As you correctly determined, the user can change everything that is sent in an HTTP request.
As for the MAC address, the MAC address is used in the link level of the internet protocol. It is not transmitted along multiple hops when making any sort of internet communication, thus unless you are 1 hop away from the client, you cannot use this information either.
Bottom line, can't really be done. If someone really wants to be forgotten, then they will be forgotten.
There are other ways to identify individual users without cookies -- based on a variety of information leaked by the browser and associated plugins. Check out Panopticlick for an example. It's probably not as effective with mobile browsers because (as far as I know) they don't have plugins like desktop browsers.
As others have said, no, there's nothing you can do for normal browser access.
For mobile devices (at least via WAP) there is an extra CGI parameter (the name of which escapes me) which the gateway is suposed to populate with an identifier which is unique to that mobile devices phone number - however implementations vary.
C.
If there were a (toggle-able) program available that would intercept the requests for the font-list at the O/S level, and return a bogus list, resembling a machine's list right after the O/S has been installed -- and perhaps the list could be modified slightly each time by including or excluding some randomly chosen font not from the basic list-- then a huge percentage of the identifying bits could be removed from your browser's "fingerprint", and you're no longer uniquely identified but blend in better with the herd or the flock.

Flash Media Server: Trouble with recording 2 audio/video streams at the same time?

In short
For a project I need an audio/video-chat for 2 people, with the ability to record (part of) the session. I am running into issues where the 2nd user's recorded video gets messed up, with massive amounts of (seemingly) skipping frames and/or audio loss, most likely caused by the audio stream (when not recording the audio, the problem doesn't appear to occur).
Overview
For a project I need a setup where two clients can video(+audio, obviously :) chat with one another. Also, the 'host' should be able to record the session when (s)he presses a button, and stop recording in the same way.
While this setup is far from rocket science, I've been experiencing issues that I can't seem to figure out. The clients connect fine, and each other's videos show up propely and they can even hear each other just fine. I chose to re-initialize the connection when the host starts the recording, which also works just fine. The recorded files, however, at times experience issues.
The possible cause
Usually the hosts' recording is great, with audio and video working as it should. The client video shows problems, with the video literally jumping when played back (in a number of applications such as VLC, KMPlayer, Adobe's own media player, etc.). I tried to debug the situation and it seems to be directly related to the audio, though how this happens I'm not sure. When I did tests with no recorded audio, both videos played back fine.
The problem
I'll try to explain what happens in the client video; the video plays back normally, with audio working fine too. But in seemingly random locations of the video, playback suddenly skips seconds of the video (and audio), so a one minute video sometimes lasts mere seconds (even though the playback bar and the such show that the video in fact lasts for a minute).
I have not found any logic in how it skips --some videos show only 4/5 gaps of a few seconds each, others jump 20-30 seconds ahead--, so I'm assuming it's a random thing.
Scenarios
I have tested multiple scenarios, and the problem seems consistent enough (as in, it occurs every time, just not when I dont record audio). I have used a local (developer edition) FMS server, the hosted influxis service, and I have used two local computers, one local machine (using 2 webcams) and 1 local, 1 (really) remote computer. All setups seem to have the same issues with the recorded (client) video.
In closing
I'm not sure what details you need, so please, ask me for anything you might need to help me find a solution to this. I have searched and debugged like there was no tomorrow, and haven't been able to figure out what is causing this.
Many, many thanks in advance!
-Dave
I've had some pretty extensive experience with FMS and specifically with influxis... Also did recording of both audio and video as the system I had needed it for security reasons. However, in all cases the video and audio were recorded on the server - not on the same machine as either client.
The issues I've seen include a vast amount of tweaking of both audio and video quality - to find the correct mix to get optimal results. That's where I'd start, adjust quality down and see where that gets you.
For a test environment, I'd suggest using different machines so the CPU doesn't become your issue - as the actual environment would have the clients on different boxes with more CPU.
Contact me with addition information, etc - I and several friends have a system working and I'm happy to help.
<>
Looked over my notes - we were able to talk to influxis about the lagging audio - and there were a couple of server setting they played with AND it was our frames-per-second and other quality guys...
I'm not sure if my problem was the same as yours, but we found a solution.
The flash piece needed to set the silence level (setSilenceLevel) such that it didn't insert audio packets that signal no audio. These audio packets caused recording problems that produced random skips and audio drops.
Dave, have you ruled out latency? are the computers with both cams connected to a high speed network? I would also check the processor utilisation on the machine which is recording.

Is it possible to downsample an audio stream at runtime with Flash or FMS?

I'm no expert in audio, so if any of you folks are, I'd appreciate your insights on this.
My client has a handful of MP3 podcasts stored at a relatively high bit rate, and I'd like to be able to serve those files to her users at "different" bit rates depending on that user's credentials. (For example, if you're an authenticated user, you might get the full, unaltered stream, but if you're not, you'd get a lower-bit-rate version -- or at least a purposely tweaked lower-quality version than the original.)
Seems like there are two options: downsampling at the source and downsampling at the client. In this case, knowing of course that the source stream would arrive at the client at a high bit rate (and that there are considerations to be made about that, which I realize), I'd prefer to alter the stream at the client somehow, rather than on the server, for several reasons.
Is doing so possible with the Flash Player and ActionScript alone, at runtime (even with a third-party library), or does a scenario like this one require a server-based solution? If the latter, can Flash Media Server handle this requirement specifically? Again, I'd like to avoid using FMS if I can, since she doesn't really have the budget for it, but if that's the only option and it's really an option, I'm open to considering it.
Thanks in advance...
Note: Please don't question the sanity of the request -- I realize it might sound a bit strange, but the requirements are what they are. In that light, for purposes of answering the question, you can ignore the source and delivery path of the bits; all I'm really looking for is an explanation of whether (and ideally how) a Flash client can downsample an MP3 audio stream at runtime, irrespective of whether the audio's arriving over a network connection or being read directly from disk. Thanks much!
I'd prefer to alter the stream at the client somehow, rather than on the server, for several reasons.
Please elucidate the reasons, because resampling on the client end would normally be considered crazy: wasting bandwidth sending the higher-quality version to a user who cannot hear it, and risking a canny user ripping the higher-quality stream at it comes in through the network.
In any case the Flash Player doesn't give you the tools to process audio, only play it.
You shouldn't need FMS to process audio at the server end. You could have a server-side script that loaded the newly-uploaded podcasts and saved them back out as lower-bitrate files which could be served to lowly users via a normal web server. For Python see eg. PyMedia, py-lame; or even a shell script using lame or ffmpeg or something from the command line should be pretty easy to pull off.
If storage is at a premium, have you looked into AAC audio? I believe Flash 9 and 10 on desktop browsers will play it. AAC in my experience takes only half of the size of the comparable MP3 (i.e. a 80kbps AAC will sound the same as a 160kbps MP3).
As for playback quality, if I recall correctly there's audio playback settings in the Publish Settings section in the Flash editor. Wether or not the playback bitrate can be changed at runtime is something I'm not sure of.

Resources