IE8 falls below 10% usage world wide.
HTML5 Video has not been able to show its potential because of the large numbers still using IE8. Yes there are solutions to show a video by embeding it in Flash for IE8; But, HTML5 video can go beyond just showing a video.
Exposing controls to a video to script on the page allows the video to be interactive with other content on the page or interactive outside the video box. Site menus for example can turn on or switch video content based on where the user is focused via looking at scroll bars or where the mouse is on the page.
One a related note Netflix drops silverlight and moves to HTML5
The major objection to HTML5 video is protecting or preventing the video from becoming copied. However that is being solved.
Editing a scene in a video with avisynth plus.
As pointed out in an early post Avisynth can read a video file and present it to other tools for editing. To pull out a single scene the function is trim … Use as follows …
AVIsource("example.avi").trim(150,300)
That script will produce frames 150 to 300 from example.avi … use any other video program to edit the clipped scene or create a new one. to combine the video with the clip using the original video sound track. use the following …
v = AVIsource("example.avi").trim(0,150)
\+ AVIsource("newscene.avi")
\+ AVIsource("example.avi").trim(300,9999)
a = AVIsource("example.avi")
AudioDubex(v,a)
This is a more than single line script.
On the first line we assemble the video as a variable v. we want only replace frames 150 through 300. So we get the original begining. Then add the replaced Scene. And finally add the end from our original clip.
The second line pulls out the audio from the original clip.
The last line combines the video and audio back into a video output. I am assuming the replacement scene is 150 frames, if it were not the audio would go out of sync with this script by the number of frames that is different. That of course can be corrected in the script with more lines of code. Or the audio could be included with the replaced scene.
Having the audio be part of the replaced scene would make the script be one line of adding three sources.
AVIsource("example.avi").trim(0,150)
\+ AVIsource("newscene.avi")
\+ AVIsource("example.avi").trim(300,9999)
No need to use variables in that case and the length of the replacement scene can be any length.
Note \ allows you to use the next line to continue to format the code for readability.
Note the two following scripts are produce the same results.
AVIsource(“example.avi”)
and
videovariable=AVIsourc(“example.avi”)
videovariable
What gets supplied or returned by AVIsynth is the last or final video.
Using AVIsynth as a source for other video production tools.
I am one of those people who tends to ask the question, “how can it be made better?” More often than not the answer is by using more than one program to produce a binary product. Debugmode’s Wax 2.0 for example interfaces with their winmorph application and provides what people may call photoshop morphing to video objects. Winmorph can also create video clips from two photo graphics morphing from one image to another … the CG effect is commonly used to go from one person’s face to another; However, winmorph is not limited to faces. Wax 2.0 itself has native perspective filter to place a video on a flat surface within another video, such as a TV screen in the video.
Winmorph can be used with any two images to create a video of an object moving or morphing; Or, use a single image and move say ocean surf, flags, or trees of a static image and change it into a moving image. Fake, (or create the effect using CG), of a moving camera by morphing 3d objects to create the illusion that a series of flat frames is a 3d object because the texture of the flat image is moving … note the illusion of a rotating image can be better understood if one considered the effect on the brain of a shadow of a rotating object. The shadow appears to rotate in one direction and then rotate in the other direction but when texture is added the movement of the texture completes the illusion that a actual object is rotating and tells the brain which direction it is rotating in.
The difference between a video of a rotating object created by cg and a camera is where the illusion is created – both create the illusion on the screen. A video is nothing more than a series of static images.
AVIsynth has a lot of powerful video features. I am not discounting it as a stand alone system but am looking to produce binary products with more features than are available with any one program, and quicker production times. Wax reads uncompressed video, which is best for production, but sometimes video is available in a compressed format like flv and the clip being produced does not exceed the quality of the flv. In that case video may need to be converted.
AVIsynth converts video in real time to other formats needed by other programs. It even works good for the minor task of using windows media player to play flv files. Just open the example.avs script below in windows media player.
Say for example there is a green screen behind a subject and the video is available as flv. Wax has a good green screen ability and perspective so that it is able to fill in that green screen with any video.
The AVIsynth script to use and convert a flv files is one line of code. Place this code in example.avs
DirectShowSource(“example.flv”)
Open Wax and use example.avs, as the video source, add the video you want to use for the green screen, apply the prospective to the video for the green screen and apply the green screen filter.
PHP Development Web Server.
As of version 5.4.0 PHP provides a built-in web server invoked via a command line switch. The command line switch can be used in a desktop shortcut by adding it to the target property “C:\PHP\php.exe -S Localhost:80″. URI requests are served from the current working directory or the start in directory “C:\xampp\htdocs\seobydesign” another property of the shortcut.
Since PHP does not require any actual installation, just be unzipping the current archive and building a shortcut the web server is fully ready to go.
I would not except any major mentions of the web server on most development blogs. Most developers have versions of Apache running as development systems, and most servers on the internet are Apache based. Apache has many configuration options, as well as htaccess configuration, and can handle a large number of connections simultaneously. The built in PHP web server on the other hand takes very little system resources. On the fly configuration can be done by using a php script referred to in the documentation as a “router” script.
Out of the box the built in web server handles php scripts and static html and web assets. No mySQL server is provided – although mySQL servers can be installed independently. Around 25% of websites use some sort of CMS system, and 4 out of 5 of them use WordPress. WordPress uses htaccess, modredirects, and mySQL.
Still the ability to have a localhost web server up and running in less than five minutes with PHP applications makes this server very interesting. I assume the php and the html could be loaded from a CD or a memory stick.
De-mystifying full screen fluid designs with fixed width sidebars.
Layering of content has been available for years. Using CSS non default positioning it is possible to place a layer of content on top of another layer of content. The top left position for a absolute element would be the first parent that has its position set to absolute or relative. So a quick and simple method of creating a fixed sidebar would be to create a parent with a margin or border with its position set to relative and layer the absolute block into the left or right padding or margin space.
One aspect of absolute positioned content is that it does not create scroll bars when it is positioned off of the used area of the screen. An absolute positioned sidebar in a relative positioned parent only works if the parent will always be taller than the sidebar. In many situations that can easily be created. Relative positioned content works a bit differently in that is uses screen space but can be moved out of its screen space causing it to layer or overlay content next to it. Content can spill over the side of a relative positioned element on top of other content as well.
If one must design a page where the sidebar is the longest element than a wrapper can be used with a relative positioned block. Create a parent with padding for the sidebar. Float a wrapper block to the side with a width on 1 pixel, (note this 1 pixel element will become a 1 pixel border next to the padding declared. A relative positioned block can now be dropped into the wrapper with the width of the padding relocated on top of the padding.
Another alternative to layer content is to adjust the left margin of the content. This method is most common because it does not require the use of a wrapper block.
With CSS3 fluid and fixed with elements become easier to work with. The width of an element can be set to 100%-300px leaving 300 pixels for material that can be placed on the side. Until it is implemented the secret mixing fluid with fixed with is layering of one sort or another.
<div style=”width:auto #default for most blocks;padding-left:150px;background:silver”>
<div style=”float:left;width:1px;height:auto”>
<div style=”position:relative;width:145px;left:-150px”>
This sidebar will activate the scrollbar
</div> <!– end sidebar –>
</div> <!– end sidebar wrapper –>
This is textbook layering but adjusted to take horizontal screen space.
<div style=”clear:left”> <!– this pulls down the background of the parent divide to the end of the sidebar divide –></div>
</div>
<div style=”width:auto;padding-left:150px;background:silver”>
<div style=”float:left;margin-left:-150px;width:145px;”>
This sidebar layers on top of the padding of the parent,
but does not use the CSS position property.
</div> <!– end sidebar –>
This is a layering method that does not use the CSS position. While it is rarely used
for layering it is the most common for sidebars.
<div style=”clear:left”> <!– this pulls down the background of the parent divide to the end of the sidebar divide –></div>
</div>
<div style=”width:auto;padding-left:150px;position:relative;”>
<div style=”position:absolute;top:0px;left:0px;width:145px;”>
This sidebar may fail to activate scroll bars, does not pull down parent backgrounds, can also
overlay on top of footers. Because it does not cause the parent element to expand.
</div> <!– end sidebar –>
This is textbook layering using position relative and absolute css, but it is problematic
if used to create sidebars. The secret of fluid designs
with fixed sidebars is a layering method of one form or another.</div>
Using simpleXML instead of MySQL for applications that don’t use SQL
There is a large number of online applications which get data from the web and dynamically place it on a web page. One method to do this is PHP and MySQL but it is not the only method. Web developers should be able to offer more than one solution to a problem. For Dynamic web sites there are many methods and solutions all with pros and cons.
The advantages for MySQL is that one can search a large table of data. But for say client records themselves where the record is identified in the URL, there is no need to search and in fact searching would cost performance. If these records contain a mix of data such as videos it is best that these records have a directory on the server instead of a record in a MySQL database. A simple CMS system for example does not benefit by calling a mySQL database to open the files on a server then search those files until it matches the record identified by the URL. Using the URL to directly identify the location of the record on the server reduces the work done by the server.
There are A few things PHP simplexml should have such as the ability to delete a node and to move a node from one XML file to another, just for starters. However, you can import SimpleXML files into dom and do all of the more complicated XML data manipulations … Here is an example code snipplet from a backend contact management program being developed. The number of records should not be more than one person can go through and respond to in a day. No sorting is required the records are maintained in FIFO, and the hope is that the leads become clients.
if ($makehot) {
foreach ($hotLeadsXML->request as $request) {
if( $request['id'] == $makehot) {// get child + children to move.
$node = $request->asXML();
$nodeXML = simplexml_load_string($node);
$nodeDom = dom_import_simplexml($nodeXML);// place the leads XML file with children.
$leadsDom = dom_import_simplexml($leadsXML);
$leadsDom->appendChild($leadsDom->ownerDocument->importNode($nodeDom, true));// remove from the hot XML file
$dom=dom_import_simplexml($request);
$dom->parentNode->removeChild($dom);
}
}
$leadsXML->asXML(‘leads.xml’);
$hotLeadsXML->asXML(“hot.xml”);
}
So most XML based data sets programmed using simpleXML actually become a mix which still maintains the benefits of using XML data on a site.
MLK speeches, fair use and SOPA/PIPA … how SOPA Censors history.
As somebody who builds websites and web content for other people I’ve needed to educate myself on what is and what is not a copyright violation, or what is fair use and what is not. I’ve also worked with people who have created documentaries, so my statement that “SOPA” censors history is a bit of hyperbole … current copyright laws censor it. All of the interviews done by the company I worked for they hold the copyright. However, the problem is not limited to recent history. Many of the people who were interviewed are now dead, as is Martin Luther King. These interviews can not legally be used without expressed written permission.
Fair use is a topic I have always avoided posting about because what is fair use is what the judge says is fair use. You can check with attorney after attorney, the law is open very open to interruption by a judge on a case by case basis. So much so that many films avoid having any product that is trade marked appear in their movies. A cease and desist order means the movie would need to be pulled have that part of the film changed.
However under current law the person who wants to claim fair use can present his case to the judge. There must be a legal basis for a fair use defence, not merely that you wanted to use it. A defence can be to comment on the work, Criticism of the work, or parody. http://fairuse.stanford.edu/Copyright_and_Fair_Use_Overview/chapter9/index.html There is also a fair use for education.
I would ask an attorney, about the education usage of fair use, before attempting to use an interview in a new documentary under fair use, and because the only video or tape of the speech is copyrighted, (can not be recreated because person is dead). If you get an attorney to represent you then follow his direction.
What will change under SOPA/PIPA is you don’t get your day in court unless you take the person who filed a claim to court after your site was taken down. You don’t get re-compensated if the claim is completely bogus or if your usage is fair use.
SOPA/PIPA and MPAA DNS Hacking does not stop piracy.
How do you know that the website you are on is really the web site you believe you are on? If the DNS record were hacked or changed by a record from another source … SOPA/PIPA bills require the local IP to block or change these records. Then you would not be on the correct site. SSL connections and encryption depend on correct records. These are important issues because considerable amount of money transactions flow through the internet as well as private information.
DNS blocking or denial of service is not a technology built into the internet. In order for local IP to block a site which is hosted outside of the US they must hack the DNS record. This makes DNS hacking a none security threat, or main streams broken DNS records.
This policy is essentially putting MPAA interests above the interests of people who want to have DNS security to insure that they send their information to the correct destination. It effectively gives those who would violate copyrights and hack sites a new tool.
Does DNS blocking prevent piracy. No, all windows systems provide for a local on machine DNS lookup (via hosts file) so they can support an office intranet without needing any new software. The piracy sites can be accessed directly or by adding the DNS lookup to the local operating system.
DNS hacking fails to fix the problem of piracy and makes determining if you are really on the correct site more difficult.
SOPA/PIPA and due process …
Modern civilization believes in due process that is the person who is accused has the right to a defense before being punished as a guilty party. Copyright law is filled with grey lines; Sopa punishes web site owners who are now required to be judge and jury on if user submitted content is a copyright violation, and he may be punished even if a federal judge would agrees with him in court.
The majority of copyright issues are not as black and white as “he or she copied a song and made a music video and posted it on you tube.” Clearly a case of copyright violation, but if the video is not a music video but music was playing on a nearby radio then we start to get into the grey. One question that a court would look at under current law is does the newly created material, the video, cause the older created material harm? A music video playing the song could take sales away from the official music video, mp3, or CD. A few seconds of a song, in the background audio, of a video of a dog barking at the mail, does not cause the song to lose sales … in fact it could cause more people to get the whole song because they like it.
Under current law if somebody harms the value of a copyrighted product by copying it they pay a fee. In other words they become purchasers even if nobody else would of purchased the original product. A judge hears both parties side to determine if a copyright violation has taken place.
Under Sopa papers are filed by the copyright holder or enforcer, MPAA, to take down the site and to block it. These are fast tracked through the legal system with merely a judge approval the same as he would approve of a search warrant, but the results are that in all cases where the website owner is making money on his site – his income is shut off, even if he did not know because a user posted a humorous image of a super hero that could be mistaken as a Disney character.
Sopa/Pipa go to an extreme that will cause harm to jobs and innovation on the web. It is not a measured response. It is like beating a child with a stick because he was late, even when the facts say he did not know what time it was because the clock had stopped and he could not of determined what time it was.

