使用VapourSynth和FFmpeg对音频进行基于帧的剪切/修剪/拼接。
acsuite-orangechannel的Python项目详细描述
空调套件
audiocutter(.py)替换VapourSynth。在
允许对音频文件进行基于帧的剪切/修剪/拼接 使用VapourSynth剪辑信息。在
包括一些处理音频文件或时间戳的额外工具。在
功能:
eztrim(clip,trims,audio_file[,outfile,ffmpeg_path=,quiet=,timecodes_file=])
importvapoursynthasvscore=vs.corefromacsuiteimporteztrimfile=r'/BDMV/STREAM/00003.m2ts'afile=r'/BDMV/STREAM/00003.wav'# pre-extracted with TSMuxer or similarsrc=core.lsmas.LWLibavSource(file)# for the example, we will assume the src clip is 100 frames long (0-99)trimmed_clip=src[3:22]+src[23:40]+src[48]+src[50:-20]+src[-10:-5]+src[97:]# `clip` arg should be the uncut/untrimmed source that you are trimming fromeztrim(src,[(3,22),(23,40),(48,49),(50,-20),(-10,-5),(97,None)],afile)
输出:
使用输入audio_file的文件扩展名输出具有相同扩展名的剪切/修剪音频文件。如果没有给定outfile,则默认为audio_file_cut.ext
。在
concat(音频文件,outfile[,ffmpeg_path=,quiet=])
^{pr2}$将使用FFmpeg将音频文件列表(以字符串形式给出的路径)连接到一个文件中。在
效用函数:
f2ts(f,src_clip=[,精度=,时间码\文件=])
用于查找帧编号的时间戳。在
fromfunctoolsimportpartialimportvapoursynthasvscore=vs.coreclip=core.std.BlankClip()ts=partial(f2ts,src_clip=clip)ts(5),ts(9),ts(clip.num_frames),ts(-1)# ('00:00:00.208', '00:00:00.375', '00:00:10.000', '00:00:09.958')
剪辑时间码(src\u clip)
返回VFR剪辑的时间代码列表。当timecodes_file未提供给f2ts
或{
入门
依赖性
安装
Arch Linux
使用您最喜欢的AUR助手安装AUR packagevapoursynth-tools-acsuite-git
:
$ yay -S vapoursynth-tools-acsuite-git
Gentoo Linux
通过VapourSynth portage tree安装。在
Windows/其他
使用Python Package Index (PyPI / pip):
python3 -m pip install --user --upgrade acsuite-orangechannel
或者干脆
pip install acsuite-orangechannel
如果您能够直接使用pip
可执行文件。在
救命啊!在
查看documentation或使用Python的内置help()
:
help('acsuite')
- 项目
标签: