FFMEG: The Greatest Video Conversion Tool

December 19, 2013

video_conversionI had a video file in .mkv format, and I needed to convert it to mp4 format for my Android tablet. I tried using my favorite app called Handbrake, but my first attempt created a video file without any audio. I then tried several different settings, but still no audio. I was at a loss, since Handbrake is one of my favorite video conversion tools. It’s easy to use, I can queue up videos to be converted, and it has several pre-defined settings for the Apple TV, iPhones, iPad, Android Tablets, etc.

I discovered that I could also do this video conversion using a well known open-source program called FFMPEG. I had ffmpeg installed on my iMac when I was doing some commercial cutting experimentation, so I initiated the video conversion using the following shell command,

> ffmpeg -i rockets.mkv  rockets.mp4

That was it. I supplied the input file and the output file name and off it went! The video was converted properly with the audio data intact. Such a simple solution.


TV Commercial Cutting…. I Give Up!

November 24, 2013

images-1In one of my recent past postings, I mentioned my efforts to reviving the TV Commercial cutting methods and techniques I’ve used in the past. After spending several days trying different options on my iMac, I’ve concluded that it’s a lost cause. Although I was finally able to get mencoder compiled and running correctly on my iMac (running the Mavericks OSX), it still didn’t seem to work properly at cutting out video segments. Also, the Comskip application that I used to identify commercial segments didn’t seem to work very well for my recently recorded TV shows with the EyeTV HD software and hardware.

I can only guess something changed in the EyeTV software where the video file recorded format is a bit off from what it was in the past. Such a slight change seems to be causing issues with the Comskip program identifying the commercial cut points. One thing that I did learn, is that the program called ffmpeg is what powers the mencoder software, and ffmpeg is much more efficient at cutting out video segments without having to transcode the video again.

But, from my previous posting you’ll see that I’m in the process of cutting off my Cable TV and going with Internet media streaming. So, I’ll soon be in a position where I won’t be recording shows anymore with my iMac system and watching what I want, when I want (on-demand)!


Commercical Skipping: Round 3

November 10, 2013

tv_setSomeone recently responded to a previous posting asking some questions regarding identifying commercials in TV recordings and cutting them out on a Apple Mac system. So, I dived in and try to come up with the necessary software and procedures to doing so. Unfortunately, I’ve seemed to run into a few snags and can’t get it to work. Here’s what I found out so far:

In the past, I’ve used the following software to do my bidding:

  1. Comskip – A Windows DOS program that scans through a MPEG2 video file and identifies the cut points for the commercial segments.
  2. Mencoder – A Windows/Mac OSX program that can take the commercial cut points from Comskip and cut out the commerical segments, creating a new video file with no commercials.
  3. Handbrake – A Windows/Mac OSX program that can convert your new video file into any format you want (Optional).

These are the three programs that I have used in the past to do my video commercial cutting. Because Comskip is a Windows DOS program, I have to use a program called Wine which allows me to run this DOS program on my Mac OS system.

Below are the steps I followed to get these programs installed on my iMac system:

1) Download and install XQuartz on your Mac OSX machine from this link:

http://xquartz.macosforge.org/trac/wiki/X112.7.5

If you’re running the new Mavericks OS update, make sure you install XQuartz version 2.7.5 rc4.

2) Install “Brew” on your Mac OSX machine. Installing Brew will make it so much easier to download and install other software packages. Go to this web site and follow the instructions:

http://www.davidbaumgold.com/tutorials/wine-mac/

This site will discuss how to install Brew, and also the Wine software for running Windows exe files.

3) Install “Wine” using the instructions from the link in step (2).

4) Get the latest version of Comskip from this site:

http://www.kaashoek.com/comskip/

If your video recordings are HD, you’ll need to get the “Donor” version of Comskip. This means you’ll need to click the “Donate” button and pay a nominal fee to have access the the enhanced version of Comskip (which should be faster, also than the standard version).

Read the rest of this entry »


Plex – A Fantastic Media Server

August 25, 2012

I’ve come across a cool free media server called Plex which manages and facilitates streaming my video files and music files to my connected devices. I remember looking at Plex a few years ago and didn’t think too much of it, but the version they have now is fantastic. Here’s some of it’s features:

  • Can automatically identify your videos by titles and will pull down poster art and episode/movie descriptions automatically from common database servers
  • Has many grouping options such as “Watched”, “On Deck”, etc.
  • Has the ability to stream video and music across a network (either internal LAN or external WAN) from your home PC, at different transmission speeds.
  • Will transcode videos on-the-fly when necessary based on the network connection speed to the client app.
  • Very easy to use interface on the server and client
  • Client apps available for Android, iOS, and PC devices
  • Media Server program available for Mac OSX, Windows, and Linux systems

I normally take my recorded TV shows (from EyeTV) which are stored on my iMac system and stream them to my Acer A500 Iconia Android Tablet or Google Nexus 7 Tablet in my house. I have been using the streaming capability of the ES Explorer Android app (which simply plays a selected video using its video player), but the Plex system is much more robust. It seems to work great, and what’s even more cool is that I can stream transcoded video to my Android Smartphone or Tablet while on travel from my home iMac even on a slower network connection. Pretty cool stuff. In addition, the Server Interface on my iMac looks great. Read the rest of this entry »


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 »


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.