Friday, November 20, 2015

Comskip: For my next trick, I'm going to make these commercials dissapear

For a couple months now I've been recording live tv as in comes in through my Over the air antenna with the help of my TabloTV. Check out this blog post to see how I copy the recorded shows from the tablo to my plex server.

But the idea came to me to take it a step further. Although it's nice that I can record these shows and watch them at my leisure (and even fast forward through any parts i want to) it's still pretty annoying to have to fast forward through the commercials.

As I searched around for a tool to fix this, I found several programs such as Avidemux that allow you to remove commercials (or any part) with relative ease and speed. I'm still not sure if Avidemux is a play on Avid (the sophisticated editing software) or A vide'o mux'er. Either way, there was one problem with these tools -- they were GUI based, which meant that automation would be difficult if not impossible.

Finally I found a tool that could also be used in the terminal -- Comskip. Comskip uses cues in the video such as black frames, audio silence/changes, and more to detect when commercials start. Then it outputs an ".edl" file which stands for edit decision list. The linux version isn't as well distributed as the windows version so I had to compile it from source and download some dependencies.
This page is where i started.

It requires ffmpeg 0.9 or greater and argtable2.

cd /var/tmp
mkdir ComSkipWork
tar xf ffmpeg-2.2.tar.bz2
cd ffmpeg-2.2
./configure --prefix=/var/tmp/ComSkipWork/install
make -j8
make install
cd ..
tar xf comskip-0.93i.tar.xz
cd comskip-0.93i
PKG_CONFIG_PATH=/var/tmp/ComSkipWork/install/lib/pkgconfig ./configure --prefix=/usr
make -j8
sudo make install

Following the above steps line for line worked perfectly except for one spot

Running make -j8 shows an error about yasm not being installed. Simply run
sudo apt-get install yasm
**If you have other problems see the bottom of this post. I actually didn't start with the above steps and therefore ended up installing a lot things on my own which may or may not be necessary.**

Now that I had comskip installed, it was time to create/setup an .ini file.
A quick google search also revealed that some have customized their .ini files for different regions.

I downloaded USA_General by Wilky13.

For my purposes I just needed to make sure that it would produce an .edl file. After confirming it that, I could now run:
comskip "filename"
and get an .edl file which tells where the commercials are.

So using the .edl file I wrote a python script to scan for any raw videos (which in my case are always .mp4 files) and compress them into .mkv files. From there it analyzes the mkv file and creates multiple temp files of the content between commercial breaks -- or the actual show. The script then concatenates these temp files into a new mkv and moves the compressed version to a backup folder in case there was a mistake. Then it cleans up all the temp files and scans for the next raw mp4. Running from a cron job every night, the OTA shows goes all the way from being recorded to the tablo, copied to my hard drive, compressed and spliced, then loaded into plex automatically.

The code is a little sloppy, but one needs to simply modify the constants including path to a static ffmpeg, and the root directory of where all their tv shows are kept.
For example, on my server

I simply point to /../TabloTv/tv and all folders and sub folders in tv will be scanned.

Here's the python script.

(scans all folders and subfolders found in constants.TV_FOLDER)


./ /path/to/filename
(executes script against passed in video only)



My first attempt followed these similar steps (i already had a static build of ffmpeg so i thought i wouldn't need it here--wrong!!), but ended with much different results.

cd /var/tmp
mkdir ComSkipWork
tar xf comskip-0.93i.tar.xz
cd comskip-0.93i
./configure --prefix=/usr
make -j8
sudo make install

Right about here
./configure --prefix=/usr
you might hit a error like this:
configure: error: *** A compiler with support for C++11 language features is required.
Ubuntu comes with the g++ compiler, but doesn't seem to cut it. Go ahead and run
sudo apt-get install g++
Now you might hit this issue:
 No package 'libavcodec' found
Another simple fix
 sudo apt-get install libavcodec-dev
And while you're at it
 sudo apt-get install libavformat-dev
 sudo apt-get install libargtable2-dev 

Friday, October 9, 2015

Open Sprinkler

As summer approached this year I realized my sprinkler controller was broken and my grass started to die. As a new homeowner, I was terrified and needed to find a new controller. Not wanting to buy a dinosaur i looked into smart controllers and found Open Sprinkler. There are other smart sprinkler systems but this one is by far the cheapest and from what i could tell, there are no real disadvantages.

As the name indicates it is an open source project and thus there is probably more assembly required than with a branded commercial product. But when it came down to it, installation was very easy. I simply switched the wires from the old controller

to the different zones on the new controller.

I was also able to reuse the power cord from my old controller and do all this setup in less than 20 minutes.

The real problem then came when i had to figure out a way to get my device connected to the internet. The controller has an ethernet port and wifi adapters can be purchased separately, but i had decided ahead of time i would try to convert my old raspberry pi into an adapter. After about two days following every tutorial i could and with no success i finally found an alternative solution. I used an old router (flashed with DD-WRT) to create a bridge. Now the router was working in reverse to receive internet connection over Wi-Fi and send it out through the ethernet into the Open Sprinkler controller. Within 30 minutes I had a connected open sprinkler system and was able to test all the zones.

Since that time i have not needed to use or even look at the controller sitting in the garage as all configuration can be done through either a free app or on a website which is served by the controller on your local network. Oh and did i mention that you can do remote access as well via port 80. Since I was already running a web server on port 80, I had to setup a subdomain and proxy to forward requests to the controller. It looks like this.
<VirtualHost *:80>
 ProxyRequests Off
 <Proxy *>
  Order deny,allow
  Deny from all
  Allow from
 ProxyPass /
 ProxyPassReverse /
 <Location />
  Order allow,deny
  Allow from all

Other great features include Weather and logs. By creating a developer account with your system can automatically access weather information and prevent recurring cycles if for example, it just rained that day. The logs are great as well and allow me to see total water usage and runtimes.

So glad I decided not to replace my broken controller with something like this!

Friday, May 8, 2015

Tablo Followup

I mentioned before that I would follow up on my post about TabloTv after I'd had some more experience with it.

The tablo tv is easy enough to setup and setting up recording is pretty straightforward too. I'm glad that I've had the 30-day trial for the TV guide feature and think i will be subscribing once it expires. Watching recorded shows via the Tablo interface or app was never my intention and i'm glad that this was the case as the startup can be a little slow at times. Upon entering the web client there is a "syncing" screen that appears and prevents you from doing anything for 30 seconds to a minute. Then when you decide on an episode to watch it can take 20 - 30 seconds before it actually starts playing. Playback is pretty smooth from that point on and I do like the live tile preview when using the 30 second and 20 second FF and RW buttons, but it's a little slow when compared to Plex which is more or less instantaneous depending on your setup. But the biggest downside is that I cannot easily share my recorded content as I have grown accustomed to in sharing my Plex library.

My intention with purchasing the Tablo was to record the shows and then allow Plex to be the player. Although there is a free Plex channel for Tablo which makes it very easy to view and play my Tablo library, I cannot share Plex channels the same way I share Plex libraries.

So I scoured the web and found this little gem. Actually it's a python script (insert ruby joke).

Essentially I've setup the Tablo to record the shows I want. This script (which runs on a cron job every night)

 pulls any newly recorded shows from the Tablo and places them into a library I've created on Plex called TabloTV. I've enabled Plex to automatically update my library twice a day so that every morning I wake up, all my new shows are there. Now I can share this TabloTV library with anyone else and goodbye HULU/Network sites, hello on-demand streamable, shareable, DVR with the freshest content available on all 4 networks.

The one downside is that I now have two copies of every episode. One of my Tablo and one on Plex. But no matter, the Tablo has a nice Auto Delete feature which I'm sure will free up space JIT style. I didn't think I would need the 4-tuner so I opted for the 2-tuner. What I didn't realize was that basically all the good shows run at the same time, so if I could do it again I would get the 4-tuner. But maybe it's a good thing. I probably watch too much TV as it is.


Wednesday, April 8, 2015


"Somewhere in Las Vegas, a man just threw his Television outside his hotel room window."
            -Simon Cowell

Why do I remember this line from American Idol season 6 (which aired over 8 years ago)? Because it was hilarious. Would I ever go back and watch this season now that I know who won??? Doubtful. It's no wonder reality TV competition shows aren't on Netflix. But then what are the cord cutters who like The Bachelor and The Voice to do?!

Enter Tablo.

Basically it records OTA TV. With a plex plugin, it should be a snap to watch current shows both at home and remotely.

Since i don't actually have the device yet, (it's on the way) i'll be doing a follow up piece next week.

Wednesday, April 1, 2015

Why another timesheet app?

There are a lot of apps and websites that help you keep track of time.

For most of these the use cases vary slightly. Many are for an independent contractor wanting to keep track of their time so that they can properly charge their clients when the job has finished. Some are more of a employee manager relationship which is where mine fits in.

One of the apps I've seen is called FotoPunch. FotoPunch looks very professional and well developed. It also costs a lot. Timesheet by TengenT LLC is catered to the average small business owner. The point is to save money and find a happy medium between manual labor to enter the information and an automated system that doesn't cost a lot.

Timesheet focuses on the most important features.

1) Manage time accurately.

  • Employees use the simple UI and can the system takes care of recording precision.

2) Data in usable format

  • The app makes it easy to export a timesheet between any date range. It auto calculates and summarizes the most important information.

3) Built in safeguards

  • The system automatically checks for inconsistencies and flags these behaviors. For example, if the employee should clock in and out in the same place, the shift will be flagged if this does not happen.

4) Cost effective
  • As mentioned above, the focus is to make this a more cost effective option. So it will be priced below other alternatives.
Who would benefit from this app? What features would you want to see?

Tuesday, March 24, 2015

How to backup

Every once in a while I have a friend or family member that asks me if I know how and would be willing to retrieve files off their hard drive that just crashed. While it is possible, it's very time consuming and almost never recovers the files that they actually want back. While a good external hard drive is probably the easiest solution (especially if you have a tool such as Time Machine for Mac or something comparable for Windows) there are other more elegant and free solutions. The main deciding factor is the media type.


I want all my files to be saved locally so that I can access them while offline. Using Google Drive and Dropbox is the ideal solution. Instead of putting school assignments into the Documents folder on my Mac, I save them to a Documents folder inside my Google Drive folder. Since Google drive syncs all content to the cloud it's always backed up.  I prefer google drive to dropbox simply because it has more space (15GB instead of 2GB). With 15 GB of free storage, as long as it's just documents, I always have room and collaboration/sharing is already integrated.


For those with Android, Google+ is a great app that has auto backup and unlimited storage. Any pictures uploaded through the app will not count against your 15GB so long as they are 2048px. Pictures can be set to private by default which is great considering Google+ is a social platform. You can view and download them any time via the app or your Google Plus page. As an extra your photos are automatically enhanced using Google's photo algorithms that they revealed last year at Google IO and duplicates are merged into fun gifs known as Auto Awesome.

For those with tons of pics that just want a place to dump them all at full res, check out Flickr. Signing up gives you 1TB of free photo storage. Make sure that any uploads are marked as private as that may not be default.


Google comes to the rescue again with Google Play music. You can now as of Feb 26, 2015 upload 50,000 songs to your own personal music library. Here are some of the extra perks for uploading to the cloud:
1) Stream using the Google play mobile app, chrome extension, browser or other 3rd party apps such as "Gear for Google Play and YouTube" 
2) Automatic organizing that happens upon upload. Your music is analyzed much like the way Shazam works and metadata is automatically added so that your content is organized and can be searched by album, artist, and anything else. 
3) Google play often gives away free top name albums as promotional items that can added to your library with just a click.


For home movies, Flickr may be a good choice. For movies, you're probably best getting a hard drive and setting up a plex server.

So before you think about getting a hard drive consider what you're really trying to do. It may be easier to use the cloud. What kinds of data do you need to backup? Is there any great service you know of that I should try out?

Thursday, March 19, 2015

Rasperry pi.

In honor of the recent Pi day, I'll write about my neglected Raspberry Pi.

The Raspberry Pi is a $35 mini computer. If you kept it running all year it would use about $2 of electricity. Because it uses an ARM processor it's operating system capabilities are mostly limited to Linux. While I have no problem with Linux, this product falls under the cool, but not so useful category. I have attempted on many occasions to try and find a use for it, but each time i come back to the fact that either 1) I already have a fully fledged Ubuntu server running out of my house which can do this better or 2) it would cost a lot more money to buy all the extra equipment need to make something like a Power cat feeder.

The benefits of the Raspberry Pi are that it's cheap and portable. To build anything else means I would be better off doing it with something else.

Until I think of an idea, here's to hoping my Pi won't go on (unused) forever.

I know there are a lot of ideas online, but what are some of yours? What would you build with a Raspberry Pi if you could?

Thursday, March 12, 2015

Myo Arbmand...4 sale

For Christmas I decided that I wanted a Myo Armband. I was very excited about this product at the time and was even willing to pre-order. About two months later, right as i was in fact going to cancel my preorder and exchange my gift to myself for something else I could buy right then, I got an email saying that my Myo Armband had shipped and my credit card was about to be charged.

A few days later I got the gadget and immediately tried it on. Fortunately there was enough battery to setup and try out my armband on a few applications including Netflix and VLC. I was impressed with how quickly it recognized some gestures. Then i soon realized, those were the only gestures I could get it to recognize. After some more tuning and training i was able to consistently fast forward, rewind, pause and do some other basic controls using just my arm. WOW! It's fun, and it's easy to set up and get going. Is it worth $200 dollars to me? Not really.

How often do you purchase things that are cool, but not that useful? What do you end up doing with them? Leave a comment below.

Thursday, March 5, 2015

Timesheet by Tengent LLC

This week I'm writing about the application I'm currently in the process of developing.
Timesheet is an app that does exactly what you might think. It keeps track of time through an easy to use mobile app. iOS is more or less finished and Android is actively being developed. It was important to me to develop the app with the idea that Managers want to keep track of their employees. Therefore Employees can link to Managers who can then be alerted when employees clock in, out, leave notes, or have shifts flagged. With just a click employees can export their timecard as a .csv file. Both apps will work the same way and an employee or manager need only use the one app.

The app has four screens. Punch, History, Export, and Settings.

This is where the user starts and ends a shift. The interface is flexible enough to consider that employees may take breaks during the day, but will want to resume the shift from where they left off. They can also do things like add notes or event titles.

This allows the user to drill down into each Punch. It starts off grouped by pay periods, then shows each shift. Within each shift the user can view each punch and finally get a summary page.

After the Employee has linked with a Manager they can select a date range and export all the shifts found within that date range. By hitting SUBMIT an email draft appears with an attached .csv file and a email body explaining the purpose of the email as well as a total time calculated. All the user has to do is click send and the timecard is sent to whatever email address the Manager has chosen.

Minimal setup is required and it takes place on the Settings page. Users fill in their name, phone number and User type (Employee or Manager). Each user is verified by having a text message sent to their phone. When the click the link in the message, their account setup is completed and they can continue using the app.

Other options are specific to the User type. For example:
Employees can ask to be reminded when the period is about to end to submit their timecard. Managers can receive an alert when the employee punches in for the first time that day.

Timesheet hopes to alleviate the problem some business owners face when keeping track of time for their employees. Some use paper and pencil. Some use a spreadsheet. These methods still require more time and don't offer the security and analysis available through my app.

You can look forward to both iOS and Android apps being published early this summer.

Thursday, February 26, 2015

YNAB. ynot?

This is a relatively new app for me. YNAB, which stands for You need a budget, is a budgeting tool with many users who claim it changed their life. Although I've only used it about 1 month so far it's great and I plan on purchasing when the trial ends.

They have weekly online classes that teach how to and best practices. I didn't "attend" one until my 3rd week using the software and realized that I had been doing it all wrong. So I recommend watching one of those pretty early on.

Their apps are very well designed and easy to use, but you must download the desktop version to set it all up. Everything syncs sync to your desktop software using dropbox. I'm a little curious why they thought it was easier to use dropbox than to create their own service. Perhaps it's just a way to keep costs down, but the problem is that for each computer that wants to be connected to the budget, that computer must also be connected to the same dropbox. Luckily, my wife doesn't use her dropbox for anything so she's now signed into mine, but I could see this being a problem for some.

The best part is that the software which normally costs $60 is free while you're a student. For everyone else, there is a free 34 day trial.

Don't be afraid to start in the middle of the month either. After you watch/attend the Intro video/class you'll understand why that doesn't matter.

Wednesday, February 18, 2015

Elio, Elio, wherefore art thou Elio

It may look goofy, but someday soon I hope to be the owner of an Elio.

Believe it or not, but someday is the operative word in this sentence for this nerd. The Elio is in pre production right now and the closest you can get to owning one is to sign up for a reservation on their site. I've had a reservation for about a year now and if you'd have asked me last year, I would have said that I'd probably be driving it right now. The release date for Elio has been pushed back officially not once, not twice, but at least 3 times (that i know of). Although the wait is pretty frustrating, I'm glad that they are at least taking the time to make the best product possible. However, let me give you some reasons why I want this sucker right now.

84 mpg highway, 45-ish in town. Does it feel like your driving a lawn mower?--maybe. I'll have to let you know. But as a commuter car, you cannot beat that.

$6800. Long the promise of the Elio, Paul Elio (the CEO of Elio motors) has dreamed about making a car that is practical and affordable. Their target starting price is $6800.

Safety - check. (Although I also drive a motorcycle so, more of a plus than need for me.)

And finally - upgrades.
Although the starting price is only 6800, Elio has plans to allow for some pretty sweet options. And for me, that's where this car really shines. In both of the other two cars I've owned, I've installed some type of stereo modification. With the Elio, even if the price is high for upgrades, the car starts so cheap already that it's still affordable.
Upgrades are centered around the fact that you can have an iPad serve as your in car dash using the infiniteskyz technology. This allows you to have things such as navigation, music, phone calls, cameras, remote start and remote unlocking, GPS (where did i park), driving tracking, climate control and more.

So why don't i have it yet? Well, as i've mentioned before, production has been delayed. Supposedly this is due to "funding problems," which is why everyone who wants one should go make a refundable reservation now. As of today, the first cars are planned to be released in the beginning of 2016.

Thursday, February 12, 2015

A few years ago I decided to setup a web server using an old PC. I didn't want to pay for a static IP address and that's when i stumbled across

For those who don't know what a static IP address is, think of it this way:

Let's say I want to drive to my friend Jon's house. Now imagine i've got a gps app that allows me to put in my friend's name and it automatically figures out where their house is from my contacts and plots a course. All i have to do is remember my friend's name and type that in, the app figures out where to actually take me.

IP Address resolution works the same way. All you have to do is remember the name of the site you want to go to and computers all over the world (called nameservers) tell your computer how to get there. They look up the real (or IP) address, and take you there. Of course it all happens so quickly that when you type in, the nameservers tell your browser to go to and you never know the difference.

These nameservers know that Facebook will always point to because Facebook Inc has as a static IP. Almost all business do, because it's the easiest and usually a pretty small expense. 

But for a hobbyist who doesn't want to pay 10/month for a static IP, I get the default called Dynamic IP address. This means, that every so often (maybe once a month, maybe twice a day), my IP address will change. So if I tell the name servers to always point to (my current IP address), in one month when my IP address is changed, "" will still be pointed to the old IP and my website won't appear anymore.

That's where comes in. They allow me to dynamically update my ip address. Basically, i run a small program on my machine that listens for changes to my IP address. When it changes, the program tells to update my IP. And they take care of the rest. That way always points to my server and not some rando in Nebraksa.

The best part is that as the name implies, it's free.

If you need further proof that Comcast and Time Warner are making way too much money and you should out of principal not pay them anything extra for a static ip, here it is.

Monday, February 2, 2015

Plex - One player to rule them all.

I want to take this opportunity to thank the best personal media application for being around. Will the real content owner please stand up?

Have you ever been watching TV (if you said no already, I don’t know how you found this blog) and you see on the TV Guide that a movie you also own is about to come on? You think to yourself, “I like that movie and I want to watch it.” So you change the channel to watch The Little Mermaid. In the back of your head you also think to yourself, “I'm about to watch this with commercials even though I could just get up and put the (insert non-obsolete video medium here) in.” (BTW with plex, they will all be obsolete)

For some reason though, you end up watching it on TV. Maybe it’s because it’s too much work to get up. Maybe it’s because if you actually did take the time to get up and put your copy in, you feel committed. As if you now have to watch the whole thing, when really you just sort of wanted to watch some of it maybe.

Well Plex is the answer to this problem. But more importantly, it takes care of real problems too. #lazy

 Plex is a multimedia application that allows you to add your own content and then stream it anywhere you have an internet connection. It’s like a personal Netflix. There are however, two major differences:
1)    It’s free. (Mostly)
2)    There is not a general, online, shared library, but rather you are the curator of content for your own server.
While it is free to install Plex Media Server, (the brains behind Plex) client apps, like the Android, iOS, or Roku streaming apps cost a few bucks. Some clients are free however such as Xbox, web browser, and native mac or windows clients. There is also the more or less obvious point that since you have to possess the content, it’s not necessarily free. Although for those who know how, it often is. :)  There is also a service/product you can purchase directly from Plex Inc., called Plex pass. For beginners, I wouldn’t worry too much about it. In fact, I used Plex for about a year before I decided that I needed to buy the lifetime Plex pass, which includes some extra and prerelease features.

Plex solves a whole host of problems, including the one I mentioned above. Once you’ve setup your server (easy) and curated your content (less easy), you’ll never have to get up off the couch to put that movie on ever again.

One of my favorite purposes for Plex though is “family sharing.” I decided about last year that I wanted to purchase more movies than pirate, but to own all the good movies is really expensive. So I’ve established a group with whom I share my media library. Each of my Plex friends contributes $2 a month (handled of course through Venmo) so that I can buy a new movie and add it to the collection every month. Don’t worry I pitch in too!

With about 10 friends, it’s as if one us buys a movie every 10 months and lets everyone else borrow it. Only instead of having to worry about physically lending it, or getting it back, (which would be very hard since some of us live in Oregon) or scratching the disc, we all get to watch it whenever we want, wherever we want.

If you’re looking for a way to share movies, tv shows, home movies, music, or pictures, or if you just want someway to access all your digital movies in a well designed collection of apps, then Plex is for you. If you don’t want those things, you should download Plex which will make you want them. 


Tuesday, January 20, 2015

Why don't you already have Venmo?!

If you're under 30, have a smartphone and don't yet have Venmo, I question your intelligence. (If you're under 30 and don't have a smartphone, I already know it). Venmo is a must have app for those who use money. The most common use case, for those who still don't know, goes something like this:

You're at lunch, you don't have your wallet, but you and your friend both have Venmo. No wallet, no problem. He pays for your lunch and before he can even sign his receipt you've already paid him back through the app. Once you and some friends have Venmo installed and connected, it couldn't be simpler. But getting it all setup and connected can be a burden to first time users.

Venmo connects to your bank account, debit card, or a credit card (Credit card transactions add 3%). The second two are fairly easy to setup, but you won't ever be able to "cash out" unless you connect your bank. For some reason, most people don't know their bank account number and/or routing number. Venmo also has an option to setup your account using just your online banking credentials, but unfortunately that fails to work most of that time. Instead you must go through the process of tracking down your account number, putting in the app and then waiting 2-3 days until some micro deposits appear in your bank. Some banks even combine those into one deposit so you have to call the bank instead of just checking online. Yikes! No wonder it's taken so long for Venmo to finally gain traction. But it is!

Everyday i see and hear about more people getting signed on to Venmo. The more people that use it and are fully connected, the better the service is for everyone. In fact, i think the only reason that Venmo has continued to grow is because so many people want to be able to use the app with their friends. The process of getting set up is for some reason so difficult for people that without the encouragement and help of others who've gone through the process they would certainly give up.

Venmo has done a good job of adding features including going social with "stories" that you can follow, like, comment, etc, but in order for Venmo to really take off, they need to simplify the sign up process. The most simple experience would be for the user to just log in with their online banking credentials. While this is currently an option during setup, as i mentioned before I've never seen it work for those whom i've help get setup. Along those same lines is the fact that a large portion of their target market are young people who often have credit union accounts instead of actual bank accounts. Some credit unions combine the deposits making another obstacle for the unconvinced noob, and some just don't work at all. Adding more support for credit unions and making the online banking credentials option more robust will help the onboarding process and grow the company's user base.

If you're new to Venmo or want to try it out, have faith. As brutal as i've described the setup process to be, it's really not that hard. And once it's done, you'll find every excuse you can to use it.