Can’t Remove the Commercials!!!!

July 29, 2012

If you search for “comskip” among my older postings, you’ll see that at one time I had developed a procedure for identifying and cutting out commercials from my video recordings. I used an application called Comskip (which is a Windows app so I ran it using the Wine cross-platform emulator) for identifying commercials in a video, ffmpeg and mencoder for video data manipulation and cutting. Unfortunately, with the upgrade in my video recording software (EyeTV3) these scripts and procedures no longer work.

I’ve spent hours and long evenings trying to develop a new method, but I’ve hit a big roadblock. I can still use Comskip to identify the commercial time points in a video file, but I have no way of automatically editing the video to remove the commercial segments. In the past, I used mencoder to do the video cutting in batch mode, but now it just won’t work with the MPEG-2 file that is created by the recording software. I tried extracting the video from the original MPEG-2 file first and using that in mencoder, but no dice. I can remove the commercials  manually using the EyeTV3 software, but I want an automated procedure that just does it for me.

Unfortunately, other video processing programs such as ffmeg and Handbrake can’t cut out the commercials from a video file as effectively as how mencoder did it. So, I’m stuck now with lots of commercials that I have to manually skip by. It’s not a super big deal, but when you’re use to watching a show with no commericals, it’s hard to go back!

So if anyone reading this blog posting has any ideas or suggestions, please let me know! 🙂

Updated (12 Aug 2012): Ok, I finally figured out how to do this. I won’t go into the nitty gritty details, but the following Unix command on my iMac system is what I use to identify the commercials in a EyeTV recorded raw mpeg-2 file then create a new mp4 file with the recordings stripped out:

export DISPLAY=:0.0; /usr/bin/nice -n 5 “/Library/Application Support/ETVComskip/Wine.app/Contents/Resources/bin/wine” “/Library/Application Support/ETVComskip/comskip/comskip.exe” –ini=”/Library/Application Support/ETVComskip/comskip/comskip.ini” /Users/dave/Documents/EyeTV\ Archive/Enemy\ of\ the\ State.eyetv/0000000015cdc458.mpg &> /dev/null; /bin/sleep 10; /usr/local/bin/mencoder /Users/dave/Music/iTunes/iTunes\ Media/Android\ Videos/Enemy\ of\ the\ State.mp4 -o /Users/dave/Music/iTunes/iTunes\ Media/Android\ Videos/Enemy\ of\ the\ State\ \(No\ Commercials\).mp4 -edl /Users/dave/Documents/EyeTV\ Archive/Enemy\ of\ the\ State.eyetv/0000000015cdc458.edl -ovc copy -oac faac -faacopts mpeg=4:object=2:raw:br=164 -srate 48000 -of lavf > /dev/null 2>&1 &

I basically use Comskip to identify the commercials in the original mpeg-2 video file, then use Mencoder to strip out the commercials from the converted video (which was created using HandbrakeCLI, converting the original mpeg-2 file to mp4 format) and create a new mp4 file. The trick, was getting the latest version of Mencoder downloaded, compiled, and installed on my iMac system.


EyeTV Recorded Shows: Upgraded Resolution for Nexus 7 Tablet

July 29, 2012

If you’ve read my previous posts, you’ll know that I use a device called EyeTV HD to record TV shows on my iMac. The software that drives this recording hardware will automatically export the recorded show in a format that is smaller and viewable on a iPhone, iPod Touch, or Apple TV. Since my new Nexus 7 Tablet has a screen resolution of 1280×800, I wanted to update the resolution of my converted videos so they look as good as possible on my Nexus 7. I started by using the “Apple TV 2” (1280×720) setting in the EyeTV HD software, but the picture quality  just wasn’t very good (especially when compared to the free Transformers movie that came with my N7).

So, I decided to use an Applescript to customize the video conversion of my recordings. Fortunately, EyeTV has a hook where it will call a script called RecordingDone.scrpt after a TV show has completed recording. It is in this script I added my Applescript commands to process the video. I basically use a freeware product called Handbrake to convert the video from MPEG-2 format to MPEG-4 format with a resolution of 1280×720 HD. The Handbrake software is normally driven by a standard user-interface, so I used an add-on product called HandbrakeCLI to do the processing in batch mode.

Below is my RecordingDone.scrpt script: Read the rest of this entry »


Watching live TV on my iPhone 4

April 17, 2011

At home, I’ve got an EyeTV HD device connected to a Comcast digital cable box for recording TV shows on my iMac desktop computer. The system is entirely automated, where scheduled shows are recorded, commercial removed, and finally converted to iPhone format and placed in iTunes for syncing. This allows me to watch my favorite shows at my leisure, usually at night on the couch or in bed. A few weeks ago I was on a business trip and I forgot to schedule my EyeTV to record an episode of Stargate: Universe, and it was not playing on any local station in my hotel room. What was I suppose to do?

Luckily, I have an app on my iPhone that allows me to control the EyeTV HD software on my iMac at home and also watch live TV through it via the Internet. So, I decided to give it a try, even though the hotel’s WiFi connect speed was incredible slow and virtually unusable. So instead of trying to use WiFi, I decided to just use my cellular connection via Verizon to stream the Live TV from my iMac at home to my iPhone.

Surprisingly, the video stream worked great! I was able to watch my show with no pausing or dropping of the TV streaming image. On a few occasions the image got a bit grainy (heavy pixels), but for the most part it looked just like watching an mp4 video file on my iPhone.

If I do switch to an Android phone in the near future, this will be one thing that I’ll miss. I don’t use this feature a lot, but when I do it works great.


Script for combining PDF files

November 15, 2010

I often have to combine mutiple PDF files into a single file for convenient storage, and I found a really easy way to do this using an Automator script with my iMac. This web site explains how in a few simple steps you can create such a script and have it available as a “Service” in a right-click popup context menu. So to use it, you select which PDF file you want to combine then do a right-click and select the “Combine PDF Files” service in the popup menu. Easy!

Note, that this only works for the Apple Mac OS system. Below is what the script looks like in the Automator GUI:


Applescript for renaming my video files

November 14, 2010

For certain TV Shows I like to save them in my “archive” for viewing later, so I try to label them in a logical fashion. With my current automated system of recording TV shows, removing commercials, and adding in meta data to the mp4 video file, I’ve created a new Applescript that will help rename the video file for my personal archive.

The script is a bit lengthy to post here in text form, so I’m making it available for download from this link. I’m basically using the freeware program called AtomicParsley to extract some meta data from a specified video file (e.g., show name, episode title, season number and episode number) and use that information for defining the file name. For example, my script will take the video recording of an episode from The Walking Dead and will format the name as:

The Walking Dead – Guts – S01E02.mp4

So it has the TV show’s name, episode title, season and episode number all contained in the name of the video file. Again, it is getting all this data from the metadata contained inside the video file (which was added by my recording script).

I’ve got my Applescript set up as an application icon which I can double-click to bring up File Chooser Dialog Window or you can drag video files onto the icon to process the files. This script makes it much easier for me to rename my videos quickly for storage.

Note, that I tried to do the renaming of these videos in this manner after I processed them in my video recording script, but iTunes renames the video file to only the show’s episode name (e.g., “Guts.m4v”) when it automatically processes the file for syncing.


Applescript for deleting watched shows and podcasts in iTunes

November 12, 2010

Since switching from my Zune HD to an Apple iPod Touch, I’ve noticed that the iTunes software behaves differently than the Zune Software so far as removing deleted shows. For example, after I watch a TV show, movie, or podcast on my Zune HD I can delete it from my device. Then, when I sync with my PC using the Zune Software the application will see that I deleted the video and will also delete it from my PC as well.

With iTunes, it doesn’t work that way. If I delete a video from my iPod Touch after watching it iTunes will copy the video file back on the iPod Touch when I sync again. The only way I’ve found to have iTunes not sync a watched video on my iPod Touch is to configure iTunes to not sync “watched” videos. As such, I manually have to delete the video from iTunes to remove it from my system. I guess this is better, since you may not want iTunes to accidentally delete a video from your system if you really didn’t fully watch it (or in my case, fall asleep in bed while watching a video and have it run to the end!).

So, I’ve written an Applescript that will search out all the videos marked as watched in iTunes after connecting my iPod Touch and remove them from my Mac. Note, that I’m defining that a video has been “watched” if it has been marked by iTunes to have been played and also has a bookmark of 0.0.

My script also does the same for podcast videos and does a final syncing operation. It seems to work pretty well. Below is the full script that I’m using:

I’ve compiled this script to an application and it sits on my desktop where I can launch it by clicking the desktop icon. As I work more and more with nifty things like Applescripts controlling apps, I really appreciate moving from the PC over to the Mac world.