Videos Courses - Calculate Total Duration

Paul Solt Swift iPhone App Expert

I record a ton of videos on iPhone app programming, and I didn't have a good way to get the total time for a course from a set of videos.

I previously used VLC, but that gets out of hand when you have 30+ videos to manually calculate total duration.

Day 1 videos are just the beginning

Day 1 videos are just the beginning

I wrote a script in Python, since the mdls command didn't seem to work in Swift. Maybe next time it'll be Swift.

Run this code in Terminal and it'll calculate the lengths of all the .mp4 videos and output them to the console. It doesn't work with other video types, but you can grab the code and tweak it. I export all my videos with handbrake (normal settings), which gives me .mp4 video files that are small.

As of now, I have 101 videos from the first 14 days of my Swift iPhone programming course. Using this script I have a total of 12 hours 32 minutes of content.

Run the code

Open Terminal on Mac using Spotlight (Command + Spacebar) > type Terminal > Press enter

python VideoDurationCalculator.py /path/to/your/video/folder

Example:

python VideoDurationCalculator.py /Users/Shared/Course\ Videos/1\ -\ Swift\ in\ 31\ Days/Swift1\ -\ Export\ 1080

VideoDurationCalculator.py

import os
import commands
import sys

# Paul Solt - get the length of all videos within a folder (recursive)
#
# Depending on the number of files/folders, it can take time to complete
#(100 files ~2.018 seconds to run)

# Set your video folder path here
defaultPath = "/Users/Shared/Course Videos/1 - Swift in 31 Days/Swift1 - Handbrake 1080"


def main():
    path = defaultPath

    if len(sys.argv) == 2:
        path = sys.argv[1]
    else:
        print "Notice: Using default path:", defaultPath, "\n"

    #test path
    if os.path.exists(path):
        # Grab all the video (.mp4) files recursively for a folder
        filenames = []
        for root, dirs, files in os.walk(path):
            for file in files:
                if file.endswith(".mp4"):
                    filenames.append(os.path.join(root, file))

        #Calculate the total time of all videos in folder
        totalTimeInSeconds = 0
        print "Calculating video lengths..."
        for file in filenames:
            # Calculate total time
            lengthInSeconds = videoLength(file)
            totalTimeInSeconds += lengthInSeconds

        hours = int(totalTimeInSeconds / 3600)
        minutes = int((totalTimeInSeconds - (hours * 3600)) / 60)
        print "hours:", hours, "Minutes:", minutes
    else:
        print "Error: No folder found with path:", path

# Parse the plist format from mdls command on Terminal
# @return the time in seconds
# mdls -plist - filename.mp4
def videoLength(filename):

    myCommand = "mdls -plist - "
    myCommand = myCommand + "\"" + filename + "\""

    status, plistInput = commands.getstatusoutput(myCommand)

    videoLength = 0
    searchTerm = "<key data-preserve-html-node="true">kMDItemDurationSeconds</key>"

    # 1. find "<key data-preserve-html-node="true">kMDItemDurationSeconds</key>"
    # 2. grab text until next </real>

    realStart = "<real data-preserve-html-node="true">"
    realEnd = "</real>"

    index = plistInput.find(searchTerm)

    # Offset by length of search term
    startIndex = index + len(searchTerm)

    # Calculate new start/end positions
    startIndex = plistInput.find(realStart, startIndex)
    endIndex = plistInput.find(realEnd, startIndex)

    #offset start by length of realStart text
    startIndex += len(realStart)

    if startIndex != -1 and endIndex != -1:
        #Split and parse as number
        numberString = plistInput[startIndex:endIndex]
        numberString = numberString.strip()
        videoLength = float(numberString)
    else:
        print
    return videoLength

# Run the main method
main()

Connect

How I raised over $94,000 on Kickstarter to teach iPhone programming

Funding progress for my 2nd Kickstarter project.

Funding progress for my 2nd Kickstarter project.

In this post I'll cover my background, which led up to launching my Kickstarter projects. I’ll also divulge the process behind—and insight as a result of—running two successful campaigns (see links below!).

You can use my Sketch file to create your project image, so that it fits correctly on the web and in the widgets.

My background

It is my firm belief that you should love what you do. I teach iPhone app programming via online course videos. I have enjoyed programming since I first figured out how to do it. It took many failed attempts in middle school, but I kept trying. Having the ability (i.e. super power) to take an idea and transform it into an app that can control a device or a robot is awesome.

When I first started coding in high school, I enjoyed walking around the classroom helping other students find bugs with missing semicolons in C++ and Visual Studio 6. Helping people was something I came to naturally in the classroom, and I continued the trend in college and online through my personal blog.

I took it a step further when I became a computer science student instructor and later an adjunct professor at RIT. My most recent leap forward has been the one into my role as an online teacher.

Throughout the process, my goal has always been to make cool things and help other people do what I do. I think it’s very important to give back and to have an open mind.

Motives

I didn’t go to college for a piece of paper—I did it to learn. In the process, I found out that I enjoyed teaching people. I delayed graduating for over four years to work on my app company, Artwork Evolution, and finally finished my masters in computer science in May of 2014.

My work experiences at Apple and Microsoft provided a unique look at the inner workings of two of the biggest companies in technology. They also showed me that I didn't want to work for someone else—I wanted to be creative and make things I cared about.

Why teach?

Because I want to clone myself, and I think teaching other people to think like me is probably the lowest-cost cloning option (I’m a little selfish).

There are “best practices” when it comes to writing code, and most aren’t taught in school. My goal is to provide insight on that front and leverage people who are smarter than I am to help teach you the difficult or advanced topics.

How did I successfully raise over $94,000?

Using lots of research, analysis, customer feedback, iteration . . . and personal emails (I sent an email to each backer—find out more below).

For the first project, Nick Schneider and I did a ton of crazy research (he’s a numbers guy—PhD from the University of Pennsylvania—and does scientific research for his engineering degree).

We looked at statistics for successful and unsuccessful projects, and we compared actual projects including apps, games, and online course materials.

I also made decisions based on my gut instinct: What would I like to back? What would make this project interesting?

The option for my first Kickstarter was to launch a new app, like Photo Table, or to teach online courses for iPhone apps. The decision came down to which would allow us to keep running our company, Artwork Evolution. We found online course projects that raised funds from $19,000-$150,000, while app project campaigns seemed to either hit lower targets ($2,000-$5,000) or just not get funded at all.

I didn’t have a full-time job, which made the choice easy. If I didn’t get more funding to teach what I know, I’d have to get a job at a company like Apple (which doesn't let you publish apps!)

Tips for the future Kickstarter project creator

There's a lot I want to write about, so this will probably be the first of many posts on the subject of Kickstarter.

Research

Look at successful/unsuccessful projects: what worked/didn’t work?

Ride the popular wave

A lot of my success on Kickstarter is directly related to focusing on a popular technology project. When a project is popular, it gets tons of traffic from Kickstarter users. After it drops down in popularity, the number of backers decreases significantly.

Not everything will be popular, but if you can create a project that has a high share rate and connects, you'll be in a good position to reach success on Kickstarter.

Publish it

Pick a direction and stick to it. Make sure you do 90% perfection, if you spend all your time making the perfect project, perfect prototype, or app, you're never going to finish.

Get something good, be happy with some imperfection and see what you can improve during the project.

Build your persona

Kickstarter backers want to support creative people who have credibility.

  • What makes you unique without saying you are unique?
  • What are your credentials? 
  • Do you blog?
  • Do you host a YouTube channel?
  • Do you have hardware or industrial design experience? {C}{C}

Tell your story

A good story sells on Kickstarter because people want to learn about how you got to where you are and how you’re going to help them.

Capture their emotions and they’ll be more willing to support you by backing your Kickstarter project.

They want to back something that will help or entertain them. Think: does your project sound like something you would back?

Make a good video

A good video is worth a thousand words on Kickstarter. You need to convey the idea of the project within the first 20-30 seconds. Get on camera, explain it, and then show off gameplay or the product that you’re producing.

I started using iMovie (Free) to create my videos, it was hard, but free to use. I captured camera video and b-roll (secondary shots) with an iPhone 5 for my first Kickstarter video (get a tripod and a iPhone tripod mount called the glif). I did all the editing and bought a music track from Vimeo Music Store.

For my second Kickstarter I was able to use a nicer camera Canon 6D (DSLR) and I used Final Cut Pro X ($299). There's a great course taught by Andrew Gormley on Skillshare for video editing with Final Cut Pro X, it was so helpful! I highly recommend it.

Using Screenflow, I can record my computer screen, and I also have a BlackMagic Extreme HDMI in to capture video from my iPhone/iPad.

Use b-roll (camera shots of product, people talking, sketches, etc) to make your video more exciting, and less of a headshot. 

I changed the video on every project mid-campaign. Making a good video is a lot of work, and sometimes you just need to hit “publish.” You can re-film a video if your projects not doing well. My first project didn't look like it was going to get funded until I took action to improve it.

My stance has always been to use the best audio and video you can get. Borrow or rent some equipment, especially a good microphone. The iPhone microphone is great if you're close to it, but you'll really want either a shotgun mic, lapel mic, or a $129 usb mic (AT2020) to get clean audio.

Create a short script

Practice, practice, practice!

I did over 35 takes for my last Kickstarter video, and I edited it twice during the life of the campaign. I changed the b-roll footage and shortened the original video.

Target one to two minutes for your video, and make sure the first 20-30 seconds contains an "elevator pitch" that is going to capture the audience’s attention and explain clearly what you are making.

Good artwork and text copy

Hire a designer to create compelling thumbnails for your Kickstarter project and branding. Don’t spend too much money, but you should be willing to invest in the project.

Writing takes a lot of time. For my first Kickstarter, we spent two months preparing. For the second, we spent two weeks.

Get fresh eyes to review what you write, and don’t be afraid to change it throughout the campaign. I’m constantly making changes and testing them to see what might work better. 

The goal is clarity. For the cost of a coffee, you get some invaluable feedback: test your copy on random people at coffee shops. Do they get your project in the first 30 seconds? If the answer is no, you’ll need to rework it. 

Be open

Things won't go as planned. You might have issues. Be open with your backers, they'll support you as long as you don't lie. Your credibility is on the line when you’re using a Kickstarter. Make sure you can fix or work hard to make up for any issues.

I post regular updates.

Update your project

I could change just about everything about my project. I changed the title, blurb, project text, video, video thumbnail, etc.

Don't be set in stone. Being flexible allows you to craft a compelling story, which should help you get backers. 

It may take a few days for Google/Facebook to index your new changes, so they might still show the old video. Make sure you plan ahead and do updates in the middle of the project, instead of the end.

Post updates as you reach milestones—when you have a stretch goal or addition to the reward tier. My 2nd Kickstarter project has over 20 updates, and most were from the campaign to engage my backers.

NOTE: You can't change the duration, goal amount, URL address, or rewards (see below).

Rewards

Your rewards are set in stone as soon as someone backs them. Make sure they are clear, and easy to read. Worst case scenario, add new rewards with an updated message.

I did that in my second Kickstarter after I added three bonus courses and the Apple Watch course (post Apple announcement). The bundle of 3 courses now became a bundle of 7 courses, and I added a new reward to make it clear.

I like to use capital letter titles in the beginning to help identify the reward so that if I add content to a specific level, it's easier to convey that to backers. It's a lot easier to refer to a named price reward than it is to refer to everything included in the reward when you're talking to potential backers.

Choose your rewards wisely

People don’t back Kickstarter projects to get custom t-shirts with your company logo. Would you?

The rewards need to be compelling, and your first go might not be great.

Every Kickstarter project lasts for 30-60 days. You can add new rewards as you go and find out what backers really care about.

Look at existing projects: which rewards were popular? Which rewards are ignored?

Create rewards that inspire or make someone feel appreciated. 

Throughout my projects, I’ve added bonus content to my Kickstarter. It goes a long way in terms of keeping your backers motivated and providing insight on the project.

Your project is living—you don’t need to add all the rewards in the beginning. Make it interesting and add new rewards partway through the project.

  • Use titles and content to distinguish reward levels.
  • Don't use the waterfall technique (i.e.: don’t give everything to a reward level and below—it makes it hard to add new rewards at different price points)!
  • Don't give everything away for $5.
  • Use bundles to distinguish reward levels.

Skip secondary physical goods

If you're not in the business of making the item, skip it. You'll waste your money and time fulfilling rewards that don't provide value to your project.

Price your rewards intelligently

Add a “9” to the end of your prices. Don't follow suit with every other Kickstarter project that does the $20 or $25 reward levels: make it $29 or $49.

Price the work at something reasonable—something that'll make you feel as though you're not wasting your time fulfilling it. You want to feel good about the project, not stressed out by it.

Rewards must add up to goal

I have seen a lot of Kickstarter projects try to raise $50,000, but then offer the entire project for a $5 reward level. The math doesn’t add up. You’d need 10,000 backers . . . which is really, really hard to get.

I recommend trying to have your project funded with 100-200 backers. Set your rewards to make that possible.

Does paid marketing work?

No. I’m not convinced paid ads works unless you know what you’re doing. If you're boot strapping and doing everything yourself, save ads for a future campaign. It's not worth your time, focus on the project.

Kickstarter doesn’t provide good referral analytics, so it’s hard (impossible) to know if your ads are driving sales or not. You can add the url tag

?ref=somewebsite_message

to the end of a website address to get tracking. However, Kickstarter sometimes strips the code, or it doesn’t show up in analytics.

https://www.kickstarter.com/projects/paulsolt/31-days-make-iphone-apps-and-games-with-swift-for/?ref=iphonedevtv_94000_blog

Also Kickstarter’s web interface only shows a certain number of referrals, while their iPhone app (September 2014) shows a comprehensive list.

My referrals are listed below. You can see some that I had control over and others that were from Kickstarter or news articles about my project.

0
0
1
14
82
Paul Solt
1
1
95
14.0
 
 

 

 
Normal
0




false
false
false

EN-US
JA
X-NONE

 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 
 
 


 <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" De…

Lots of sources for referrals that I controlled as well as others that were out of my control.

Note: Facebook referrals are from my friends and followers, not my ads.

What worked?

  • I emailed every backer or potential backer (i.e.: responded to every email/message I received).
  • I posted videos on YouTube with annotations to my Kickstarter project. 
  • I emailed my mailing list about additions to the project (i.e.: Mailchimp referrals).
  • iPhone Life wrote a blog post about my project that drove $2k+ in sales from iPhoneLife.com and flipboard.com.
  • iPhoneDev.tv and PaulSolt.com have links and posts about the project.
  • I posted links on reddit.com.
  • Ranking high on Technology and Apps increased project views and backers.
  • Google search drove a good amount of backers.

What didn’t work?

I spent $789 on Facebook ads, some for my Kickstarter campaign and some for my course website.  It was mostly an experiment to learn how to create better ads. I was A/B testing different ad copy and images spending $30/day for a short period of time. 

A/B testing is where you have two ads that are identical, except you change the picture, or one of the lines of sales copy. Your goal is to compare the change (i.e.: scientific method) and test your sales copy hypothesis. The goal is to find ads that convert to sales, and in this case Kickstarter backers.

I don’t recommend ads unless you can track conversions. To do advertising you need to be willing to spend money to A/B test ads against each other. If you can’t track conversions, however, then you’re shooting in the dark.

I was able to drive one $149 backer from BuySellAds.com for a $30 ad, but subsequent ads ($60) did not convert (or I didn’t see referral).

More targeted ads may have worked better, but I didn’t focus on this since my personal communication techniques (i.e.: email) were much more effective.

Conversion Rate

The conversion rate is based on the number of video plays and subsequent backers.

  • 1st Kickstarter: 705 backers / 9,627 plays (41.04% completed) = 0.0732 (7.32%)
  • 2nd Kickstarter: 492 backers / 8,718 plays (68.33% completed) = 0.0564 (5.64%)

A better conversion rate would help, so I probably should experiment with a different video, or my story isn’t adding up: if people are interested enough in the topic to watch your video, but then don’t contribute to the project, there must be some sort of disconnect.

Email or message every backer

I use TextExpander to create quick messages to backers. It helps quickly paste in links to different resources that backers ask about.

1. Typing ";kick2" gives me the Kickstarter project link: https://www.kickstarter.com/projects/paulsolt/31-days-make-iphone-apps-and-games-with-swift-for

2. Typing “;ty” creates the following message and prompts me for the backers name. Pressing enter creates the message and I can quickly send it to each backer who supports the project.

Thank you John,
I'm curious, how did you find my project?
How can I help you learn to make iPhone apps?
-Paul
PaulSolt@iPhoneDev.tv
PS Please share this project with your friends on Facebook or email. I appreciate your support!
Project Link: https://www.kickstarter.com/projects/paulsolt/31-days-make-iphone-apps-and-games-with-swift-for/?ref=kmessage

3. I’ve sent over 490 emails to backers and responded to hundreds more—sometimes multiple times.

On my iPhone email account (PaulSolt@iPhoneDev.tv), I sent an additional 295 email replies during the Kickstarter campaign. Lots of typing!

  • I really think it’s important to get insight from your backers.
  • Find out where they came from, what their background experiences are, etc.  
I send hundreds of emails, sometimes in big spurts.

I send hundreds of emails, sometimes in big spurts.

Build an audience

Start building your audience today. Just remember that most of your friends and family will not support your Kickstarter project. Don't feel bad—they aren't your target audience.

If you want to have a successful Kickstarter campaign, you need to build an online audience that you can market to. I have a following from my courses on udemy.com, skillshare.com, iPhoneDev.tv/blog, Facebook, and Twitter.

My Mailchimp mailing list has over 860 people, which is something I’ve spent the past year and a half growing. Most of the growth has been from my personal iPhone blog, where I include a signup widget alongside my blog posts.

Giving something away for free is a great way to get someone’s email address. They’re happy to provide contact information if you have something they value.

A snapshot of my subscribe box on my website. I change what it says regularly.

A snapshot of my subscribe box on my website. I change what it says regularly.

Teaching online courses is a great way to establish a web presence.

Icon Design

The Kickstarter video icon is 1024x768, however it gets cropped for the smaller views. Use my Sketch template to design your icon

Use this template to make sure your text is readable.

Use this template to make sure your text is readable.

Stretch goals

These goals are open-ended goals that many Kickstarter project owners add to encourage backers to share the project to unlock new rewards.

Don’t post these immediately. Kickstarter discourages stretch goals, especially if they deviate too much from your project.

I think stretch goals are a good way to motivate people to share your project, but they really only come into play after your project is funded.

Having a plan before you start is good. Think about what additional things you can offer without adding too much work to your side. You want to be able to manage your stretch goals. I’m still working to fulfill stretch goals from my first Kickstarter. 

It’s better to over-deliver than over-promise, which I wish I had done first. Apple announced a new programming language, which altered my direction with my stretch goals from the first Kickstarter.

You want to make sure your stretch goals don’t overwhelm you. Wait to post them until after your project’s funding goal is reached. Your feedback from backers should help steer the direction. I used Google forms to survey my backers about potential extras.

Failure is an option

You can re-run a failed project . . . and, in fact, it could be better for you. You’ll learn what does and doesn’t work and can better plan the second time around.

Put yourself out there and see what people have to say. Worst case scenario, you fail and try again. My first Kickstarter almost wasn’t going to get funded until I took action to improve my video and the clarity of the project description.

1st Kickstarter project - It almost failed until I changed the video, rewards, and text.

1st Kickstarter project - It almost failed until I changed the video, rewards, and text.

Last days

The Kickstarter project locks after the campaign ends. Make sure at the top of the project you include information about you, and where "late backers" can go to fund the project (if that's an option).

My first Kickstarter raised an additional $6,000 from late backer payments, so I really raised closer to—if not more than—$100,000.

Consider these late backer payment options:

  • Squarespace.com – Business website; e-commerce option for digital or physical goods
  • Gumroad.com – Sell anything digital or physical
  • Stripe.com – Build something native using easy payments

Connect

Let me know if you want to learn about anything else related to running Kickstarter projects.

  • Email me at PaulSolt@iPhoneDev.tv
  • Follow me on Twitter: @PaulSolt
  • Subscribe to my mailing list and learn to make your first iPhone app with Swift.


14 Xcode Keyboard Shortcuts Cheat Sheet PDF

Subscribe below and I'll send you the 14 Keyboard Shortcuts for Xcode.

Further reading: Read more about the keyboard shortcuts in my previous blog post.

Download

Download the PDF on 14 Xcode Keyboard Shortcuts and save time making your next app. Subscribe below and I'll send you the keyboard shortcuts that will save you time.

Connect