Moving Day
15/02/11 06:22

In making this move, I decided I wanted it to keep as complete a history as possible. The repository history was easy; git can interact with svn repositories very nicely. But everything else had to be done by hand. I moved several things from SourceForge to github:
- The source code and all its commit history
- All the bugs, and feature requests from the SF Tracker (although I left out the closed issues)
- The tags for the previous releases of the source.
Then there was the recreation of the Video Monkey website. I chose to make a change here as well. Video Monkey used to be edited in iWeb and uploaded to SF. iWeb is very nice for simple sites, but I’ve always wanted to have more flexibility, so I switched to WordPress. After learning the ins and outs of customizing a WordPress theme, I was able to create what I think is a better looking and more useful site for Video Monkey.
The site now allows you to register and login, and allows you to comment on news or blog entries. I hope this makes the Video Monkey site more interactive, so I can understand how all of you are using it. I’ve also added a forum where ongoing conversations can take place. The site and the forum both take advantage of Gravatars, to make it easier to identify who you are and what you’re interested in. Please stop by there if you haven’t aleady and upload a picture. Don’t worry if you don’t. The site uses Identicons if you haven’t made yourself a gravatar. At least that way we can distinguish different voices in the conversation. Also don’t worry if you don’t want to register. You can see all the content on the site and have unrestricted access to the downloads. Registering just helps let us know who you are and helps keep the spambots out.
And one last thing you should worry about. I will never, ever, ever give out your email or personal data.
So look around and let us know what you think.
Fresh FFMPEG and Google
25/01/11 06:23
I always want to use the freshest version of ffmpeg for every Video Monkey release. But doing that has proven difficult over the entire lifetime of the app. Many times I have used Google to try to either find a prebuilt version or good instructions on how to build it yourself. That would seem like an easy task for Google, but it has been annoyingly difficult for, like forever.
You see, there are very specific needs for a version of ffmpeg to be used by Video Monkey. It has to be statically built, meaning that it can’t rely on the existence of any libraries except those that ship with Mac OSX. Otherwise I would have to install extra libraries, which would require a Video Monkey installer. And it’s not very friendly to install a bunch of stuff on your system just for that one App.
Video Monkey also has to be built with the right 3rd party libraries. You can make a perfectly good ffmpeg without the inclusion of libx264 (which creates H.264 video), but the video encoding would be slow and substandard. Other omissions would prevent you from reading some common file types.
It’s easy to find prebuilt versions. But they are all either too old, don’t include the needed libraries or aren’t statically linked. And instructions on building it yourself are either out of date or don’t have good instructions for building all the support libraries, which are a nightmare of their own.
I’ve recently been able to get all the needed libraries and the right set of build options to make a version of my own. This is great, but keeping this fresh not only means I have to get the latest version of the ffmpeg source, but also the source for all the libraries it needs.
Then yesterday this saga took an interesting turn. Last week I happened upon the Video Monkey entry at MacUpdate.com (http://www.macupdate.com/app/mac/30667/video-monkey). Several people were disappointed with Video Monkey but gave no helpful information of why it was crashing or not working for them. So I added an entry asking for more information. I got an interesting reply from “Myschizobuddy”, pointing me at some nice and fresh prebuilt ffmpeg binaries. Sure enough several versions there fit my needs. Great!
But the story doesn’t quite end there. I wondered why I had never come across this site. So I started doing some Google searches. I tried all the obvious search terms: “ffmpeg osx”, “static ffmeg mac osx” and many others. I even concocted searches that should have taken me directly there, using phrases that appeared at the top of the page. Nothing worked. No hits within the first 5 pages.
I tried Bing. I tried Yahoo. I tried “go.to osxffmpegcompiling” including added quotes so the search engines didn’t interpret the ‘.’ as a special character. Nothing. Ever. It’s as though the search engines were all blocking go.to.
And here’s the punchline. Go to http://go.to yourself. Right there on the front page it advertises one of the advantages of having an address there is because it is Search Friendly!!! Hmmm. Maybe not so much.
I’m very thankful to “Myschizobuddy” for pointing out the site. But it makes me rethink my trust in Google searches!
And in honor to the new Tron movie, I’ll sign off with…
You see, there are very specific needs for a version of ffmpeg to be used by Video Monkey. It has to be statically built, meaning that it can’t rely on the existence of any libraries except those that ship with Mac OSX. Otherwise I would have to install extra libraries, which would require a Video Monkey installer. And it’s not very friendly to install a bunch of stuff on your system just for that one App.
Video Monkey also has to be built with the right 3rd party libraries. You can make a perfectly good ffmpeg without the inclusion of libx264 (which creates H.264 video), but the video encoding would be slow and substandard. Other omissions would prevent you from reading some common file types.
It’s easy to find prebuilt versions. But they are all either too old, don’t include the needed libraries or aren’t statically linked. And instructions on building it yourself are either out of date or don’t have good instructions for building all the support libraries, which are a nightmare of their own.
I’ve recently been able to get all the needed libraries and the right set of build options to make a version of my own. This is great, but keeping this fresh not only means I have to get the latest version of the ffmpeg source, but also the source for all the libraries it needs.
Then yesterday this saga took an interesting turn. Last week I happened upon the Video Monkey entry at MacUpdate.com (http://www.macupdate.com/app/mac/30667/video-monkey). Several people were disappointed with Video Monkey but gave no helpful information of why it was crashing or not working for them. So I added an entry asking for more information. I got an interesting reply from “Myschizobuddy”, pointing me at some nice and fresh prebuilt ffmpeg binaries. Sure enough several versions there fit my needs. Great!
But the story doesn’t quite end there. I wondered why I had never come across this site. So I started doing some Google searches. I tried all the obvious search terms: “ffmpeg osx”, “static ffmeg mac osx” and many others. I even concocted searches that should have taken me directly there, using phrases that appeared at the top of the page. Nothing worked. No hits within the first 5 pages.
I tried Bing. I tried Yahoo. I tried “go.to osxffmpegcompiling” including added quotes so the search engines didn’t interpret the ‘.’ as a special character. Nothing. Ever. It’s as though the search engines were all blocking go.to.
And here’s the punchline. Go to http://go.to yourself. Right there on the front page it advertises one of the advantages of having an address there is because it is Search Friendly!!! Hmmm. Maybe not so much.
I’m very thankful to “Myschizobuddy” for pointing out the site. But it makes me rethink my trust in Google searches!
And in honor to the new Tron movie, I’ll sign off with…
end of line![]()
VideoMonkey and Metadata
30/07/09 06:24
With the 0.4 release of VideoMonkey, you can manipulate the metadata in a video file. Metadata is extra information in a video which tells you the title, description, rating, etc. of that video. It can even hold artwork (posters, cast photos, etc.). Some apps, like iTunes, can use this metadata to display information about the video and organize it. For instance, a TV show can contain the series title, and the season and episode number. This allows iTunes to group episodes of a single show by season and show episodes in order. If you have Apple TV, this is especially useful because it will show you the poster from the show and the description of the episode. It’s totally cool.Only some file formats support metadata. Luckily, MOV and MPEG-4 files (which is what VideoMonkey deals with) both do. There is a new Metadata tab in the Info Panel. Here you can add or remove metadata for each video in the file list. Once you get it just right, you can start an encode. When finished the metadata is written to the file. You can now encode, write metadata and add to iTunes, all in one step. You can setup an entire season of a TV show, let it encode overnight and when you get up in the morning, you’ll have a new show ready to go in iTunes.
But where does the metadata come from? VideoMonkey supports 3 metadata sources: from the input file, input entered by the user, and from a search. If the input file has metadata, it will show up in the metadata panel. You can also type into the metadata fields, and drag images into the artwork box. Then there is VideoMonkey 0.4’s crowning feature: search.
Search makes it easy to get great metadata into your video files. At the bottom of the metadata panel you will see a search box. Type any search term into it and VideoMonkey will go off and try to find matches. You select one of two sources: thetvdb.comor themoviedb.org. When searching thetvdb.com you not only get a list of possibly matching TV shows, but each episode for every season of that show. For instance, type in “bang” and you will get (as of the writing of this article) 4 shows. Select “The Big Bang Theory” and you will see 3 seasons worth of shows. The data from thetvdb.com is pretty complete, including extensive artwork, ratings, release dates, and very high quality descriptions. When using themoviedb.org the data is typically not quite as extensive (for instance, it doesn’t include the rating, and many movies don’t have a description). But the data is still great for many popular films and themoviedb.org is still new, so I’m sure it will improve over time. Both of these sites are community driven, so you can go to there and add your own data to improve the quality.
When a video file is added to the list VideoMonkey tries to figure out search terms. It will try to split the filename into words (replacing characters like underscore and dash with spaces) and search for several variations of those words. It also detects strings that look like season/episode combinations (e.g., “S02E05”). If a show is found and it has that season and episode, VideoMonkey will set it to that.
Next to each metadata item you will see up to 3 icons. These indicate which of the 3 sources (input, user, search) the item contains. Clicking on the icon will select that source for that item. Artwork is a little different. The image shown is the first selected image from the list, which can be seen by clicking on the trianngle next to the Artwork box. This opens a drawer with all images for the current file. Next to each image you will see an icon indicating where the image came from. Use the checkbox to select whether or not you want to include that image in the output file. You can also rearrange the images in the drawer. The first selected image will show up in the Artwork box and is typically the one that apps like iTunes and Apple TV show.
You can right click on the title of any metadata item and get a “use this value for all files” menu item. Select this and whatever is in that metadata item will be duplicated in all files in the list. To quickly set the Episode Title, you simply type it into the box then select “use this value for all files” and every file now has the same title.
At the bottom of the Metadata Panel you will see a tools menu (with the gear icon). This has menu items that let you manipulate all metadata items at once. You can switch to use all metadata from any one source, and do this for the current file or all files.
Finally, you have a choice of how and where to write the metadata. In the main window, there is a new pull down menu between the Device and Encoding menus. This allows you to do the normal operation of encoding each file and then writing the metadata to it. But you can also choose to skip writing of the metadata altogether. Or you can just write the metadata to the input file. This is really useful if you’ve got files which you already have in the right format and now you just want to give them all metadata. You can also just write the metadata to the output file. This is useful if you forgot to set the correct metadata or made a mistake with some metadata item and don’t notice until after the encoding is finished. You can write out new metadata without having to re-encode. Before doing this remember to select the files in the list you want to write the metadata to. Files get deselected once they’re successfully encoded.
That’s the new metadata feature in VideoMonkey. I hope you use it and love it as much as I do. Go to the forums and post if you need any help, have a suggestion for how to make it better, or just want to share your stories about cool things you’ve done with it. And you can post bugs there, too.
Have fun!
Where Did We Come From?
22/03/09 06:24

On Macs, we fortunately have machines with great underlying hardware and software to make it possible to easily work with videos, as long as you have the right app. There are plenty of apps that can do the work, but many aren’t that user friendly. And for the most part it’s REALLY hard to get a nicely encoded result, which is both small and high quality. Sometimes it’s hard to get a result that even plays on whatever device you’re encoding for.
That’s why Visual Hub was created. This popular app let you drag files into a list, tell it what device you were encoding for, fiddle with a couple of controls and press start. Soon (or maybe not so soon), you’d have good quality videos for your chosen device. This was my workhorse app, so when the developer called it quits, I started thinking that I should do something myself. A version of the code was released as open source asFilmRedux, but this code wasn’t quite Visual Hub, had many bugs, and was written in AppleScript (as I think Visual Hub was). I don’t really think AppleScript is the right tool for a really big app like this, so I decided to start from scratch and write a native Cocoa app. I leveraged the look of Visual Hub and many of the icons from FilmRedux and started Video Monkey.
The core of any video encoding tool is the encoder. There are a few choices for the Mac, including Quicktime. And while Quicktime is really nicely integrated into the system, it doesn’t necessarily have all the support you need to handle lots of formats. In the open source community, FFmpeg is the clear leader. It’s used all over the place and has support for an incredible number of formats. It’s a command line app, so using it natively means spawning a process, sending it the ffmpeg command, then listening for its progress. Cocoa has all the tools to make this possible so integrating ffmpeg into a native app is pretty easy. And this technique can be used for other command line tools as well. FFmpeg is nice, but you occasionally need a few extra tools to complete your task. For instance, FFmpeg can’t handle WMV3 video inside a Quicktime movie container (which happens if you edit a WMV file in Quicktime Pro and then save). So Video Monkey uses other command line tools to separate the audio and video out of the container. This raw WMV3 video is handled quite well by ffmpeg, so these tools together can get the job done.
Because of the need for this kind of flexibility, I wanted to make it easy for Video Monkey to use many different tools together. And I wanted it to be easy to create new “recipes” (combinations of commands to do an encoding task) for different formats. So I used an XML file to represent all the parameters, commands and recipes, and then I select between them, depending on the input and desired output formats. And to make it more flexible, I built in the ability to use JavaScript in this XML file to adjust parameters as needed.
So the core of Video Monkey has very flexible machinery which maintains a list of video files, determines the internals of those files, and then gives the user the ability to specify what to do with them, all based on the instructions in the XML file. This is a nice starting point and it will allow Video Monkey to grow into a really useful tool. The first version of the tool can convert files into any iTunes format. The next version will allow you to add the result to iTunes. From there, who knows where we go?
Stay tuned…
How Do You Work With Video?
21/03/09 06:25

The other thing I do a lot is to add metadata to the files I convert. This can be really tedious, especially since iTunes can’t set a couple of critical metadata values. The most significant of these is the MPAA rating tag. I have an Apple TV and I have kids. I want them to be able to watch Sponge Bob, but notDesperate Housewives. Enchanted and Tinkerbell are fine, The Spy Who Shagged Me, not so much. When I buy a movie or TV show from the iTunes Store, the rating is set. When I record a show off the air and convert it, I have to set it myself. Since iTunes doesn’t do it, I need to use other tools. Lostify is great for this, but it’s a separate tool, so that makes it kind of a hassle.
So my next big task is to make Video Monkey write metadata information. But where does that data come from? Fortunately, there are some great open source resources for this. TheTVDBand TheMovieDB are sites which allow you to download information about a show or movie in XML, so it is machine readable. Once complete, you’ll be able to drag in a file, press start and in a bit you’ll have a video in iTunes, complete with metadata (even a poster frame for the show, if you choose).
I also want to give Video Monkey the ability to crop videos, to allow you to remove commercials and trim off excess from the start and end of a show. You can already preview a video, and I have selection working. All I need to do is to allow selections to be trimmed out and then save the result. To go along with this I want to make it possible to crop the frame to get rid of letterboxing or pillarboxing. You’ll be able to crop automatically or manually. The movie preview window will also be a great place to preview what the quality of the movie will be before encoding the whole thing.
But I don’t want Video Monkey to just work for me. I want it to be useful to a wide audience. So tell me how you do video encoding and what features you crave. Just go to the Video Monkey open discussion forum and post a message.
Have fun…