WMV in .wmv This is where it gets tricky. Not all WMV's are VFR, but it's pretty common. To get at the timecodes at all, you need to transmux it to MKV. This is not entirely trivial since mkvtoolnix doesn't handle the WMV container due to patent concerns. You need to use Haali's simple DirectShow muxer, which comes with his media splitter (it's included with CCCP as well). To use it at all, you need GraphEdit (see the tools section). Fire up Graphedit and drop the WMV file on it. It will create a "graph" consisting of a source filters, video and audio decoders, and video and audio renderers. Delete everything (by clicking on the boxes and hitting delete) except the source filter and the audio decoder. Next, insert filters, open the DirectShow Filters node and find Haali Matroska Muxer. Give it an output file, then connect the video output pin to the input pin of the matroska muxer (which will then grow another pin), then connect the audio output pin to the new input pin. Now hit the "Play graph" button at the top, and you'll get a MKV file with WMV video and PCM audio. Extract the audio (do what you usually do with it), and use mkv2vfr on the MKV to get a decimated raw and a timecodes file. Encode and mux.
简单说明下:
第一步用graphedit,打开WMV之后,把所有解码滤镜全部删除,保留原始文件,然后开始手动添加滤镜,在direct show filter中找到haali Matroska muxer,添加,这时候会让你指定文件地址,比如把文件保存为test.mkv,点确定,这样graphedit中就多出一个haali Matroska muxer的方框,它代表了这个滤镜,把WMV文件输出和haali Matroska muxer的video输入相连接,play the graph,得到test.mkv。
在这里,偶和原文中提到的方法有个不同,声音没有合成到mkv中,偶一般是单独处理,还是graphedit,打开WMV,删除所有滤镜,但是保留声音解码滤镜,增加file writer,输入要保存的文件名,例如teat.wav,把解码后的wav连接到file writer,play the graph,得到test.wav。当然,也可以用AVS调用directshow载如WMV,然后在VDM中save wave,这个原理相同,只是graphedit是把后台工作给表示出来了而已。这里我们也可以看到graphedit的作用,就是从底层调用各种解码编码滤镜,摆脱那些外壳程序的束缚。