Search This Blog

Video Conversion - mencoder + ffmpeg

This is just a quick post. I am working on creating a video for YouTube to show off the current state of my project (see my prior post). Several challenges came up during this process, this is how I handled them:

1) I needed a desktop recording program to record the emulator.
This was easy, I installed a program called "gtk-recordmydesktop" and was able to figure everything out with no instructions. On Linux (Ubuntu) this is in the package manager so it was as easy as "sudo apt-get install gtk-recordmydesktop"

I found this command to do a straight conversion:mencoder out.ogv -ovc xvid -xvidencopts pass=1 -o output.avi

The file was not the correct aspect ratio however, to get that I add expand=-304:0:152:0 to pad the video:mencoder out-2.ogv -vf expand=-304:0:152:0 -ovc xvid -xvidencopts pass=1 -o output-padded.avi

This is great, but I still need 640 x 480 resolution, so I add scale=640:480 and have the final result:mencoder out-2.ogv -vf expand=-304:0:152:0,scale=640:480 -ovc xvid -xvidencopts pass=1 -o output-padded-scaled.avi

Small addendum:
I used my cell phone to record the audio, which saves in AMR format, which is proprietary and not easy to convert. I managed to get it with the following commands:amrnb-decoder Input.amr audio.sw
sox -r 8000 audio.sw audio.wav

I used references:
google
http://forum.doom9.org/archive/index.php/t-1

Comments

Post a Comment

Popular posts from this blog

If you've ever worked with a vector tool to design something to be carved with a CNC routing machine, you may have needed to convert the resulting SVG file into a DXF. In my workflow I often use Inkscape to generate my SVG graphic, but my CAD software is CamBam and it requires a DXF file.

Many people have tried to make the perfect Inkscape plugin for exporting DXF, there is Better DXF Export, Better Better DXF Export and Big Blue Saw's DXF Export. I've had the most luck with the last one, but it was still finicky and often broke when updating Inkscape or OSX. Not only that, but at the end of the Big Blue Saw page, Simon mentions that he doesn't even use the plugin most of the time, instead relying on a command line tool called pstoedit.

With that in mind I made a small shell script which will convert an SVG file to DXF, you can save the script and run it directly or add the functions to your startup script.

I've been converting UGS to run on the Netbeans Platform over the past week, and in general its been great. The features and documentation I used while migrating UGS away from Swing were very well done. So aside from a couple hiccups, the Netbeans Platform has been great. Until a few days ago when I decided it was time to integrate my new changes with my Jenkins CI server.

It turns out that you can't build a Netbeans Platform application without connecting to the Netbeans IDE first. This has to do with the extra modules, platform components and build harness. Searching the subject online provides a lot of documentation, everything I've found is either out dated, contradictory, or I could only get it working with a new project and not my existing one.

The final solution was so simple, and minimally invasive that I wanted to create this blog post.

There are 4 interesting files for a Netbeans Platform build:build.xml - Some documentation suggests adding a download-netbeans-r…

Today we have a Sony TC-800B to take apart. This is a portable Reel-to-Reel recorder is from the late 60's or very early 70's and is the same device that was used to record the watergate tapes. Unlike the TEAC 360S I took apart last week, this machine was very easy to take apart.

The one I came across even had a carrying case, you might notice that the handle is crooked. This thing was somewhat busted up, if you look closely you can see through the window in the case that the plastic covering the reels is cracked too:

Will Winder is a software developer. In his four years of study at UNH he took variety of advanced Computer Science courses including Object Oriented Design, Computer Networks, Artificial Intelligence and Compiler Design. He has been working professionally using C, C++ and Java since graduating in 2006. In his free time he continues to expand his skills by involving himself in many projects, some of which can be seen on this blog.