search
Innovative Web Design and Application Development
PawPrint.net

PawPrint.net News

Technobloggle

Technology Blog from PawPrint.net all manner of news and reviews for small business and any computer user
May 10th, 2012

PHP 5.4 Gotchas for Developers

A few fixes/enhancements might cause you some grief

After running PHP 5.4 on my development environment for a while I have hit several things that could easily cause enough grief that they need calling attention to. These are new features or changes that will break some existing edge cases in somewhat hidden or obscure ways and can take a long time to find if you don't know what you're looking for.

Call Time Pass By Reference prohibited:
I found 3rd party code (bank payment processing) that had call time pass by reference.
It failed with no errors & no warnings until I tested the specific include with php -l  Otherwise there is no error just silent failure - and when that is deep in external code it's a nightmare to find. To fix it: just remove the & they are no longer necessary.

max_input_vars:
This is a new setting (since 5.3.9) that can only be adjusted in the php.ini .htaccess, or httpd.conf locations. It sets the maximum number of variables (including array elements) that can be sent to the server at one time and is defauled to 1000 (they did this to prevent hash collision attacks). The gotcha here is if you have a large form with many options in it $_REQUEST or $_POST can easily surpass that quantity of elements. What makes it worse, the error you get will likely show up in your web browser as client side generated
Unsupported Compression Type
- NOT easy to diagnose. You can only find it if you check the errors_log and see things like this:  
PHP Warning:  Unknown: Input variables exceeded 1000


Hope these help you in your PHP travels.

Share this:
April 30th, 2012

Mousewheel Jog/Shuttle in Steinberg Nuendo 4

Overcome a gap in the Nuendo UI on PC using this Key assignment/AutoHotKey script

For anyone using the Steinberg Nuendo family of audio post software this is a little tutorial for how to overcome the rather gaping hole of no way to Jog/Shuttle on the timeline using the mousewheel. It uses a combination of key assignments in Nuendo and AutoHotKey on PC to add this key feature of standard editing workflows.

Basically it's a two part process

1) Assign keyboard shortcuts in Nuendo to the left and right Jog functions.
2) Assign a modified mouse wheel scroll to those key shortcuts via an AutoHotKey script.

I'm not going to go into details of why all this works but just jump to what you need to do to make it work. Feel free to jump in via comments if you have questions.

In Nuendo

I tested this in Nuendo 4 but it should work in other versions as well.

  • Go to File | Key Commands... and scroll down to the "Transport" set (folder) of functions
  • Select "Jog Left"
  • On the right clicn in the grey box just below where it says "Type in Key" and then depress Ctrl+Alt+{left arrow}
  • Click the "Assign" button just above the box and you should see this shortcut assigned to Job Left over on the left hand side now.
  • Repeat the process for the Jog Right and assign Ctrl+Alt+{right arrow}
  • Click "Ok" to accept the changes and close the window


Ctrl+Alt+direction was selected because it was not assigned by default in Nuendo to anything. You should now be able to use those key shortcuts to jog left and right frame by frame. This in itself is quite handy for getting around on the timeline. You can even hold down the shortcut in the forward direction and you'll actually get a realtime playback speed thanks to key repeat. For some reason jogging backwareds (for me anyway) was much slower then forwards - this could be a limitation of the video I had playing back as well.

So far everything we have done will work on a Mac (command+option instead of ctrl+alt) and PC.

AutoHotKey Script Control for Mousewheel Jog

Unfortunately for Mac users, this part only works on PC since AutoHotKey is a PC-only application.
You will need to download and install the incredibly handy AutoHotKey application from:
http://www.autohotkey.com (I use this for all sorts of things and if you like keyboard shortcuts you'll love learning all that this can do for you)
You can leave Nuendo open during this process and you won't need to restart your system.

  • Install the application and run it.
  • When prompted if you would like to create a default script select "Yes"
  • Add the following two lines to the bottom of the text window:

    !WheelUp:: Send ^!{Left}
    !WheelDown:: Send ^!{Right}

  • Run AutoHotKey again
  • Hold down ALT and scroll with your mouse and you should jog on the timeline.


There you have it. Hope that helps.

Share this:
April 23rd, 2012

Bitrates and Codecs and Bandwidth Oh My!

Starting a primer into video encoding

For many, even many video professionals, encoding and modern video compression is basically just a black box full of voodo computer magic. Most just pick a preset and hope for the best and sadly so many of the presets are really not all that great. I get asked constantly for advice in this area and over the years have learned a lot. This needs to be a more complete article, and eventually I will create one - but for now I'm going to address a few or the more salient points. Which means, the voodo will have to remain, for now, at the deepest levels...

Attention Scan Readers - you can scroll to the bottom now to blindly follow recipies without understanding them :) Go Team Black-Box Voodo!

Some background... My University education was in Electrical Engineering specalizing in communications. Two course topics really stood out for me from that period: Fibre Optic Communications (which I used during my 'other life' in the telecom engineering world) and Computer Compression Technology. At that point it focised more on image compression but we looked at HDTV, MPEG and other associated video compression technology as well. Much has changed since then, but the fundamentals, as is so frequently the case, remain the same.

When it comes to video you really need to understand that any compressed video file really is built from 3 "layers" (I'm going to simplify like crazy here so bear with me if you know this from a more technical side)
The Source Video Data at some resolution which gets compressed by the codec into a Compressed Video Stream which in turn gets stored in a file based on The File Format

To understand what a video file is or is going to look like you at least need to know what all those are. To further complicate matters there is the concept of Pixel Aspect Ratio and basically the same progression with the audio side of the mix.

I am not going to go into all the theoretical explinations of these things (voodo) - Instead I'll just list a few examples and give an anaology.

Typical Video Data resolutions (source and output) are things like 360p, 480p, 720p, 1080p (these numbers stand for the vertical part of the resolution of a single frame of the video and the "p" means progressive - as opposed to "i" for interlaced - again not going into this here - ack more voodo) most computer video will be something progressive and very typically 480p (standard definition TV = 720x480 pixels) 720p (sometimes called HD as opposed to "Full" HD at 1280x720pixels) or 1080p (Full-HD at 1920x1080 pixels) of course the resolution can be almost anything.

Typical codecs are H.264, MPEG-2, VP6, (and hundreds more)

Typical file formats ate mp4, wmv, avi, mov, (and hundreds  more)

This is where it gets interesting because, you can put the encoded video stream from many different codes into many different file formats eg:

AVI can contain H.264, MPEG-2, or many other formats MOV can too etc etc etc So the next time someone tells you "Oh just send me an AVI" you'll begin to realize how relatively useless this request is. Do they mean an H.264 encoded AVI or a MPEG2 one or a MJPEG one or or or...Here is an anaology:

Let's compare Raw Video Data to fruit - Apples, Pears, Plums etc...
Codecs are how you prepair the fruit and
file formats in this anology can be some kind of tastey dessert like a cake or a pie

I can slice the apples (codec) and then make apple pie or apple cake (same source, same codec, two different output formats)
or
I can dice the apples (codec) and then make pie or cake (same source, different codec, same two output formats as above)

The combinations and permutations here really become endless (especially when you add audio to the mix) What this all means is: If you actually want to know what is contained in a compressed video file you really need to know at least all of the following:

the file format
the video resolution (including pixel aspect ratio)
the video frame rate
the video bitrate
the video codec
the audio bit-depth
the audio bitrate
the audio codec

I could write a seperate in-depth article on each of these, but I simply don't have time just yet (yet more voodo)

So now on to the question that prompted all this: "How should I output my video so it will look good on YouTube" - first and foremost it depends what the source video is but I'll answer this with a group of examples.

A note about resolution and modern codecs. Most modern codecs are designed to work at the 'defined' resolutions (it's more complicated then this voodo but let's keep it simple) if you're working on editing a video in something like Adobe Premiere, Vegas, or Final Cut - it's best to choose your output resolution first and then work on the project in that resolution even if your source is slightly off. For example if I had older video footage from a web cam that was 1024x768 I would edit at either 480p (720x480) or 720p (1280x720) because those are standard sizes. I recommend you work in 1080p or 720p unless you're specifically/intentionally only ever wanting something smaller.

Youube has several internal formats it always converts videos into:
240p, 360p, 480p, 720p, 1080p

First - YouTube will never "Up-scale" your video and neither should you - just like with images one can't increase the quality when there is no data there to use so try and start with high resolution source video and either scale down or let YouTube scale it down for you.

Second - 1080p (Full-HD) is great but it's large and slow to work with and unless you really need it probably overkill for many applications. If you're filming a kid's birthday party 1080p is overkill most likely - go 720p in that case.

Third - don't neglect the audio (Help keep my dad, the veteran audio-engineer of 40 years in the TV industry, from pulling out his hair when he sees another great video with audio so bad it ruins the experience and take care with your audio)

The YouTube Recipies

(and a big hello to the scan readers that skipped down to this point)

Source Video: 720p = 1280 x 720pixels at 30 (29.97 to be more precise) frames per second
Usually this is the best all-around format to upload to Youtube given the fact that most modern video is a HD source)

Compression settings:
Codec: H.264
Resolution: 720p (1280x720)
Frame Rate: 29.97
File Format MP4
Encoding: VBR 2 pass
Target Bitrate: 3Mbps
Max Bitrare: 7Mbps
Audio Bit-depth: 16Bit/48Khz
Audio Codec: AVC
Audio Bitrate: 160 KBps

Source Video: 1080p = 1920x1080pixels at 30 frames per second
Full HD and basically best possible YouTube Quality

Compression settings:
Codec: H.264
Resolution: 1080p (1920x1080)
Frame Rate: 30
File Format MP4
Encoding: VBR 2 pass
Target Bitrate: 10Mbps
Max Bitrare: 16Mbps
Audio Bit-depth: 16Bit/48Khz
Audio Codec: AVC
Audio Bitrate: 196 KBps

Source Video: 480p = 720x480pixels at 30 frames per second
This is typical NTSC TV / DVD Quality

Compression settings:
Codec: H.264
Resolution: 480p (720x480)
Frame Rate: 30
File Format MP4
Encoding: VBR 2 pass
Target Bitrate: 1Mbps
Max Bitrare: 3Mbps
Audio Bit-depth: 16Bit/44.1Khz
Audio Codec: AVC
Audio Bitrate: 96 KBps

Finally one more thing: Encoding Method: VBR 1-pass (Variable Bit Rate) , VBR 2-pass, and CBR (Constant Bit Rate)
Because of how codes actually compress the video they need to take the source data and do soemthing to it (voodo again) to make it smaller. The resulting quality is controled to some extent by bitrate.

In Constant Bit Rate compression, the entire video is encoded from beginning to end at the same rate throughout. It's "technically" easier to process video like this but since codecs actually work off the movement/change in video it results in some parts of the video without much motion wasting space and others with a lot of motion not being very good quality.

Variable Bit Rate compression, allows the rate to change (within some threshold) to allow flexibility in the comporession. In almost every case this is better then CBR when outputting video for file-based playback.

Variable Bit Rate 2-pass compression, is designed to improve upon VBR by allowing the codec to first 'watch' the video and learn where the fast and slow bits are, then tune the compression plan to make the best possible choices and theoretically produce the best output size vs quality compression. Because it needs to go through it 2 times to do this - it takes about twice as long as VBR single pass.

Being someone who is happy to wait for the best possible quality, I always recommend 2-pass VBR unless you're in a rush. But you can use single pass VBR in all the recipies above instead of 2 pass without changing any of the settings and the result will almost be just as good (only probably slightly larger)

I hope that helps in starting to scratch the surface of video compression. I will do more on this topic because it's been a thorn in too many people's sides for too long but I need to think through the best way to demystify the voodo before going into those details.

Share this:
January 30th, 2012

Web Design in 1995

Inspired by a History of Web Design article

The Duke of Edinburgh's Award Gold Award Society home page (c) 1995
The Duke of Edinburgh's Award Gold Award Society home page (c) 1995
Inspired by an article on 1stwebdesigner.com about the history of web design shared by @timothywhalin I went hunting in my archives to find the oldest web design for which I still had a copy. Since I started building sites in 1992 I wasn't sure how far back I could go - Managed to find my moldy oldies from 1995 through 1998 and though I'd share them for fun.

It really is amazing how much things have changed. As decidedly tacky as these sites look to modern standards I'm actually not all that shocked looking back at them now. The Duke of Edinburgh's Award site is actually the 2nd version of the first web site I ever created back on a 386 running linux/x-windows installed from something like 20 floppies (if you can relate to this congratulations, you too are getting older!) Sadly, copies of that first version from 1992/3 are long gone but I still have all the working html of the 1995 edition animated gifs and all! The thing even has the old Java Tic-Tac-Doe game embedded in it (ah the good old days)

The Feline Future site was the first commercial site created by PawPrint. It was a team effort along with a trained graphic designer (I was still learning back then and it shows looking at the others) To appreciate it you really need to read some of the software and hardware versions listed there as being components of managing the site (Photoshop 4 and Homesite, for example)

The Quality Inns site was my 3rd commercial web site from 1996-1998 era (the first was also a hotel site) Obviously having some serious fun with photoshop in the design there - it actually was accepting online-bookings and sending out a newsletter.

I found a few other mouldy oldies and may have to dig up some of the others to share sometime.

More Images

Quality Inns Vancouver (c) 1997
Quality Inns Vancouver (c) 1997
Feline Future (c) 1996
Feline Future (c) 1996

Share this:
January 30th, 2012

Google, Facebook, Pay Pal, and others: anti-phishing email protocol

Can some of the web giants work together to help stop deceptive email?

The plan surrounds the existing systems DKIM and SPF and from a quick read seems to basically be an attempt to back and promote these existing systems with a few add-ons. To quote the dmarc.org web site "A group of leading organizations came together in the spring of 2011 to collaborate on a method for combating fraudulent email at Interenet-scale."

The main difference here seems to be that DMARC includes instructions for what should be done when a email is received that fails the tests. Currently SPF and DKIM just attempt (loosly) to identify valid email but it's up to the client to deturmin what to do if an email comes in that fails the test.

From the dmarc.org site:
"A DMARC policy allows a sender to indicate that their emails are protected by SPF and/or DKIM, and tells a receiver what to do if neither of those authentication methods passes - such as junk or reject the message. DMARC removes guesswork from the receiver's handling of these failed messages, limiting or eliminating the user's exposure to potentially fraudulent & harmful messages. DMARC also provides a way for the email receiver to report back to the sender about messages that pass and/or fail DMARC evaluation."

Will it work, let's hope so! only time will tell what the bad boys can come up with the try and circumvent this latest filter but it certainly can't hurt!

For more information check the http://dmarc.org web site

Share this:
January 29th, 2012

PHP 5.4 nearing release

Help test some of the key changes in the PHP 5.4 release candidate

PHP 5.4 final release testing
PHP 5.4 final release testing
In a recent post on Google+ the opening is laced with humor "We are in the final push to PHP 5.4 and we need your help. Everyone who is using PHP can give us a hand here, regardless of your technical abilities. Facebook employees, take a break from calculating your stock option scenarios and give us an hour of your time...."

All kidding asside, many developers have been eagerly awaiting this new versinon after primary PHP developemt's 'stalemate' surrounding PHP 6 seemed to delay development for what felt like eons.

There is a lot to anticipate in this release for all PHP developers including:

  • Upload progress built-in (finally!)
  • Traits
  • Closures
  • A built-in mini HTTP server
  • Syntax and dereferencing changes for arrays

...and other depreciations and minor updates as well as a host of bug fixes.

If you want to help with their final RC testing check the post on Google+ here:
We are in the final push to PHP 5.4 and we need your help

Share this:

More Items...

January 19th, 2012

What did the SOPAstrike accomplish?

after thousands of web sites went offline in protest - was anything acomplished?

click to view detail
After the dust settled on what some refer to as the SOPAstrike and others are calling the largest Internet protest ever what was the result. Did it acomplish anything? All initial reports would seem to concur that is a resounding Yes!
January 10th, 2012

Google Search Going Social

Google search now understands not only content, but also people and relationships

click to view detail
Google is starting to do exactly what everyone thought they would and combining more and more of the content from Google+ (their new social network) directly into search results. Now they have announced that you can control your search results to include the personal "social" results and/or global results in a Google Blog Post. The important thing to consider is how all this affects you when you're seeing where your web site fits in the search results.
January 3rd, 2012

Use Klout to build your Social Network

Designed to measure your influence, Klout is also a great networking tool

click to view detail
The outward focus of Klout is to measure social influence online, but it is also a great way to grow that same influence, using Klout as another place to interact and meet new people. Their +K system for assigning influence can be a great way to grow and help others do the same.
December 27th, 2011

Resolve to be more secure in 2012

Make a New Years Resolution you can keep and update your passwords

click to view detail
This new year, protect yourself by taking a little time and updating your passwords around and about your digital world: New year = new passwords - it is well worth the time. Here are some tips for creating and managing secure, easy to remember passwords.
August 30th, 2011

Windows 7 Fresh Install Tips

Start right with some fresh install tips for Windows 7

click to view detail
Having just completed a fresh install of Windows 7, it seemed fitting to share some tips for starting off right with your new (or renewed as was the case for me) system. A good fresh install for an existing system may take several days but the speed and space improvements are usually worth it every couple of years.
August 1st, 2011

Adobe Edge

Did adobe just kill Flash themselves?

click to view detail
Adobe released the first preview of their new HTML5 media authoring tool called Edge. To give this a ultra-fast test-drive we wanted to see what we could produce in just 5 mins using the software for the very first time and what that output actually looks like. The results are actually quite impressive.
July 27th, 2011

The Google+ Real Names Policy

and how it affects Scammers, Spammers, and Trolls

click to view detail
Everyone is talking about the real names policy and how it's partly there to help prevent against abuse. The sad thing is - I sincerely doubt it will do that at all. As with most proactive software controls the abusers will find a way to circumvent it and the only people that are affected are legitimate users who would appreciate some anonymity.

IMG Burn

Latest in our Saturday Software Review series

click to view detail
Main Mode choosing screen
The very best CD/DVD burning software for Windows also happens to be freeware - it just makes it all the better! If you need a reliable fast CD/DVD or image file creation package then IMG Burn is the answer.
June 28th, 2011

Firefox Memory Leaks

How much will it leak if you do... nothing at all.

click to view detail
Memory use after 6h idle
After frequently needing to kill FF when it consumes over 2GB of RAM (I've seen 3GB and 4GB sometimes) I figured a little test was in order to see just how bad the memory leak problems are in the browser.

Older Items...

2011
Tight VNC Core Temp Automatic Timelapse Video Textpad
VLC Media Player KeePass Temp Flie Cleaner Latest Email Scam
2010
iPhone vs Android Explorer.exe won't start after Virus Web Site Optimization Compiling FFMpeg on Centos 5
PDF Repair Virus Prevents all .exe Execution Un-googled Confused about the BC HST
Laser Mouse 6000 - Cleaning Nvidia 196.75 Driver Warning PHP 6 is coming Internet Explorer Security Holes are a Good Thing
2009
Air Files downloading as ZIP Thunderbird 3 RC 1 Notes Prevent Windows 7 Thumbs.db Files And the winner is: Windows 7 - 64Bit
Security Software Battles Might Degrade Performance Browser Plugin Check Social Networking Tizzy HTTP Headers Headache
Killing dswave32.dll SM Player Which OS - My MS Muddle Firefox 3.5 Launch
Building Web Site Success Update XDe Tested and working on IE8 - Bye Bye IE6 Oracle buys Sun and therefore MySQL Microsoft Infects Firefox with Unwanted Extension
RSS feed Feed Description
Subscribe to the complete PawPrint.net News RSS news feedAll News RSS feed Complete RSS feed
Subscribe to the PawPrint.net News RSS news feed for this category onlyTechnobloggle RSS feed for: Technobloggle
A Rich Site Summary (RSS) feed is an xml data file that provides a summary of the information contained here. It is not designed to be viewed in your browser, but instead by rss reader software. If you do not know what this means - you can safely ignore it, as it is provided for advanced users with rss reader software only.
1.888.493.2360
+1.604.200.0161
Copyright © 1992-2012 PawPrint.net
web design and maintenance: PawPrint.net