V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
Poto
V2EX  ›  Python

利用 Python 完成音频拼接

  •  
  •   Poto · 2020-01-14 16:30:09 +08:00 · 2389 次点击
    这是一个创建于 1535 天前的主题,其中的信息可能已经有所发展或是发生改变。
    一个文件夹都是数字序号排序的 62 个 mp3
    如何用 python 将其按序号拼接成一个 mp3
    搜索过,但没有强相关
    9 条回复    2020-01-14 17:03:49 +08:00
    janxin
        1
    janxin  
       2020-01-14 16:34:57 +08:00
    ffmpeg 一条命令的事...
    krixaar
        3
    krixaar  
       2020-01-14 16:48:47 +08:00
    https://trac.ffmpeg.org/wiki/Concatenate
    然后用 Python 调用一下
    em70
        4
    em70  
       2020-01-14 16:51:05 +08:00
    python 是胶水语言,这种多媒体数据处理还得调用 ffmepg,生成一条命令执行即可
    pmispig
        5
    pmispig  
       2020-01-14 16:52:33 +08:00
    我之前做过一个切割。。就是直接文本模式 cut ,拼接的话直接 cat B.mp3 >> a.mp3 试试
    KevZhi
        6
    KevZhi  
       2020-01-14 16:53:25 +08:00 via iPhone
    /t/435051
    ffmpeg 一行脚本的事情..为什么要用 python
    cshlxm
        7
    cshlxm  
       2020-01-14 17:01:07 +08:00
    如果非要 python,那就 python 调用 ffmpeg,有封装好的库,如果要纯 python,把 MP3 解码到 wav,读到 ndarray,把数据部分连起来,再编码到 mp3。。。
    NotFoundEgg
        8
    NotFoundEgg  
       2020-01-14 17:02:46 +08:00
    打开你的 cmd
    copy /b *.mp3 temp.mp3
    NotFoundEgg
        9
    NotFoundEgg  
       2020-01-14 17:03:49 +08:00
    (抖个机灵
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3516 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 10:47 · PVG 18:47 · LAX 03:47 · JFK 06:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.