[多媒体]MKV 配音分离提取, 伴奏提取

  也不知道是从什么时候开始, 就一直喜欢上了听伴奏, 感觉听曲时和听完整的歌曲有着完全不一样的感觉.  曲给人的感觉太美妙了~~~
也因为此, 曾一度在网上到处寻找伴奏, 无奈空手而归, 虽说能找到几个, 不过那效果实现是"不堪人耳"... 一两年之后, 我找到了办法, 且一一道来.

  我想你应该知道, 伴奏一般都包含在 MKV(MTV, MV, ...)文件中, 那么我们首先要解决的问题就是: 获得 MKV 文件, 在哪里获得呢? 我是从酷狗音乐播放器下载的(不是打广告, 这样比较方便). 首先我们进入酷狗音乐播放器, 我的是最新的版本, 是酷狗2012.

  好了, 我们点击搜索栏, 输入要查找的MV, 记得选择 MV 搜索(不是必须的), 我这里搜索我最喜欢的一首伴奏之一: 周杰伦 - 安静, 确实很好听哦~

  如果找到了该 MV, 就选择播放, 进入播放, 稍等片刻, 等到该 MV 缓冲完毕后, 就去找到该 MV 文件, 格式为 MKV, 在哪里找呢? 还是从 酷狗的配置文件下手吧, 进入目录:C:\Documents and Settings\Administrator\application data\KuGou7, C是我的XP系统盘(其它系统也差不多), Administrator是我的用户名, 至于 Kugou7 这个文件夹, 这个应该是根版本相关的. 进入目录, 找到文件:kugou.ini, 这个就是酷狗的配置文件, 我们找到一节点:MVCache, 下面有一个键为:MVCacheFolder, 它的值即为酷狗 MKV 文件的缓冲目录, 我的是 H:\KuGouCache\, 找到它, 目录下面应该就有很多播放过的 MV 的文件了, 不过没有名字..蛋疼.....没关系, 我们关闭酷狗, 把该文件夹下的所有文件移动到另外的文件夹, 重新启动酷狗, 重新播放 MV, 这样就得到了我们想要的 MKV 文件了, 我把它复制出来, 放到我的桌面, 等待接受处理, o(∩_∩)o 哈哈.

  要分离/提取音乐文件还需要专业的软件, 不过我们选择以命令行的方式操作, 这样不至于对复杂的软件产生畏惧, 况且我们也用不着那么复杂的功能, 命令行是很强大的哈~~~

  所需软件: MKVextract.exe
  官方网址:http://www.bunkus.org/videotools/mkvtoolnix/doc/mkvextract.html
  下载目录:http://www.bunkus.org/videotools/mkvtoolnix/win32/
  最新版本:http://www.bunkus.org/videotools/mkvtoolnix/win32/mkvtoolnix-unicode-5.5.0.7z

  建议下载压缩包, 不需要下载安装程序. 安装/解压后, 找到一个名为 MKVextract 的程序, 那就是它了. MKVextract 的使用方式很简单, 我简单介绍两个功能.

  原文帮助:
  mkvextract <mode> <source-filename> [options] <extraction-spec>
  ......

  1. 查看文件信息.
    MKVextract tags YourFile.mkv --output-charset UTF-8

  2.提取伴奏文件.
    MKVextract tracks YourFile.mkv 2:NewFileName.ogg

  几点说明:
    命令行参数区分大小写.
    如果文件名包含空格, 请用引号包含.
    MKV 文件一般有两个配音文件(一般是ogg格式, 一般播放器都可播放), 而第二个文件一般是伴奏, 所有输出时参数是 2:NewFileName.ogg.

  下面就可以开始提取/分离文件了.
  MKVextract可以单独使用, 建议复制其到 MKV 所在的文件夹下, 方便操作.
  打开命令提示符(开始->运行->cmd), 定位当前目录到 MKV 缓冲文件夹:cd /d "H:\KuGouCache\"
  接着执行:MKVextract tracks YouFile.mkv 2:NewFile.ogg, 这样就得到了你要的OGG文件了, 它就是伴奏了, 是不是很方便, o(∩_∩)o 哈哈.

  如果要批量转换, 则可以执行:for %i in (*.mkv) do MKVextract tracks "%i" 2:"%~ni.ogg"

  好了, 就到这里了. 慢慢欣赏美妙的旋律吧~~~

  女孩不哭(QQ:191035066) @ 2012-04-17 @ http://www.cnblogs.com/nbsofer/

ReadMe Release Version beta_1.0 index.py imageMatlab.py This is more or less a wrapper for Matplotlib imaging functions such that their behavior is equivalent, in terms of colormap, aspect and so forth, to the expected behavior of Matlab's functions. sepVocal.py This script can be used to execute the desired separation. See below for an example of use of this file. SIMM.py This script implements the actual algorithm for parameter estimation. It is mainly used by sepVocal.py. tracking.py The Viterbi decoding algorithm is implemented in this script. Requirements: These scripts have been tested with Python 2.7, The packages that are required to run the scripts are pydub,ffmepg, Numpy, Spicy, Matplotlib. One can respectively find the latest versions at the following addresses: http://pydub.com/ https://ffmpeg.org http://numpy.org/ http://scipy.org/ http://matplotlib.sourceforge.net/ Notes: Prefer recent versions of the above packages, in order to avoid compatibility issues, notably for Matplotlib. Note that this latter package is not necessary for the program to run, although you might want to watch a bit what is happening! Spicy should be version 0.8+, since we use its io.wavefile module to read the wave files. We once used the audio lab module, but it would seem that it is a bit more complicated to install (with the benefit that many more file formats are allowed). Usage: The easy way to use these scripts is to run the exec package of our release version: http://www.github.com/beata_1.0 for more develop: you can run the index.py on pycharm directly. note: the output files will create under you source wav file. ContactMe Email:xlzhang14@fudan.edu.cn
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值