Found something useful? Don't forget to leave a comment!

Saturday, December 18, 2010

ffmpeg with WTV support

Ah, the joys of open-source software development. A patch that adds WTV (Windows Television, the recording format of Windows 7 Media Center) demux support to ffmpeg is now in a mature state, thanks to developer Peter Ross. Gone are the days of circuitous, roundabout conversions from WTV to DVR-MS to MPEG!

I’ve taken the liberty to compile a 32-bit Windows build of ffmpeg with the WTV patchset rolled in. Also included is a simple fix for the “non-monotone timestamps” issue that often comes up. x264/XviD/LAME MP3 libraries were NOT used for this build, as it’s intended for WTV conversion purposes only.

WTV files can be re-muxed into plain MPEG files as follows:

ffmpeg.exe –y –i inputFile.wtv –vcodec copy –acodec copy –f dvd outputFile.mpg

Windows Media Center users, enjoy!

Download link


Flo said...

Thanks for this!
Unfortunatly, it doesn't run stable yet. I often get some errors such as:
[wtv @ 0102CD40] unsuported chunk:80cc0600c0cc060000cd060040cd0600
Soon after, it stops and leaves a uncomplete file. Of course, the source WTV plays fine on WMC. I guess, this is because of the inmature wtv support, which will hopefully stable soon.



UofC2013 said...

Your're right - I've come across the same issue when working with HD over-the-air material. It seems to work fine for SD recordings, however. If I had to guess, I'd say that the unknown material that ffmpeg is choking on is the closed-caption streams...

MCEBuddy said...

I've found during developing MCEBuddy that ffmpeg chokes badly on TV recorded h.264. I've extracted the stream to a raw h.264 file to verify this. Any chance I can help move this from a patchset to core? I was halfway through coding the demux myself and saw this.

Anonymous said...

What is the patch for the "non monotone timestamps"? I'd like to apply it to the latest ffmpeg src I'm compiling...thanks a bunch!