Pauls Slice of Internet

NEW Sony SLT a65 – Review Coming Soon

by on Nov.26, 2011, under Photography

I just got the new Sony a65, so far I am impressed. My old camera was an Sony a300 so this is a big step up.

I have two lenses to play with, a SAL55-200 and a Tamron 17-50 2.8, the SD Card I will be testing with is an Amazon Basics 16gb Class 10 card as well.

The Camera was purchased on Ebay, as it was the only place to buy the camera! Everywhere else is sold out!

Review to come soon. :)

Leave a Comment : more...

Grayed out text on input fields for default values

by on Oct.12, 2011, under Uncategorized

See

function inputFocus(i){
if(i.value==i.defaultValue){ i.value=”"; i.style.color=”#000″; }
}
function inputBlur(i){
if(i.value==”"){ i.value=i.defaultValue; i.style.color=”#888″; }
}

Put this code on your text field or text field.

onfocus=”inputFocus(this)” onblur=”inputBlur(this)”

Leave a Comment more...

Loading a datepicker field on input type = text

by on Oct.11, 2011, under JQuery, Programming

HERE WE GO!

<input type=”text” onclick=”$(this).datepicker({dateFormat: ‘yy-mm-dd’, showOn:’focus’}).focus();”>

Leave a Comment more...

FFMPEG Cheat Sheet

by on Oct.11, 2011, under Video Encoding

Thanks to: http://rodrigopolo.com/ffmpeg/cheats.html

Video/Audio Encoding Cheat Sheet

This is a small personal cheat sheet for encoding audio/video encoding where I put some of my most used stuff with FFmpeg and other tools.
I use H.264 and AAC on MP4, M4V or MKV container most of the time.

If you have any question just contact me.

Video Size and Aspect Ratios

iPhone:

Name Size Aspect
Wide 16:9 480×270 4:3
Old TV 4:3 427×320 16:9
Wide 16:9 /16 480×272 480:272
Old TV 4:3 /16 432×320 432:320

DV NTSC Video

Name Size Aspect
Wide 16:9 720×480 16:9
Old TV 4:3 720×480 4:3

Youtube and Vimeo Upload

Name Size Aspect
SD 4:3 640:480 4:3
HD 16:9 1280×720 16:9

HD, Blu-Ray, AVCHD

Name Size Aspect
720p 1280×720 16:9
1080p/i Anamorphic 1440×1080 16:9
1080p/i 1920×1080 16:9

Frame Rates

Name Standard Fps FFmpeg
Movies NTSC 23.976 24000/1001
Movies QuickTime N/A 29.976 10000000/417083
TV Video NTSC 29.97 30000/1001
Movies PAL 25 25
TV Video PAL 30 30

FFmpeg Encoding

X264 Presets

default fastfirstpass lossless_ultrafast lossless_slower
baseline slowfirstpass lossless_fast lossless_max
normal hq lossless_medium ipod320
main max lossless_slow ipod640

High quality 2 Pass

ffmpeg -y -i INPUT -r 30000/1001 -b 2M -bt 4M -vcodec libx264 -pass 1 -vpre fastfirstpass -an output.mp4

ffmpeg -y -i INPUT -r 30000/1001 -b 2M -bt 4M -vcodec libx264 -pass 2 -vpre hq -acodec libfaac -ac 2 -ar 48000 -ab 192k output.mp4

iPod-iPhone 320 width

ffmpeg -i INPUT -s 320×240 -r 30000/1001 -b 200k -bt 240k -vcodec libx264 -vpre ipod320 -acodec libfaac -ac 2 -ar 48000 -ab 192k output.mp4

iPod-iPhone 640 width

ffmpeg -i INPUT -s 640×480 -r 30000/1001 -b 200k -bt 240k -vcodec libx264 -vpre ipod640 -acodec libfaac -ac 2 -ar 48000 -ab 192k output.mp4

Hight quality, 2 pass without presset

ffmpeg -y -i input -r 24000/1001 -b 6144k -bt 8192k -vcodec libx264 -pass 1 -flags +loop -me_method dia -g 250 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 16 -b_strategy 1 -i_qfactor 0.71 -cmp +chroma -subq 1 -me_range 16 -coder 1 -sc_threshold 40 -flags2 -bpyramid-wpred-mixed_refs-dct8x8+fastpskip -keyint_min 25 -refs 1 -trellis 0 -directpred 1 -partitions -parti8x8-parti4x4-partp8x8-partp4x4-partb8x8-an output.mp4

ffmpeg -y -i input -r 24000/1001 -b 6144k -bt 8192k -vcodec libx264 -pass 2 -flags +loop -me_method umh -g 250 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 16 -b_strategy 1 -i_qfactor 0.71 -cmp +chroma -subq 8 -me_range 16 -coder 1 -sc_threshold 40 -flags2 +bpyramid+wpred+mixed_refs+dct8x8+fastpskip -keyint_min 25 -refs 4 -trellis 1 -directpred 3 -partitions +parti8x8+parti4x4+partp8x8+partb8x8-acodec libfaac -ac 2 -ar 44100 -ab 128k output.mp4

iPod-iPhone 320 width, without presset

ffmpeg -i INPUT -s 320×240 -r 30000/1001 -b 200k -bt 240k -vcodec libx264 -coder 0 -bf 0 -flags2 -wpred-dct8x8 -level 13 -maxrate 768k -bufsize 3M-acodec libfaac -ac 2 -ar 48000 -ab 192k output.mp4

iPod-iPhone 640 width, without presset

ffmpeg -i INPUT -s 320×240 -r 30000/1001 -b 200k -bt 240k -vcodec libx264 coder 0 -bf 0 -refs 1 -flags2 -wpred-dct8x8 -level 30 -maxrate 10M -bufsize 10M-acodec libfaac -ac 2 -ar 48000 -ab 192k output.mp4

iPod-iPhone, 2 pass custom

ffmpeg -y -i input -r 30000/1001 -s 480×272 -aspect 480:272 -vcodec libx264 -b 512k -bt 1024k -maxrate 4M -flags +loop -cmp +chroma -me_range 16 -g 300 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -rc_eq “blurCplx^(1-qComp)” -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -coder 0 -refs 1 -bufsize 4M -level 21 -partitions parti4x4+partp8x8+partb8x8 -subq 5 -f mp4 -pass 1 -an -title “Title” output.mp4

ffmpeg -y -i input -r 30000/1001 -s 480×272 -aspect 480:272 -vcodec libx264 -b 512k -bt 1024k -maxrate 4M -flags +loop -cmp +chroma -me_range 16 -g 300 keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -rc_eq “blurCplx^(1-qComp)” -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -coder 0 -refs 1 -bufsize 4M -level 21 -partitions parti4x4+partp8x8+partb8x8 -subq 5 -f mp4 -pass 2 -acodec libfaac -ac 2 -ar 44100 -ab 128k -title “Title” output.mp4

DV Video

To DV

ffmpeg -i input -target ntsc-dv -aspect 4:3 -y output.dv

From DV To Microsoft AVI DV

ffmpeg -i input.dv -vcodec copy -vtag dvsd -acodec pcm_s16le -f avi -aspect 4:3 -y output.avi

Audio

AAC Stereo HQ

-acodec libfaac -ac 2 -ar 48000 -ab 192k

AAC Stereo SQ

-acodec libfaac -ac 2 -ar 44100 -ab 128k

AAC 5.1 HQ

-acodec libfaac -ac 6 -ar 48000 -ab 448k

AAC 5.1 LQ

-acodec libfaac -ac 6 -ar 44100 -ab 224k

AAC to AC3 (Recomended use AviSynth for channel mapping)

ffmpeg -i intput.aac -vn -acodec ac3 -ac 6 -ar 48000 -ab 448k

AC3 to M4V (Mux to be opened and edited in other appz)

ffmpeg -i input.ac3 -vn -acodec copy output.m4v

AC3 to AAC (not working as expected)

ffmpeg -i input.ac3 -vn -r 30000/1001 -acodec libfaac -ac 6 -ar 48000 -ab 448k output.aac

Eac3To

AC3 5.1 Channel Mapping Fix

eac3to true_hd.ac3 fixed_true_hd.ac3 -blu-ray -448

AAC to AC3

  1. Open AAC on Audacity or SoundBooth
  2. Export to Wav
  3. Remux from Wav to Wav with FFmpeg:

    ffmpeg -i audio.wav —vn -acodec copy audio-out.wav

  4. Convert to AC3 with EAC3to

    eac3to.exe audio.wav Main.ac3 -448

Other FFmpeg Options

-threads thread count
-y overwrite output files
-ss time_off set the start time offset
-t duration record or transcode “duration” seconds of audio/video
-ildct Interlaced

FFmpeg Sources

IRC

Server: irc.freenode.net

Channel: #ffmpeg

Download

The bests binaries on the web, Easy installation without compiling, just runing an install file:

FFmpeg for Windows

FFmpeg for Macintosh OS X (Intel)

FFmpeg for Linux

You can also use this extremely easy guide to install FFmpeg on your Windows, GNU Linux or Macintosh machine:

http://www.rodrigopolo.com/about/wp-stream-video/ffmpeg-binary-installers-for-win-mac-and-linux

Win32 Binary Builds

http://ffmpeg.arrozcru.com/autobuilds

http://sourceforge.net/project/showfiles.php?group_id=205275&package_id=248632

FFmpeg x264 encoding guide by Robert Swain

http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide

H.264 Profiles and Levels

8x8dct high
cabac+bframes main
-level #

Special Thanks To:

 

Leave a Comment :, , , , , more...

Howto Unlock MSI R6950 TWIN FROZR II/OC Radeon HD 6950 Graphics *GUIDE*

by on Aug.03, 2011, under Computers

This worked for me perfectly, performed the actions below and voila unlocked r6950.  I have not tried overclocking it, I have not found a need to, all games run at highest setting.

Reference URL: http://hardforum.com/showthread.php?t=1622205

 

Just an FYI the guide I used was written by Bystander on Toms Hardware Forum. Just make sure you are using ATiWinflash 2.13 and not ATiWinflash 2.14 or else you will get a ROM programming FAIL message.

The other option I’ve seen posted says you can just flash the Power Edition unlock bios, that did not work for me.

X-Post from Tom’s Hardware

“Step 1) Download ATI Winflash:http://www.techpowerup.com/downloads/1919/ATI_Winflash_2.0.1.13.html (The newest version has been reported to not work).
2) Install winflash in the root directory (i.e. C:\winflash)
3) Download the script to modify the bios and extract it: www.techpowerup.com/wizzard/Mod_BIOS_HD_6950.zip
4) If you have a BIOS switch, set it to the 1 position (TWIN FROZR Will not have a BIOS SWITCH)
5) Run ATI Winflash, click “Save” to save your BIOS, be sure to make a copy of this and save it some where safe in case some thing goes wrong.
6) Make a copy of the saved BIOS and rename the copy to “original.bin”
6.a) If you cannot see the file extensions, you need to open the Folder Options in the control panel and uncheck the option “Hide extensions for known file types”
7) Copy the “original.bin” file to the script folder “Mod_BIOS_HD_6950″
8) Execute the “run.bat” batch file
9) Look in the folder “Mod_BIOS_HD_6950″ and copy the file “modded.bin” to the folder you installed ATI Winflash in (C:\winflash)
10) Open up the command prompt (Start->All Programs->Accessories) you may have to right click and run as adminstrator
11) Change to the ATI Winflash directory with the command “cd C:\winflash” or what ever directory you saved it in
12) Type “atiwinflash -unlockrom 0″ (the “0″ stands for the first PCIe card installed, “1″ will work for the 2nd card)
13) Type “atiwinflash -f -p 0 modded.bin” (the “0″ stands for the first PCIe card installed, “1″ will work for the 2nd card)
WARNING: do not turn off your computer until step 13 is completely finished.
You should have successfully installed the modified BIOS. You will see a window pop up to say it was verified and ask you to reboot if everything went as planned.
14) To verify that you succeeded in unlocking the shaders, use GPU-Z and look to see that you have 1536 Unified shaders.

If your system becomes unstable after you reboot, you’ll have to reflash the original saved BIOS back onto the card following steps 10-13 and using the “original.bin” BIOS in place of “modded.bin”. “

Leave a Comment :, , , , , , more...

Windows Server 2003 “Setup Is Starting Windows” Hangs / Freezes

by on May.28, 2011, under Computers, Servers

So i have job and it is a server that is running windows server 2k3 web edition.

There is a software raid 1 using the ICH7R Intel Storage Controller.The server will not load into windows and hangs. The files that are on the server are very important. There is no other back up

2 Options

  1. repair the existing installation
  2. use a new HD and install the intel matrix storage controller, and hope the raid array works

I download the drivers from the web for the server, which take some time as this is a re branded shuttle bare-bones computer (SD37P2).

DRIVERS: http://global.shuttle.com/products/productsDownload?productId=187&osId=4

I have a usb floppy drive, so I put the drivers on there.

So now I think I have everything to perform the install or the repair. I was mistaken, this was the easy part.

My USB floppy detects normally when I load straight from the server 2k3 setup disc, but it hangs at “Setup is starting Windows”. So i do some googling and find out that it hangs because some of the hardware is incompatible. I believe it might be the USB floppy drive.  Well this is no good.  So i start playing around with the BIOS settings.  Still no luck. Next I see a post regarding pressing F5 and F6 at the startup of the setup disc, and choose “Standard PC”.  I press F5, and F6 when it prompts to push F6,and I choose standard PC, now when the F6 screen loads its asking for me to put a disk in Drive A, it now does not recognize Disc A. I hit escape, and press enter to continue with setup, and it starts loading from the USB floppy drive.  iastor.sys is copying.. Now i am thinking to myself is this really going to work.  No it didn’t. So i tried it again just to confirm I did everything right. Which I did.

So now i am completely frazzled. I go away for the long weekend thinking wow this is no good. And over the weekend i remember about injecting drivers into the setup disc, but I cannot remember the programs name so I started using my neighborhood friendly google.  It returns all these complicated procedures, which I could do, or I could keep googling for the simplest injector for windows setup discs.  We now have another problem, the canucks are playing and its going to take another night away. Which is fine it gives me more time to find this iso driver injector.

Then it hits me, its got the word lite in it, I used it about 6 years ago for my raid 0 and some nforce drivers. second later I have NLITE the ultimate ISO injector.

How to use nlite is quite simple, here is what I did.

  1. Download Install NLITE
  2. Insert existing windows server 2k3 web disc
  3. Load Nlite
  4. Specify the directory ( CD DRIVE) with server 2k3.
  5. Specify the directory where the files will be remade
  6. Click on Drivers, and Bootable ISO when it asks what you want to do.
  7. It will ask you to locate the drivers to inject do that, and select the ones you need.
  8. Next it will create the iso file, so I just pressed next, and put it on the desktop
  9. pressed next and it was done.

So now I have a disc with my raid drivers on it.

So flash the CMOS on the machine and try to boot right from this DISC I created. To no avail it still does not work. I jump back into the bios, disable the floppy controller, and any components not used. I load from the disc press “f5″ at the beginning of the setup procedure, and choose “Standard PC”.

I have now reached the part WHERE i can press enter to begin the setup. and the F8 to Agree. WOOHOOO! As charlie sheen would say “WINNING”

So now I have reached the path of repairing, or installing a fresh copy on a second hard drive.

The best explanation of a repair is, it reinstalls the windows components into place, and can repair the majority of issues, so I will opt for this. The repair procedure looks alot like a new setup, but it really isn’t. The repair process will only write the files it needs to for the windows server to load properly.

I follow the repair path and now I have the server up and running.

So what did I learn from this?

  1. Windows Server hardware compatibility should be ashamed of itself, the error messages are bogus, as there are none unless you get a blue screen, (should be  a console window)
  2. Tech support from re-branded companies is horrible. They want you to pay for everything, including software downloads.
  3. write a blog article about this so someone else can google your findings.

 

 

Leave a Comment :, , , , , , , , , , , more...

JQuery Select all checkboxes

by on May.24, 2011, under JQuery, Programming

This function will select all checkboxes, change the selector to define the scope..

Example:

function select_all()
{
$(‘:checkbox’).each(function(i){
$(this).attr(“checked”,”checked”);
});
}

 

From Other Resources

jQuery 1.6+

Use the new .prop() function:

$(".myCheckbox").prop("checked", true);
$(".myCheckbox").prop("checked", false);

jQuery 1.5 and below

The .prop() function is not available so you need to use .attr()

To check the checkbox (by setting the value of the checked attribute)

$('.myCheckbox').attr('checked','checked')

and un-checking (by removing the attribute entirely)

$('.myCheckbox').removeAttr('checked')

Any version of jQuery

If you’re working with just one element, it will always be fastest to use DOMElement.checked = true – the benefit to using the .prop() and .attr() functions is that they will operate on all matched elements.

Leave a Comment :, , , more...

Use .htaccess for apache to require password only for external ip’s

by on May.24, 2011, under Programming

Today i needed to allow local network users access to the webserver without prompting a password, but keeping external  out unless they have the correct username and password.

put this in an .htaccess file in the folder you want to secure up, and link to the correct AuthUserFile and you are g2g.

AuthUserFile /var/passwdfile
AuthGroupFile /dev/null
AuthName NameOfSecureArea
AuthType Basic

Order deny,allow
Deny from all
Require valid-user
Allow from 192.168
Satisfy Any

 

Leave a Comment :, , , more...

Godon Campbell Resigns, Good or Bad? HST still left stinking up the room, and interest rates are going down again..?

by on Nov.06, 2010, under Life

This past week Gordon Campbell resigned, mainly due to the pressure put on him by the media, the general public, and corporate sponsors.  I will be honest I was not a fan of the man, and some of the antics him and his party pulled. Towards the end the truth was coming out, and he could not bare it any longer, so he took the easy way out, resigned said his last few words and removed himself the public head lights, and into the rear view mirror.

When he resigned he did not take the stinky item left in the room that he brought in.  Instead it is left in plain site, and left for someone else to deal with.  I believe who ever takes leader ship next will have to have a strong plan of action with the HST, and do a better job of handling the situation. I believe I understood the HST before it got implemented because I was truly interested in it. Would it be good or bad for business, and would it help the general public.  Before it was implemented I was completely against it, now that I am understanding where our tax system is going I believe it is an abuse of the governance of the leaders of our province and country. False pretenses about job creation or job security.  The damage HST has done has already curbed our economy and our housing market.  Many people will say it was a tax shift from business to consumers, which it was in part but at the end of the day it was a tax hike to increase revenue for the federal government and the province, which in many eyes is not needed.

We may have run a deficit due to the Olympics but that does not mean it gives our leadership of this province and country the right to generate an additional 2-3 billion a year in taxes (I believe the total number is 7-8+billion dollars per year).  This money will go unaccounted for as all other funds are, it will be said that it provides services and wages for our employees of this country.  Take a loan out like everyone else and pay the money back, do not implement a tax to pay back a debt, and then use money to create new budgets.  The PST was implemented and as far as I am concerned it could be  removed overtime as well. If they need some extra funds I believe the Lottery Corporation and ICBC could slide some cash their way, both those crown corporations sure generate a nice cash-flow, which we people of BC pay for anyways.

Do we have a plan for the future, I believe we should.  Interest rates are getting lower again, not sure why as everyone says they are going up.  I believe there is enough borrowed cash floating around that if they were to spike the interest people would not only loose their house but possibly their shirt, first born child, and underwear. Which would do no good for the economies and the people or organizations ie Banks that control the money and do the lending would definitely be getting richer till no-one could pay their debt.  In theory it is like business as your business grows your margin gets smaller but you do more business, so therefor you make more money by creating more and selling more for a lower cost.  If you were to spike the price of what you were selling, there would be no demand for it.  We are in the age of consumerism so the spiked rates are not good for business, when the age of consumerism dies we will see a change interest rates.

So moving forward into the new year we will have low interest rates, an unstable housing market, a moderate economy to scale based on the last 10 years, an HST tax that might be reversed, and a leadership of this province by a candidate that did not get voted in. I believe we solve our issues with a leadership change; someone strong and willing to face challenges with truth and honesty at their side.

I would like to leave this article ending on a good note;  The Canucks have 2 decent goalies this year and some decent depth, so we might actually see a run to the Stanley Cup.   They play Detroit tomorrow and I believe this will a good test to see what the Canucks bring to the table. Go Canucks Go.

Leave a Comment more...

EGR Delete and Replace Oil Cooler FORD 6.0 Diesel

by on Sep.14, 2010, under Vehicles

We have a 2005 F-250 SD with a 6.0 liter diesel. Currently it has 249,000 km’s and the other day it started puking white smoke out the tail pipe.

Instantly I checked to see if the truck over heated, which it was definitely running hot, but it didn’t over heat.  Head gasket nope? what could it be. The famed EGR which I did not know was famous till I looked  up my trucks symptoms.

Now comes the fun part fixing it, local shops around the lower-mainland quoted 1200 – 2500 + tax for an EGR Delete system eliminating the problem, and preventing it from reoccurring.  So why would one want to do this instead of putting in a new EGR Cooler? Well my findings on the internet point to a cooler operating temperate of the engine, small performance increase, and more pollution but not that much.  My other finding was a TSB (technical service bulletin), where when replacing the EGR cooler you should replace the OIL Cooler, and the design of the OIL cooler seems to be redesigned.

Instead of pursuing a local shop i decided to find the instructions on doing a replacement of an EGR and the Oil Cooler myself, so I started sourcing parts. A list of the required parts are:

  1. EGR Cooler Delete System
  2. Oil Cooler
  3. Intake Manifold Gaskets
  4. O-Rings for Turbo

Parts in Canada for the above would be close to $1200 + tax (400,400,440,80), or you can go on ebay and buy a kit for $409 with everything that was listed there.  I bought the kit for $409, it was delivered 2 days later.

We are now in the middle of dismantling..

**UPDATED**

So I completed the above, and the truck ran good for 2 days.

The high pressure oil pump gave out, and there was 30 pounds of oil pressure in the truck.  I ordered the parts and had, North American Diesel Auto Services do the work, as they were close. Original price to do the work was going to cost about $1,500 final bill was $2,500 including tax + I ordered about $1000 worth of parts from wholesalers in the states.  In the end it cost close to $3,900 to have our truck fixed.

I highly do not recommend a ford 6.0 unless you get a $5,000 discount off the purchase, and you put the $5000 in an interest free tax savings account.  Getting a lemon 6.0 seems to have better odds then winning the lottery or getting struck by lightning.

This Post Has Attachements
1 Comment :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...