Useful FFmpeg Commands

FFmpeg is an extremely powerful and versatile command line tool for converting audio and video files. It is free and available for Windows, Mac and Linux machines. Whether you want to join two video files, extract the audio component from a video file, convert your video into an animated GIF, FFmpeg can do it all and even more.

Extract the audio from a video file with this simple FFmpeg command.

Extract the audio from a video file with this simple FFmpeg command.

Useful FFmpeg Commands

FFmpeg supports all popular audio and video formats. Or you can running the command ./ffmpeg -formats to get a list of every format that is supported by your FFmpeg installation. If you are just getting started, here are some commands that will give you good idea of the capabilities of this tool.

1. Cut video file into a smaller clip

You can use the time offset parameter (-ss) to specify the start time stamp in HH:MM:SS.ms format while the -t parameter is for specifying the actual duration of the clip in seconds.

ffmpeg -i input.mp4 -ss 00:00:50.0 -codec copy -t 20 output.mp4

2. Split a video into multiple parts

If you want to split a large video into multiple smaller clips without re-encoding, ffmpeg can help. This command will split the source video into 2 parts – one ending at 50s from the start and the other beginning at 50s and ending at the end of the input video.

ffmpeg -i video.mp4 -t 00:00:50 -c copy small-1.mp4 -ss 00:00:50 -codec copy small-2.mp4

3. Convert video from one format to another

You can use the -vcodec parameter to specify the encoding format to be used for the output video. Encoding a video takes time but you can speed up the process by forcing a preset though it would degrade the quality of the output video.

ffmpeg -i youtube.flv -c:v libx264 filename.mp4
ffmpeg -i video.wmv -c:v libx264 -preset ultrafast video.mp4

4. Join (concatenate) video files

If you have multiple audio or video files encoded with the same codecs, you can join them into a single file using FFmpeg. Create a input file with a list of all source files that you wish to concatenate and then run this command.

ffmpeg -f concat -i file-list.txt -c copy output.mp4

5. Mute a video (Remove the audio component)

Use the -an parameter to disable the audio portion of a video stream.

ffmpeg -i video.mp4 -an mute-video.mp4

6. Extract the audio from video

The -vn switch extracts the audio portion from a video and we are using the -ab switch to save the audio as a 256kbps MP3 audio file.

ffmpeg -i video.mp4 -vn -ab 256 audio.mp3

7. Convert a video into animated GIF

FFmpeg is an excellent tool for converting videos into animated GIFs and the quality isn’t bad either. Use the scale filter to specify the width of the GIF, the -t parameter specific the duration while -r specifies the frame rate (fps).

ffmpeg -i video.mp4 -vf scale=500:-1 -t 10 -r 10 image.gif

8. Extract image frames from a video

This command will extract the video frame at the 15s mark and saves it as a 800px wide JPEG image. You can also use the -s switch (like -s 400×300) to specify the exact dimensions of the image file though it will probably create a stretched image if the image size doesn’t follow the aspect ratio of the original video file.

ffmpeg -ss 00:00:15 -i video.mp4 -vf scale=800:-1 -vframes 1 image.jpg

9. Convert Video into Images

You can use FFmpeg to automatically extract image frames from a video every ‘n’ seconds and the images are saved in a sequence. This command saves image frame after every 4 seconds.

ffmpeg -i movie.mp4 -r 0.25 frames_%04d.png

10. Merge an audio and video file

You can also specify the -shortest switch to finish the encoding when the shortest clip ends.

ffmpeg -i video.mp4 -i audio.mp3 -c:v copy -c:a aac -strict experimental output.mp4
ffmpeg -i video.mp4 -i audio.mp3 -c:v copy -c:a aac -strict experimental -shortest output.mp4

11. Resize a video

Use the size (-s) switch with ffmpeg to resize a video while maintaining the aspect ratio.

ffmpeg -i input.mp4 -s 480x320 -c:a copy output.mp4

12. Create video slideshow from images

This command creates a video slideshow using a series of images that are named as img001.png, img002.png, etc. Each image will have a duration of 5 seconds (-r 1/5).

ffmpeg -r 1/5 -i img%03d.png -c:v libx264 -r 30 -pix_fmt yuv420p slideshow.mp4

13. Add a poster image to audio

You can add a cover image to an audio file and the length of the output video will be the same as that of the input audio stream. This may come handy for uploading MP3s to YouTube.

ffmpeg -loop 1 -i image.jpg -i audio.mp3 -c:v libx264 -c:a aac -strict experimental -b:a 192k -shortest output.mp4

14. Convert a single image into a video

Use the -t parameter to specify the duration of the video.

ffmpeg -loop 1 -i image.png -c:v libx264 -t 30 -pix_fmt yuv420p video.mp4

15. Add subtitles to a movie

This will take the subtitles from the .srt file. FFmpeg can decode most common subtitle formats.

ffmpeg -i movie.mp4 -i subtitles.srt -map 0 -map 1 -c copy -c:v libx264 -crf 23 -preset veryfast output.mkv

16. Crop an audio file

This will create a 30 second audio file starting at 90 seconds from the original audio file without transcoding.

ffmpeg -ss 00:01:30 -t 30 -acodec copy -i inputfile.mp3 outputfile.mp3

17. Change the audio volume

You can use the volume filter to alter the volume of a media file using FFmpeg. This command will half the volume of the audio file.

ffmpeg -i input.wav -af 'volume=0.5' output.wav

18. Rotate a video

This command will rotate a video clip 90° clockwise. You can set transpose to 2 to rotate the video 90° anti-clockwise.

ffmpeg -i input.mp4 -filter:v 'transpose=1' rotated-video.mp4

This will rotate the video 180° counter-clockwise.

ffmpeg -i input.mp4 -filter:v 'transpose=2,transpose=2' rotated-video.mp4

19. Speed up or Slow down the video

You can change the speed of your video using the setpts (set presentation time stamp) filter of FFmpeg. This command will make the video 8x (1/8) faster or use setpts=4*PTS to make the video 4x slower.

ffmpeg -i input.mp4 -filter:v "setpts=0.125*PTS" output.mp4

20. Speed up or Slow down the audio

For changing the speed of audio, use the atempo audio filter. This command will double the speed of audio. You can use any value between 0.5 and 2.0 for audio.

ffmpeg -i input.mkv -filter:a "atempo=2.0" -vn output.mkv

Stack Exchange has a good overview to get you started with FFmpeg. You should also check out the official documentation at ffmpeg.org or the wiki at trac.ffmpeg.org to know about all the possible things you can do with FFmpeg.

Also see: Essential Linux Commands


This story, Useful FFmpeg Commands, was originally published at Digital Inspiration on 14/04/2014 under Audio, Video Editing, Internet

Easily Unsubscribe from all LinkedIn Emails

LinkedIn is trying to reinvent itself as a social network for professionals and they are now sending way too many email notifications that one never really asked for. Whether it’s your colleague’s birthday, someone just completed two years at their current job or someone you know just joined LinkedIn – there’s a notification for everything.

linkedin

The worst part is that LinkedIn offers no one-click button for quickly and easily unsubscribing from all these email notification in one go. You have to select at least 20 drop-down boxes to unsubscribe yourself from every single email that LinkedIn can send to your mailbox.

Fortunately, there’s a solution in the form of a bookmarklet authored by @chengyin [via @webaficionado].

LinkedIn Unsubscribe

Drag the bookmarklet to your browser’s address bar, then go to the LinkedIn’s email settings page and click the bookmarklet link in the address. It will change the email frequency setting for every notification as “no email” thus saving your mailbox from the LinkedIn clutter.

Internally, the LinkedIn bookmarklet executes a series of JavaScript commands to automatically select the “No Email” option in drop-down boxes and then hits the Submit button to save your changes. Here are some more useful bookmarklets.

$('.settings li select:has(option[value=never])').val('never');
$('.settings li select:has(option[value=WEB])').val('WEB');
$('.settings li select:has(option[value=NEVER])').val('NEVER');
$('.settings li select:has(option[value=NONE])').val('NONE');
$('.settings li select:has(option[value=false])').val('false');
$('input[type=submit]').prop('disabled', false).click();

This story, Easily Unsubscribe from all LinkedIn Emails, was originally published at Digital Inspiration on 07/04/2014 under Bookmarklet, Linkedin, Internet

The 10 HTML Codes You Need to Know for Writing on the Web

The computer keyboard creates “dumb” punctuation marks that may not be acceptable in printed work but are common on web pages. It outputs straight quotation marks (") while your writing may require curly quotes. You can only type hyphens using the keyboard while an em or en dash may have made your text look more elegant and professional.

HTML Entities for Punctuation

HTML Entities for Punctuation

HTML Codes for Punctuation

Your keyboard lacks the keys for inserting the correct punctuation marks but there are simple HTML character codes, on entities, that you can use to mimic the typography of printed books on the web. Here’s a quick guide to using HTML codes for inserting typographically-correct punctuation marks in web writing.

Hyphens (-)

Hyphens, or half-dashes, are most commonly used to join together two or more words. You can type a hyphen directly without using any HTML codes.

  • The next-generation iPhone is expected to become available in mid-September.
  • The word email contains no hyphen but there’s one inside e-books and e-commerce.

Dashes (– —)

Dashes come in two sizes: the En dash (–) and the Em dash (—). The En dash is longer than a hyphen but shorten than an Em dash.

The En dash (–) is used for suggesting a range of numbers such as time periods, sports scores or page ranges.

  • Our bank is open 8a.m.–8p.m., Monday–Friday.
  • The players are disappointed after losing the match 3–1 to Spain.
  • Abraham Lincoln (1809–1865) was the 16th President of the United States.

The Em dash (—) is used to indicate breaks or pauses in a sentence, to quote sources or to separate a series of words within a phrase.

  • We plan to visit London this summer — if the visa is approved.
  • My three friends — John, Peter and Richards — are moving to New York.
  • “Well done is better than well said.” — Benjamin Franklin.

Ellipsis (…)

An ellipsis (…) is a series of three dots (periods) and two spaces in a row and they are used to indicate omission of one or more words in the quoted material. If the ellipses follow a complete sentence, end that sentence with a period, insert a space, then the ellipsis (…) followed by a space.

  • “All the world’s a stage, and all the men and women merely players.…” — Shakespeare
  • “I have a dream … they will not be judged by the color of their skin but by the content of their character.” — Martin Luther King, Jr

Quotes & Apostrophes (‘ ’ “ ”)

Your computer keyboard creates straight quotes (or dumb quotes) though what you really need to use are smart quotes (or curly quotes) that can be easily written in HTML. The dumb quotes are best used for writing programming code.

Use double quotation marks (“ and ”) to identify the exact words of a person, to indicate irony or for writing titles of creative works.

  • The last episode of “Friends” was the most-watched program of the year.
  • Thoreau said that “that government is the best which governs the least”.
  • They recalled the “toy safety” buttons as they were contained lead paint.

Use single quotes (‘ and ’) to indicate quotes within quotes. The right curly quotation mark (’) can also be used for smart apostrophe instead of the straight apostrophe.

  • John said, “I told her, ‘the traffic will only get worse.’”
  • Her answer was, “I’ll call you in the next hour or so.”

Prime (′ ″)

While we often use apostrophe (') or quotation marks to indicate units of measurement (like feet or seconds or degrees), the correct symbol is Prime that are likely slightly slanted quotes written as ′ (single) and ″ (double).

  • The height of this Ferrari car is 47′8″
  • I am currently at 27° 11′ 45.315″N, 78° 1′ 27.1668″ W.

Web Typography: Further Reading & Resources

Punctuation MarkSymbolHTML EntityCode Decimal
Apostrophe’’
En dash––
Em dash——
Ellipsis……
Single Quote (open)‘‘
Single Quote (close)’’
Double Quote (open)““
Double Quote (close)””


This story, The 10 HTML Codes You Need to Know for Writing on the Web, was originally published at Digital Inspiration on 07/04/2014 under English, Internet

How to Force the Browser to Remember the Username and Password

When you enter your username and password to log into a website, Google Chrome will prompt you to remember the password. If you accept, Chrome saves the password internally and the next time you open that site, it will auto-fill the username and password fields for you.

The password-saving feature is available in all modern browsers but some websites, maybe for security reasons, disable this option for their login forms. For instance, the PayPal website doesn’t allow the browser to remember your password and thus you are forced to enter the password every time you open PayPal. Some banks websites do that as well.

TL;DR — Use the Remember Password extension for Chrome and it will force the browser to remember passwords even if the site has disabled the option.

You can force the browser to remember your password

You can force the browser to remember your password

How Websites Disable Password Saving

Websites can easily disable the auto-fill option for login forms by setting autocomplete=off for the password field. For instance, if the login form is written as below, the browser will never prompt the user to save the password field because form autocompletion is turned off.

<form>
 <input type="text" name="username">
 <input type="password" name="password" autocomplete="off">
</form>

Force the Browser to Remember Password

Now that you know how websites turn off the option to remember passwords, getting around this problem is simple.

You can set the autocomplete attribute of the password fields on a web page to on (if they are off) and you’ll be able to save passwords. Here’s a piece of JavaScript that will automatically turn on autocomplete for all password fields on a web page.

  var fields = document.querySelectorAll('input[type="password"]');
  for (var i = 0; i < fields.length; i++) {
    fields[i].autocomplete="on";   
  }

No, you don’t have to worry about the code as there’s a simple extension for Chrome – Remember Password – that does it automatically for you.

Install the Remember Password extension and then open a site like PayPal that does not allow you to save passwords. Login with your username & password and the browser will now prompt you to remember the password.

Also see: The Best Google Chrome Extensions


This story, How to Force the Browser to Remember the Username and Password, was originally published at Digital Inspiration on 04/04/2014 under Google Chrome, Password, Software

How to Delete your Google Chrome History Selectively

Would you not like Google Chrome (and Google) to keep a record of websites that you have visited recently? Well you can remove your browsing history from Chrome in two easy steps. Type chrome://history in the browser’s address bar, click the “Clear Browsing Data” button and your history will be deleted permanently.

Quickly select items in your Google Chrome history

Quickly select items in your Google Chrome history (video)

Remove Chrome History Selectively

Now consider a slightly different scenario. You want to preserve most of the browsing history in Chrome but would like to selectively remove certain items from the history. Maybe you want to remove all traces of visits to a particular website. Or you are trying to remove all web pages from Chrome’s history that contain a particular keyword.

That’s not difficult either. Use the search box in the Chrome history page to find web pages from a particular website, then hover your mouse over the items you wish to remove and select the checkbox. Do this for every page you need to remove and then click the “Remove Selected Items” button.

If you are to remove 50 pages from the history, you will have to select 50 different checkboxes manually. There’s no “Select All” button in Chrome’s history pages.

That can be tedious task so here’s a simple workaround that requires no Chrome extensions.

Select the checkbox against the first item in the history results and then scroll to the bottom of the history page. Now select the checkbox against the last item but keep the SHIFT key down. This will select the entire list and you can now remove them from history with a click.


This story, How to Delete your Google Chrome History Selectively, was originally published at Digital Inspiration on 02/04/2014 under Google Chrome, Software

The Best Online Tools To Know Everything About a Website

How do I contact the owner of a website? Where is a particular website hosted? What other websites are hosted on that same server ? Is the site using WordPress or the Drupal platform? What ad networks are they using to monetize a site? Is the site accessible from China?

The best tools to know everything about any website. Picture credit: Flickr

The best tools to know everything about any website. Picture credit: Flickr

Here are some of the most useful online tools that will help you know each and every detail of any website. Let’s get started.

  • just-ping.com — Use Just Ping to determine if a particular website or blog is accessible from other countries. Unlike other online ping services that have service in a couple of locations, Just Ping has 30 monitoring stations across the world including Turkey, Egypt and China. If the ping results say 100% Packet Loss, most likely the site is inaccessible from that region.
  • who.is — If you like to know the contact address, email and phone number of the website owner, this free whois lookup service will help. This is a universal lookup service meaning it can simultaneously query the whois database of all popular domain registrars.
  • whoishostingthis.com — Enter the URL of any website and this online service will show you the name of the company where that website is hosted. This may come handl if you need the contact information of the web hosting provider for writing a DMCA Notice or if you are looking to switch web hosts.
  • popuri.us — You can use popuri to estimate the relative popularity of a website on social sites like Twitter, Google+ and Facebook. It also display the Google Pagerank of a website and the Web of Trust matrix.
  • chillingeffects.org — When there’s a copyright related complaint against a website, a copy of that letter is archived in the Chilling Effects database. Anyone can query this public database to know about all the copyright infringement complaints against a particular website.
  • myip.ms — MyIP.ms offers a comprehensive report of any website or I.P. Address. You get to know about the hosting provider, the physical location of a website, the IP Address change history of a website and the DNS information. Netcraft also offers similar reports.
  • ewhois.com — Ewhois, short for enhanced whois lookup, will help you determine other websites of someone. It looks the whois details, the AdSense publisher ID and the Google Analytics code of websites to figure out other web domain that may belong to the same owner. See example.
  • builtwith.com — Use BuiltWith to know the technology stack of any website. It helps you figure out the mail service provider of a domain, the advertising partners, the tracking widgets that are installed on a website and whether the site is using any CDN like Amazon S3 or Google Cloud. See example.
  • semrush.com — If you wish to analyze your competitor’s website, this is tool to go with. SEMrush will help you figure what organic keywords are people using to find a website, what is the site’s traffic and which are the competing websites. See example.
  • whatsmydns.net — When you buy a new domain or switch from one host to another, the DNS records for the domain change and it may take a while to propagate these changes worldwide. WhatsMyDNS check your DNS records from various locations and it can check your domain’s A, CNAME and MX records.
  • modern.ie — This online app will help test your website’s compatibility with various web browsers and detects coding errors that might cause problems. The site is integrated with BrowserStack so you can quickly know how your site looks on different devices and browsers.
  • developers.google.com — Find the Page Speed score of any website on both desktop and mobile devices. The higher this number, the better. The Google tool also offers suggestion on how the score can be improved.
  • ctrlq.org/sandbox — – The AdSense sandbox solves two problems – it shows the various advertisers that are targeting a website and it will also help you figure out if a particular web domain is banned in the AdSense network or not.
  • httparchive.org — The HTTP Archive is a repository of all performance related metrics for a website. It keeps a record of the size of pages, their average load time and the number of failed requests (missing resources) over time. See example.

Also see: 101 Most Useful Websites


This story, The Best Online Tools To Know Everything About a Website, was originally published at Digital Inspiration on 02/04/2014 under Web Domains, Internet, Tools

How to Make Money Online by Losing Weight (Not as Crazy as it Sounds)

It may seem a little unusual for me to write a blog post about losing weight.  It’s a bit outside the scope of what I usually write about.

But…I came across a way where you can make a little bit of money by losing weight, so why not, right?

This certainly isn’t for everyone, because not everyone needs to lose weight.  I don’t need to lose weight (I’m not obese or anything), but I’m probably close to being overweight, so I can definitely stand to lose 10-20 pounds. Add that to the fact that I’m having a beach wedding in about 8 months, so it couldn’t hurt to shed a few pounds for the pictures that I may look at once and never again. :D

Allow me to explain exactly what I’m referring to…

Betting On Your Weight Loss

Some people require an extra push when it comes to losing weight.  Losing weight for the sake of losing weight isn’t always enough of a motivating factor.

Take me, for example.  I’m 6 feet tall, and was around 195 pounds when I started this little weight loss challenge.  I’m nowhere close to being “skinny,” but 195 lbs. at 6 feet isn’t exactly “fat” either.  However, it’s not my ideal weight when it comes to being as healthy as I can be.

Because I don’t feel or really look overweight, I never quite had the motivation to lose weight, even though my ideal weight is closer to 175 lbs.

So, I came across something called HealthyWage.

HealthyWage is a website that allows you to bet against your own weight loss.  There is money to be made if you can win your bet (you can get a return of 10%+), but the bigger motivation is to not lose the money that you’ve wagered.

How It Works

It’s a very simple process.

First, you fill out some basic information about the weight loss challenge that you want to take on.

Your prize is based on how much you choose to wager, your current weight, how many pounds you want to lose, and the duration of the challenge.  I don’t believe they’ll give you much of a prize for saying you want to lose two pounds in a year (as an extreme example).  It needs to actually be somewhat challenging.

Next, you fill out your basic information.  Yes, of course you have to give them your e-mail address and some other personal information, but as I’ll explain below, this is a very legitimate business, and you can feel safe knowing that they aren’t going to run off with your money.

Before the challenge officially begins, you need to verify your current weight.  After all, if they didn’t have a way of verifying your current weight, people would surely abuse the system.

They offer a couple ways of verification.  The easiest way (and it’s what I did), is that you take a very short video of yourself weighing in on a scale (<30 second video clip). They have specific instructions for how the video must capture your weigh-in, but it’s very easy to do.  I did it with the camera on my iPhone.

If you don’t want to record a video of yourself, you can visit a fitness or health professional and have them fill out a form that verifies your current weight.

The Exact Details of My Challenge

I went into this whole thing with a goal of losing 20 lbs.  Although I was around 195 lbs., I decided to start the challenge in the evening after dinner, when I’m typically at my heaviest point in the day.  It may only add a couple pounds, but it gives me a little room for error when it comes to actually beating this challenge.

Here’s where everything stands right now:

As you can see, I started at 197 lbs, and I’m currently at 190 lbs.  You’re not required to continuously update your weight – you just need to do an official weigh-in within a week or two of the end date.  I’ve set my end date to be 10/21/14.

Also, you don’t need to bet all of your money up front.  In my case, I’m wagering $30/month for 8 months.  That’s $240, to win $266.67.  So, aside from the motivation of NOT losing the $240 I bet, I stand to win $26.67.

Depending on your tolerance for risk, you can bet a lot more than I have, or bet that you’ll lose more weight over a different time period, and you can stand to win a lot more than I do. It’s calculated based on all the different variables that you control.

Is It Legitimate?

I can definitely understand the concerns of legitimacy – people are wondering, “Will they actually pay out?” “How can a company like this make any money?”

Regarding the second question, I think it’s pretty simple how they make money.  In addition to sponsors (which may be enough on its own to make the business profitable), the company also makes money on everyone who doesn’t win their challenge.  I have to imagine that there are a lot of people who go into this with the best of intentions, and ultimately lose.

In my situation, they only stand to lose $26.67 if I win, but if I lose, they make $240.  And for me, losing 20 lbs. is no small feat.  I haven’t weighed 177 lbs. in probably close to 10 years.  I may be down 7 lbs. already, but those were the easy pounds.  The next 13 lbs. will be a struggle to lose, but I’m up for the challenge.

Now, for the question of, “Will they actually pay out?”  In short, yes, they will.   Before I jumped into this, I did some research online to see what I can find out about the company. There have been numerous reports of people who have been paid already, outside of the testimonials shown on HealthyWage’s website.  Also, they have been featured on several national TV news/media programs.

Here’s a clip from Good Morning America:

According to an article on Yahoo! Finance, it looks as though there have been many corporate groups who have gotten on board with this challenge too:

“In 2011 the company secured over 250 high-caliber corporate participants, including General Electric, CDW, New York & Company, Healthfirst, and many large hospitals, health systems, insurers, school districts and municipal governments throughout the U.S. seeking to bolster their corporate wellness initiatives.”

The article also mentions that, in 2011, HealthyWage paid out nearly $500,000 in winnings. I know 2011 was a long time ago, but the fact that they are still around 3+ years later is a pretty good sign that they are running a legitimate operation.

More importantly, there are many people who have written (on forums and whatnot) about their experience actually being paid by HealthyWage.   Here are a couple snapshots from the forum on Slickdeals.net, where people were discussing HealthyWage:

If you look hard enough, you will find skeptics who think this is some sort of ponzi scheme, but the fact of the matter is, it’s a profitable business model.  The company can make money without relying on new participants feeding money to pay off older participants.  They make money with sponsors and the wagers from the people who lose. 

I’m In.  Are You?

As I mentioned before, I started my challenge a little over a month ago.  For me, this really isn’t about the little bit of money I’ll earn – it’s about having an additional incentive to lose weight and be healthier.  This isn’t for everyone, but I think if you’re someone who has a lot of weight to lose, you can use something like this to your advantage.

If you want to try HealthyWage, sign up here.

(This is my referral link, and by signing up under my link, you’ll add a little bit of money to my reward.  I’ll only get it if I win my challenge!)

I’ll probably post an update when I get closer to completing the challenge later this year, if anyone here finds this interesting.

Is this something you’d be willing to try, or have already tried?  Please leave a comment below – I’m really interested in hearing what you have to say.

 

-------------

Thanks for subscribing to my feed! For more great content, check out my Muse Creation Newletter for tips, tricks, and ideas that I won't share on my blog.

Also, follow me on Twitter!

Thanks again!

How to Make Money Online by Losing Weight (Not as Crazy as it Sounds)

Things to Look for in a New WordPress Theme

The WordPress ecosystem has grown exponentially in the last few years and there’s a never ending supply of WordPress themes coming from independent developers and marketplaces. With so many choices available, how do you choose a WordPress theme? Should good design and typography be the only criteria or are there other things you should look for before picking a theme?

WordPress Themes

Tips for Choosing a WordPress Theme

Design is obviously the most important factor but not the only one. Most WordPress theme developers have a demo website where you can thoroughly evaluate the various features of their themes and these live demos can help you decide whether a theme is worth having or not.

How often is the theme updated? Look for the changelog where theme developers detail new features that have been added to the theme and the various bugs that have been fixed over time. Don’t go for themes that are elegant but haven’t been updated in past six months or ones that aren’t compatible with the most recent version of WordPress.

Is the theme fast enough? Take the URL of the live version of a WordPress theme and perform a speed test. The Google tool will help you quickly analyze the performance of various web pages of a WordPress powered site and you should prefer a theme with a page score higher than 70.

Is the theme Responsive? If you are buying a new WordPress theme, make sure that it uses responsive design and thus looks good on all screens from 27″ monitors to 10″ tablets to 4″ mobile phones. While testing for responsiveness, pay special attention to how the various menus, inline tables and search boxes behave as you resize the browser.

Is the theme customizable? While any WordPress theme can be edited, you need not have to go to a programmer to make minor changes. A theme should allow you to switch to a different color scheme or let you use another font family without having to fiddle with CSS. Can you change the width of the sidebar, or remove it completely, without changing any HTML?

Is the code semantic? Well-formed semantic HTML5 markup helps search engines better understand the structured information inside your web pages. View the source code of your WordPress pages and look for semantic tags like section, article, footer, etc. You can also use the W3.org tool to know the semantics data available in a WordPress theme.

Is the code bloated? Open the HTML source of a WordPress theme and count the number of <script> tags. If you find half a dozen scripts embedded on that page, it maybe a good idea to explore other themes. I would also prefer to go with WordPress themes that use CSS sprites and icon fonts for small graphics.

Is the code intelligent? WordPress theme developers rely on JavaScript and jQuery plugins to add “visual” features like sliders, star ratings, social sharing buttons, syntax highlighting, animated transitions, etc. but these elements increase the weight of the page. A good theme should conditionally add JavaScript – the slider related JavaScript code should be included on pages that have the slider and not on every page of the site.

Does the theme offer hooks & filters? When you install a new WordPress theme, you will likely create a “child” theme and not change anything inside the parent theme. This helps because if the developer releases a new version later, you can easily upgrade without overwriting any of your changes. If a theme has its own hooks and action filters — say a hook for adding an excerpt just after the title — it becomes even easier for you to insert your own code into the WordPress theme without having to touch any PHP file in the parent or child theme.

Are shortcodes included? With shortcodes, you can easily included formatted content in your WordPress blog posts and pages with minimal markup. While shortcodes can be added to a theme through external plugins, it helps if certain shortcodes — likes the ones for adding testimonials, multi-column grids, maps, videos and form elements – are included in the theme itself.

Related: The Most Essential WordPress Plugins

Are major browsers supported? Your WordPress website should work and look consistent across all popular mobile and desktop browsers. You can use online tools like browsershots and browserstack to know if the theme you are looking to buy is really compatible with various web browsers.

Do they offer support? Once you buy a new theme, you’ll most definitely have questions around installation and customization of the theme and what better place to ask questions than the theme developer himself. Are they on Twitter? Do they have a support forum? Are the theme developers actively answering user queries? This will also help you discover other website where that particular WordPress theme is currently live.

Is the theme original? Websites like Medium or Quartz have excellent designs and you can easily find dozens of  WordPress themes — both free and commercial — that are exact clones of these beautiful websites. These should be avoided as web design is intellectual property too.

Also see: Things You Should Do After Installing WordPress


This story, Things to Look for in a New WordPress Theme, was originally published at Digital Inspiration on 25/03/2014 under WordPress, Internet

How to Schedule your Email Messages in Gmail with a Google Sheet

Have you ever wanted to write an email now but send it a later date and time? Maybe you are sending birthday greetings and would like the email message to be delivered on the exact day. Or you have written the reply to an email but would like to schedule delivery in the recipient’s time zone when the message is more likely to get read.

Microsoft Outlook has a built-in scheduler to help you delay the delivery of email messages. After you are finished writing an email message and hit the Send button, the message isn’t delivered immediately — it stays in your outbox and is sent at the specified time automatically.

Gmail doesn’t let you schedule a later delivery of email messages but there are browser extensions — like Boomerang and Right Inbox — that let you specify a future send date for your outgoing email messages.

These are however subscription based services that allow you to send only a limited number of scheduled email messages for free per month. The other concern is privacy – you will have to grant read and write access to your entire Gmail account to a third-party to use scheduling inside Gmail.

How to Schedule & Send Gmail Messages Later with Google Sheets

If you are reluctant to provide access to your Gmail account to another service, there’s an alternative – Google Sheets.

What you can do is compose all your emails that you would like to be delivered later in Gmail and then specify the exact delivery date and time for these messages in the Google sheet. The messages would be delivered automatically at the time chosen by you. Internally, there’s a little Google Script that takes care of sending the messages at the appropriate date and time.

Schedule Gmail Messages

Schedule your Gmail – Step by Step

Go to your Gmail mailbox and compose a few test messages that you would like to be delivered later. Your draft messages can have rich formatting, you can add attachments, signatures and even inline images. Make sure that you have included the recipient’s email address in the TO field of the drafts.

  1. Click here to make a copy of the Gmail Scheduler sheet in your Google Drive and change the default timezone.
  2. Open the sheet, choose Authorize under the Gmail Scheduler menu and grant the necessary permissions. This script is running in your own Google Drive and none of your data is accessible to anyone else.
  3. Choose Gmail Scheduler -> Fetch Messages to import all the draft messages from your Gmail account into the Google Sheet.
  4. Set the scheduled date and time for individual messages in column D of the sheet. You can double-click a cell and use the date picker or you can manually enter the date and time as m/dd/yyyy h:mm:ss in 24 hour format.
  5. Go to Gmail Scheduler -> Schedule Messages and run the scheduler. You can close the spreadsheet and it will send messages at the specified time automatically.

Video Tutorial – Schedule Gmail Messages

Here’s a detailed video tutorial (download) that will walk you through the steps.

Scheduling Gmail messages with Google sheets is easy. Please do note that once a message has been scheduled, you should not edit the corresponding Gmail draft message else that particular message would be removed from the queue.

If you wish to edit the draft or need to change the delivery time once the messages have been scheduled, you can repeat the steps #3 to #5 and reinitialize the queue.

Awesome Google Scripts → Google Scripts Developer →

How to Change the Spreadsheet Timezone

The scheduled date and time that you specify in the cells use the default timezone of the spreadsheet. If you wish to send mails in a different timezone, open the spreadsheet and pick a different timezone under File -> Spreadsheet Settings menu.


This story, How to Schedule your Email Messages in Gmail with a Google Sheet, was originally published at Digital Inspiration on 21/03/2014 under GMail, Internet

Use Google Maps as a Background of your Webpage

This is a demo of contact form that embeds a Google Map in the background. It isn’t using a static screenshot image of Google Maps in the background but the map is an interactive one — you can zoom in and out, drag the Pegman to turn on street view or even toggle between the Satellite view and the Maps view.

Contact Form with Google Maps

There are basically two layers on the page – one is the map and the other is the form – and we are using the z-index property of CSS to define the stack order. The form has a higher z-index than Google Maps and thus the latter appears in the background. Let’s look at the actual code now.

The HTML — There are two DIV elements – the map will render inside the element with ID #googlemaps while everything that you add inside #contactform will show up in your form. You can even embed a Google Form here.

<div id="googlemaps"></div>
<div id="contactform">
  <!-- You can even embed a Google Form here -->
</div>

The CSS — The #googlemaps element occupies the entire height and width of the page while the #contactform has a fixed width. You can also change the opacity level of #contactform to make your forms slightly transparent.

#googlemaps { 
  height: 100%; 
  width: 100%; 
  position:absolute; 
  top: 0; 
  left: 0; 
  z-index: 0; /* Set z-index to 0 as it will be on a layer below the contact form */
}

#contactform { 
  position: relative; 
  z-index: 1; /* The z-index should be higher than Google Maps */
  width: 300px;
  margin: 60px auto 0;
  padding: 10px;
  background: black;
  height: auto;
  opacity: .45; /* Set the opacity for a slightly transparent Google Form */ 
  color: white;
}

The JavaScript — Find the latitude and longitude of your place and replace the co-ordinates in line #7. You can then copy-paste the modified JavaScript code in the footer of your HTML page.

<!-- Include the Google Maps API library - required for embedding maps -->
<script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>

<script type="text/javascript">

// The latitude and longitude of your business / place
var position = [27.1959739, 78.02423269999997];

function showGoogleMaps() {

    var latLng = new google.maps.LatLng(position[0], position[1]);

    var mapOptions = {
        zoom: 16, // initialize zoom level - the max value is 21
        streetViewControl: false, // hide the yellow Street View pegman
        scaleControl: true, // allow users to zoom the Google Map
        mapTypeId: google.maps.MapTypeId.ROADMAP,
        center: latLng
    };

    map = new google.maps.Map(document.getElementById('googlemaps'),
        mapOptions);

    // Show the default red marker at the location
    marker = new google.maps.Marker({
        position: latLng,
        map: map,
        draggable: false,
        animation: google.maps.Animation.DROP
    });
}

google.maps.event.addDomListener(window, 'load', showGoogleMaps);
</script>

You may refer to the HTML source of this contact form for a complete example.


This story, Use Google Maps as a Background of your Webpage, was originally published at Digital Inspiration on 21/03/2014 under Embed, Google Maps, Internet