Giter Site home page Giter Site logo

format-cli's Introduction

一个极简的音视频格式转换工具

01

使用 python 和 ffmpeg.exe ,实现音频视频格式之间的转换。

执行 python geshi.py或双击 geshi.exe,然后根据提示输入 旧格式->新格式,回车,即可将当前目录下所有旧格式文件转为新格式

也可在 cfg.txt

通过 source_ext= 指定旧格式列表,默认将转换 mp3, flac, aac, mp4, mov, mkv, mpeg, avi, m4a

通过 target_ext= 指定要转换到的格式,默认将上面指定的格式转换到 wav

通过 dir= 指定要进行转换处理的目录,默认是当前目录

cfg.txt 文件默认内容


source_ext=mp3, flac, aac, mp4, mov, mkv, mpeg, avi, m4a
target_ext=wav
dir=./

源码使用方法

  1. 确保已有python环境

  2. 下载源码解压,执行 python geshi.py

  3. 如有需要可修改 cfg.txt

  4. 根据提示输入执行,比如想将 avi 转为 mp4 格式,直接输入 avi->mp4 回车

预打包版

  1. 下载压缩包并解压

  2. 如有需要可修改 cfg.txt ,指定要转换的格式和目录,或将 geshi.exe ffmpeg.exe 复制到要处理的目录下

  3. 双击 geshi.exe,根据提示输入执行

  4. 可解压到需要处理的音视频目录下

    或解压到其他位置,修改 cfg.txt 里 dir= 后的路径为要处理的目录

    双击 geshi.exe,根据提示输入 待转换格式->新格式

    如果需要多种格式都转换为一种新格式,修改 cfg.txt 中 source_ext= 为多个格式,以英文逗号分隔, target_ext= 为要转换到的格式

    然后在提示时直接输入 y .

输入提示

将把当前目录下 mp3,flac,aac,mp4,mov,mkv,mpeg,avi,m4a 格式的文件转为 wav格式

你也可以修改 cfg.txt 里  source_ext  后的扩展名列表,改变需要被转换的格式
修改  target_ext  改变要转换到的格式


如果确认开始转换,请输入y
或者输入 待转换格式->转换到的格式
例如输入 avi->mp4  将把 avi 视频转换 mp4 视频:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.