Parallel port trigger tells me when I’m transcoding

I decided to finish up my Cylon Eye (Larson Scanner) project by adding it as a status indicator for my computer. I record over the air programming and transcode it to DVD quality. Since things can be a bit slower when FFmpeg is running, I set it up for the Eye to scan to let me know it’s processing a video file in the background. All the details after the break but here’s the gist of the system:

  • Python script started by the FFmpeg transcoding script
  • It controls the Parallel port, driving pin 1 high to turn on the cylon eye
  • the ‘pidof’ command is called every minute for FFmpeg. When it is not found, the cylon eye is turned off and the script exits

Continue reading

My over-the-air Television library and how you can build your own

Amanda and I finally cut the cord about two years ago, after having spent quite a bit of time developing a replacement for Cable television. We started to realize that many of the shows we watched were on broadcast television, and others we could wait for on DVD or watch legally online. Since cutting the cord we’ve never had any regrets and it’s because we always have something on the server to watch.

My setup uses one server running MythTV to record shows from an antenna I built. Those shows are transcoded and stored on a networked folder to be played back by various front end hardware running XBMC. After the break I’ll share all the hardware and software details that make this happen.

Continue reading

Rendering video with Cinelerra and FFmpeg

I’ve been making videos to share with posts and looked around for some video editing software that works with Ubuntu. I’m running 11.10 Oneiric Ocelot and Avidemux is not yet in the repositories so I decided to give Cinelerra a try. It’s availalbe in a PPA.

I like it. I’d guess it’s got a 2-4 hour learning curve but after you figure out what commands and clicks control each function it’s pretty easy. The problem came when it was time to export my video to post on YouTube.

I tried exporting OGG files, but I got some weird errors, and only part of my video would appear when uploaded to YouTube. I needed to find an alternative. Since I’ve already compiled FFmpeg from source for transcoding my over-the-air recordings it seemed like a good choice for rendering the videos outside of Cinelerra. All I needed to do is get my hands on the raw audio and video, then use FFmpeg to assemble the parts. See the steps I took after the break. Continue reading

Transcode from 1080i to DVD

I’m getting rid of cable TV. There are still programs that I want to watch and since I often work at night I’m never around to watch primetime. I’m migrating my MythTV from analog cable encoding over to digital ATSC (over the air). I’ve built an HD antenna which I’ll share in another post, and I’ve picked up a Huappauge HVR-1250 ATSC tuner which I popped in and it immediately was picked up by my Ubuntu Karmic 9.10 box. The problem is I don’t care to upgrade storage space right now. 1080i recordings take up at least 6GB an hour so this will become an issue quickly.

I’m perfectly happy with the quality of DVD recordings on my HDTV so I’m going to downsample every recording to DVD size. I searched for help on this but there’s not much good information out there so I’m going to share what currently works for me.  If you have a better method I’d love to hear about it so leave a comment.

I’m using ffmpeg to transcode my 1080i recordings down to DVD quality. Here’s the command line:

ffmpeg -i YOUR_INPUT_FILE.mpg -y -target ntsc-dvd -aspect 16:9 -ac 6 -sameq -copyts YOUR_OUTPUT_FILE.mpg

I had to add the “-ac 6″ because I kept getting an error without it. It seems the output file was trying to encode 0 channels of audio. I haven’t extensively tested this yet but it worked on one recording. I’m writing a script that will take care of this for me. It will encode to a temporary file, delete the original, move the temp file to the original location, then rebuild the index file. Look for this in a future post.