Without typing a book.. I use a PVR system called Mythtv on my linux server. The recording device is a Hauppauge HD-PVR recording via component input from a satellite receiver @ 720p.
The nice thing about MythTv is it uses a client/server model and can be viewed on any *nix or OSX system with either the mythtv client installed or support for upnp/dlna video playback(PS3s, other devices). Also with a plugin via a web browser I can direct download or stream to any machine on my LAN. Recently, I've obtained an appletv2 and jailbroken it, and got XBMC installed. XBMC nicely supports myth's playback system and commercial skipping features. Just one little issue...
The appletv2 doesn't have the hardware to handle the recordings I'm throwing it. Yeah it supports 720p but my recording device records at 68.76fps at about 3.6Mb/s bitrate... hardware encoded to h.264. I've had the same issue on just about any device that doesn't have either a higher end CPU or a GPU with hardware decoding features.
SO, the solution is transcode it down to a slightly easier to play format so all the devices I want to use work with it. I've been able to do this with handbrake with great success but that's a manual process- I want it to do this automatically. Myth sort of supports this- you can have it run a command/script after it finishes a recording, passing in parameters to transcode (also cut commercials out if you want but that's another project). The key is getting a command line utility to do it. The generally approved linux command line video utility is ffmpeg. After experimentation, I've found this produces a playable recording:
ffmpeg -i [input filename] -threads 4 -f mp4 -vcodec libx264 -maxrate 5500k -b 2750k -bufsize 4096k -acodec libfaac -ab 160k -async 1 -s 1280x720 -r 29.97 [output file]
This makes a playable recording that sounds good, has perfect audio sync, just as sharp of a picture... and sadly slightly choppy motion which bugs me because I'm a perfectionist for this shit. The key parameter is the -r, cutting the framerate back down seems to make for the choppiness. The videos I've trans coded with handbrake are 30fps and they look fine. Unfortunately ffmpeg has about a billion parameters and I'm not sure what to tweak to try to get this sorted out.
Oh, for the fun of it... here are the particulars that ffmpeg tells me about my input files..
Input #0, mpegts, from '1249_20111005210000.mpg':
Duration: 00:29:50.08, start: 2.477711, bitrate: 3648 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264 (Main), yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 68.76 fps, 59.94 tbr, 90k tbn, 119.88 tbc
Stream #0.1[0x1100]: Audio: aac, 48000 Hz, stereo, s16, 120 kb/s
Anyway I think there are some people on here who play with video too..... any ideas?