本文中使用的工具为RealMedia Analyzer,它的官方地址:
http://users.i.com.ua/~alexeysp/rma/rma.html
首先要把rma文件拷贝到需要分离的real文件的目录中,因为要进行命令行的输入,所以一般最好把rma和视频文件都放到根目录或者文件夹名字比较简单的目录中,下面的例子我们都放在了E盘的根目录下:
1、分离音频和视频:
命令如下:rma -s film.rmvb,如下图:
生成两个文件film.000(音频)和film.001(视频),如果你只需要进行分离的话,把这两个文件的后缀改为rm或者rmvb就可以播放了;
如果只想单独提取音频,输入:rma -sx0 film.rmvb,生成film.000音频文件;
如果只想单独提取视频,输入:rma -sx1 film.rmvb,生成film.001视频文件;
2、音频视频的合并:
如果我们合并刚才生成的那两个音频和视频文件,命令行如下:
rma -j/film.000//film.001/ film_all.rmvb 注意film_all前面有个空格
film_all.rmvb就是合并后的文件。但我们平时应用时往往是合并rm音频和real格式的视频文件,这时命令行如下:
rma -j/film_audio.rm//film_video.rmvb/ film_all.rmvb
如果音频视频不同步,可以进行调整,如要把音频向后延迟1000毫秒输出,则输入:
rma -jq1000/film_audio.rm//film_video.rmvb/ film_all.rmvb
如果要提前1000毫秒则输入:
rma -jq-1000/film_audio.rm//film_video.rmvb/ film_all.rmvb
3、重建文件索引:
合并后的文件没有建立新的索引,播放时不能正常拖放,输入如下命令来建立索引:
rma -i film_all.rmvb
重建索引后,该视频文件就可以正常播放了。