Sunday, June 29, 2014

How to stop visitors from downloading online videos?

I don't want users to download my online videos to their computer?

Videos on internet can be effortlessly downloaded to your local drive using readily available tools. Several people however want to upload a protected video, something that they would like to sell to internet. Instances of such queries can be found on the first page of Google such as this and this and this . As several video hosting companies point out, videos hosted anywhere on internet can be downloaded. A suggested rule of thumb is that if you plan to protect a video of monetary value, the best you can do is keep it away from internet. But what good is a monetary value if the commodity itself is taken away from its market. Businesses and film makers urgently need a channel that protects their content from the time of uploading to the time when the video is streamed on viewer's device.

Stop video download to prevent piracy

The web is brimming with websites offering free download of any movie or TV series. The most video creators can do is take recourse to legal action, which is in itself ineffective when there are so many website mushrooming. You can not go on tracking and suing each one of them. Movie "Pirate bay Away from keyboard" laments this affairs of copyrights versus content-sharing. It points to the need for a technology of content broadcast which is secure in itself and does not need to fall back on any legal backing.

Some solutions for stopping video download

1. RTMP 

This is one solution that some video creators go for. Basic difference is RTMP protocol which is a different method of data transfer than conventional HTTP/HTTPS methods on regular web. Acronym for Real-time media playback, this requires a real-time streaming of media data. With a little obfuscation, you can even hide RTMP server and path so as to further prevent video leeches.
Pros: One-up security over regular HTTP methods
Cons 1: Real-time playback does not provide any buffer and slightly slower internet can give broken playback resulting in poor user experience.
Cons 2 : "RTMP Explorer", a simple, small software which you can simply download, run and play RTMP video, this software will download the video straightaway.
Cons 3: Incompatible with mobiles. This protocol can not be played on mobile browsers because of lack of flash player. Best you can do is create an app for mobile platforms or fallback to HTML5 which makes your video quite vulnerable.


2. HTTP Live/Dynamic Streaming(HLS/HDS)

Apple and Adobe have both their own versions of this protocol. Set up requires a dedicated media server and also some technical know how so that you can configure adaptive bit rates. It gives some option to include elements of encryption keys to protect media headers. 
However, even this is not so difficult to download. Somebody who can see what is happening can grab the video easily. Download-helper somehow failed to download as it is just an add-on with no file system access. There is also a PHP script to download and combine fragments of a HLS/HDS into a complete offline video file. Apart from this, there are some device compatibility issues with video playback. It is not able to run without a flash player or a dedicated app.


How VdoCipher tries to provide an easy to use DRM on videos?

Considering such need of premium video creators, we have built VdoCipher as a solution to streaming protected content on internet. An online video hosting service where premium videos can be streamed while keeping video immune to downloaders. The system ensures that every single video playback requires an authentication from back-end. There are libraries to be used with different languages such as PHP or ASP or you can always use API directly. For providing mobile compatibility, there is an easy to use interface where one can create custom apps with minimal knowledge of HTML. App can be compiled and exported for both Android and iOS stores.

Website is in early beta stage and there are some features such as App-Maker which are still not online. If anybody wants to try out, I suggest check out website www.vdocipher.com and contact via contact page. If you have any queries, please ask them in comments below.

I shall cover more on features of VdoCipher and its usage in a subsequent blog post.

Monday, February 10, 2014

Original Flappy bird apk download

Flappy Bird is a 2013 mobile game developed in Hanoi by Vietnam-based developer Nguyễn Hà Đông and published by .GEARS Studios, a small, independent game developer also based in Vietnam. The game, which was released on May 24, 2013, was removed from both Apple's App Store and Google Play on February 9, 2014 by the game's author.

"insanely irritating, difficult and frustrating game which combines a super-steep difficulty curve with bad, boring graphics and jerky movement" : Huffington Post
 
Download the apk here.

Warning: It's too hard to play.

Sunday, November 3, 2013

Apache errors after upgrade from 2.2 to 2.4, or upgrading ubuntu 13.04 to ubuntu 13.10

Today I upgraded my laptop ubuntu from raring ringtail to saucy salamander. After setting the desktop to the salamander wallpaper, I moved to my http://localhost, but alas! the apache configuration was not working. I was getting the default "It works" page from /var/www/index.html . During the upload process, I was asked whether I want to update the configurations in /etc/apache2/envvars and /etc/php5/apache2/php.ini. I had selected to upgrade both of them while noting down the previous customizations that will be lost. So, I set out to correct this new after upgrade error :

1. Bring back the customization removed during the upgrade process. I usually run the apache2 process by the normal user instead of www-data. Edited the /etc/apache2/envvars file to bring back old users.
Then changed the error reporting on php.ini files. Apache restart with sudo service apache2 restart. Check http://localhost/ , still getting  the default "It works" page. Moving on..

2. The vhosts not working :
The first obvious error was that none of the virtual hosts were working. After looking through the apache.conf file in /etc/apache2 I found the line :
Include sites-enabled/*.conf
This made it mandatory for virtual hosts files to have *.conf ending to be read as legit files. To correct this error, it is better to delete all links in sites-enabled/ folder. Then append .conf to the vhosts file inside sites-available/. Then enable each site one by one. Apache reload with sudo service apache2 reload Check http://localhost/ . New error : 403 permission denied. But I corrected the run user to the file owner, let's check the logs

3. The authz issue :
Going through the logs, error coming up was
[Sun Nov 03 18:02:27.790498 2013] [authz_core:error] [pid 5530] [client 127.0.0.1:50046] AH01630: client denied by server configuration: /home/vibhav/public_html/
So apparently, the line "allow from all" in vhosts was not working as it was working before. I went to the upgrading document of apache and found that some things have changed her. Instead of
order allow, deny
allow from all
The new configuration needed
Require all granted
 Do a sudo service apache2 reload again and head to http://localhost/ . It's all working.

This worked for me. If this is not all, please check out http://httpd.apache.org/docs/2.4/upgrading.html for the official upgrade documentation. If you are still having problems, please mention it in comments below.

Friday, June 21, 2013

Consciousness after resurrection

What if a dead person actually comes alive? What if some day a scientist is able to reboot the human body after it is dead. Will the resurrected person be like the normal person he was? What shall be the consequences on his physical and mental condition? Let's delve into the mind of a resurrected person.
Resurrection is an existing concept in movies and TV serials. In the practical world, however, it is simply impossible just because it has not been done ever. There might be a scientific theory behind that. For now, I decide not to believe in this statement. Let's consider a scenario where the technology is advanced enough to be able to resurrect a dead man. The concept is no longer far-fetched given that complex brain surgery is already done on animals. Stem cells and genetic research are taking us into a domain which was earlier attributed to the meta-physical. I have a belief it is not long when doctors shall be able to resurrect a dead man after creating the damaged or missing organs.

The human body is called alive when the brain (nervous system) and the heart (circulatory system) is in sync relying on each other for their functioning. A healthy person shall be one in which this relationship of heart and brain is able to drive the respiratory, digestive and excretory systems. The nervous system makes sure that the involuntary actions of lungs, heart and kidneys go on while it is these systems that keep the nervous system alive. When a person dies, this dependence breaks due to damage on one these parts, rest of the systems break down and the human is declared dead. In our situation, doctors shall have to repair the damages body parts that resulted in death (Almost every organ but brain can now be transplanted). They shall be able to then restart the symbiotic process of circulatory and nervous systems. The person now comes alive!
The brain that solves mysteries of the universe fails to understand itself.
Note that the person was dead a moment ago. Will he retain the memories? No, a brain is a set of neurons which are saving memories in electrical impulses. It needs continuous energy to sustain the memories even for the most basic system tasks. Much like a computer RAM, all it's data are gone the moment power goes off. The electrical impulses die away and the brain is mostly static. The brain memories are not like the magnetic dipoles on a magnetic disk. It won't retain any memory of the previous 'life session'. Here we make an assumption, we hereafter belief that upon resurrection, the brain shall still be able to sustain the involuntary life actions of respiration, blood circulation and digestion. Or we can assume that these actions are still being controlled by an artificial life support system. Now that the blood circulation restarted, the brain started functioning. But, there are no memories. I do not mean the memory loss as in the fictions and movies but a simple brain format (like the formatting of a computer disk). We just assume that the BIOS (involuntary life tasks) of this computer (brain) is separately installed.
PSM V26 D764 Longitudinal section through the center of the brainAt t=0, reboot finished, blood circulation in brain is normal and reached a steady state.
The brain is static, no neuron activities, and extremely low level of feelings. Consciousness does not exist now. By consciousness, I mean a state of 'brain' when one part of it is able to assess its existence, or it is able to generate impulses in response to another set of impulses. This way it think what kind of thought is going on. This state of consciousness, or a general term called feeling, is completely absent in the subject. All over the bodies, neuron sensors have just come alive and have started responding to the external environment. These shall send electrical signals to the brain and enliven the static neurons of the brain. The brain shall now start 'working'. What will it be thinking?

The model of the brain we shall be using in this discussion: Let us consider the brain as a neural network, the one from computer science, a vast array of independent neurons sending each other signals based on the signals they receive. The only difference is that this one is sending analog signals instead of binary and the back-propagation mechanism is much more multi-directional giving a much faster computing power (It is worth noting that a neural network in comp. science does not compute, it receives values as signals and tries to adapt itself to the signal thus recognizing patterns and then it starts predicting the next value).
Neuron in tissue cultureWhenever this neural network receives a signal, it processes it and stores it. The next signal might be of a similar nature. Then the pattern has been recognized and is running in the cache (the currently active thought). Now, when the third signal arrives, the brain predicts the signal. If the received pattern is similar to what the predicted pattern, it releases some chemical to feel good and another part of the brain might start a small impulse to record this feeling, As an example, on touching four parts on the wall, a brain can recognize the fact that it is a plain two-dimensional rigid obstruction, it predicts the sense of touch when the fingers touch new part of the wall and this further strengthens the belief or the recording impulse that it is indeed a wall. This is how the predicting and object creating operates in our model of the human brain. The feeling of curiosity is propelled by the fact that brain loves repeated signals. The feel-good chemical released during the formation of a new memory has already taught the brain to learn new things. Over time, this feeling is often suppressed by thoughts more relevant to the new memory in question or just that this feeling becomes far less than many other feelings.
Back to the subject: So our neural network has just started receiving the starting signals. They shall start storing it in the neuron impulses. A few of these signals shall remain on the brain as a memory of these patterns. The person will start to decipher the signals. Based on the signals, he shall start to construct a model of the world around him. He may take time to open his eyes. He shall perhaps keep his eyes closed with no reason to open his eyes.

The person's back can sense the feel of the soft thing he is lying on, he can feel the heat of the atmosphere, the eyes has not yet opened but the light beyond has already struck chords on the cones of neurons on the retina. The fingers of his hand seem to come I contact with something. The sensitive fingertips are never late to send the sense of touch. After creating a mind model of the material in hand, the curious brain wants to get hold of this texture which is soft. If only he could just grab a little more of the material, he could discover this new pattern, this new thing, a new entity in his brain. And then something weird happens, a sense goes through his arm and the hand moves, the fingers curl on the object. Fingers move by his will, yes he can move, he has a hand which moves at his will. The feeling part of the brain gets excited, it releases the feel-good chemical into the nearby blood-vessels which makes the whole brain get excited, it makes the whole brain take an extra effort in their work. The fingers have sent a new signal, he is now holding a piece of his own bed-sheet in his hand. It feels good!! I have an arm with wrist and fingers at my command, it feels good. The excitement chemical is high in the blood around the brain, This is specially high in the area around the part which controls the hand and the finger tips. It no longer wants to restrain itself. The response from the brain is high this time. The consciousness has still not fully understood the idea of a limb. It has no control over it. The brain at his free will commands the hand to move in a random direction. The person flings his arm. This is useful as it helps him understand himself.
You might be thinking the subject is much like a baby who has just came out of womb, swinging arms and legs around, looking around curiously amazed, innocence and curiosity are visible on the face. The situation must be actually quite similar. The difference however, is more interesting. Our subject is a grown up man. His needs might be limited to food and warmth like an infant but his limbs and body are better formed. His unpredictable curious activities can be destructive like a child with a larger scale. The subject might need to be kept in constraint, may be hand-cuffed. I am quite sure when a grown up behaves like a child literally, the scene is hardly as cute as in the case of babies.
There is one more difference, our subject is a grown up man/woman. This person shall have fully developed sexual organs and thus have the capability to sense sexual feelings. His/her organs will be capable of the sense of arousal. The subject will not take time in discovering a body part with such an intense sense. The curious brain will like to discover the organs. The person will touch his/her organs and try to understand the mystery of intense sense of touch. It is safe to assume the person had not seen or observed the existence of two types of human body. He might just be too busy with his existence and understanding the new and varied stimuli he is suddenly exposed to. He shall understand more when he gains mental age and observe human society.
The person shall slowly learn to stay calm, feel hungry and understand his surroundings. The mental age of this person is equal to a new born. Unable to speak and communicate, the person shall just lie down and get active on feelings of thirst, hunger, pain etc. To further develop his mental age, he can be forced to situation where he need to be learn to communicate, he shall start to learn to speak like a little child in perhaps the same time period. In a way, it can be really embarrassing for a person to be a grown up with a mental age of a child. Being exposed to conditions where a lot shall be expected of him being a grown up might give him embarrassment or compel him to increase his mental age depending on the view of the world he would had upto that moment.
For the person, the life would be like being born in a grown body without a childhood. The language and analytical skills shall develop with time. It's hard to say the time required for a person to bring his mental age to his chronological age.
What if this is actually possible?
I think that in such an event the person must not be exposed to the plethora of senses around him. To control his senses, he should be kept under a sedative and he should be exposed to a slow and mild surroundings. The person might be kept with his eye covered. Sedatives can be used to keep a large part of his body unconscious. The exposure to senses must be slow like a baby developing in the womb. Like a fetus, he shall slowly embrace the senses and develop a stable life sustaining nervous system before actually feeling his limbs and looking with his eyes.
The exposure to the visible world must be even slower, this grown up man is more powerful than a child and his senses might be a little more developed. The person can be allowed to see the world while a greater part of his body should lay unconscious

Da Vinci Vitruve Luc Viatour colouradjusted crop240Ethics, Morals, religion and stuff!! : If possible, the process shall be the subject of a fierce controversy. The person who is resurrected is no longer the person who died. He is just a new life, a new person. This stuff is way more than sufficient to blow any medical-ethical person out his minds. Personally, I don't think it should be done even for one single time. For first reason, the person is not the same. He is a new born with the body of the dead. Second, the person shall be resurrected for no reason but for scientific experiments. Consciousness, I think is nothing but a collection of neuron impulses, is still the most sacred thing in the universe. It's the thing that drives a lot of species on earth. It gives us the feelings that we live for. It is the sole purpose of a species life. It should not be for experiments. Thirdly, the person shall come alive being the object of an experiment. I cannot even think of the thoughts in the dead person's relatives but the idea of a new person in the body of the dead is itself creepy. The new person without any relationships cannot have a happy life. Perhaps I believe in the epicurean philosophy, the thought itself is very repelling to me.

Friday, May 10, 2013

Displaying PHP file as it is executed, creating data streams in PHP

PHP allows you to display data as it is generated on the server, so while your PHP file is still being executed, the display begins and this feature can be put to some real dynamic uses. I shall cover a few of these applications and let you make more ingenious things.

Here is the code for generating PHP data stream using the flush buffer command.




1. Creating continuous data streams

2. Making synced chat