Skip to main content

No project description provided

Project description

Video to Audio Converter / 视频转音频转换器

Python Version License

A lightweight Python tool for extracting audio from video files with format conversion support.
轻量级Python工具,用于从视频文件中提取音频并支持格式转换。

Features / 功能特性

  • Multi-format Support / 多格式支持: Convert to WAV, MP3, OGG, AAC, M4A
    支持转换为WAV、MP3、OGG、AAC、M4A格式
  • Customizable Output / 可定制输出: Control output path, format, codec and bitrate
    可控制输出路径、格式、编码器和比特率
  • Progress Display / 进度显示: Visual conversion progress with optional verbosity
    可选的详细进度显示
  • Preserves Quality / 保持质量: Maintains original audio quality during conversion
    转换过程中保持原始音频质量
  • Easy Integration / 易于集成: Simple API for Python applications
    提供简单API便于集成到Python应用中

Installation / 安装

Requirements / 先决条件

  • Python 3.6 or higher / Python 3.6及以上版本
  • FFmpeg (will be automatically installed with MoviePy)
    FFmpeg (将随MoviePy自动安装)

Install Package / 安装包

pip install video-to-audio-converter

Additional Dependencies / 额外依赖

For MP3 support, you may need to install LAME MP3 encoder:
如需MP3支持,可能需要安装LAME MP3编码器:

Linux:

sudo apt-get install lame

MacOS:

brew install lame

Windows:
Download from lame.buanzo.org

Usage / 使用说明

Python API / Python接口

Basic Conversion / 基本转换

from video_to_audio_converter.converter import convert_video_to_audio

# Convert to default WAV format / 转换为默认WAV格式
audio_path = convert_video_to_audio("input.mp4")

Advanced Options / 高级选项

audio_path = convert_video_to_audio(
    "input.mp4",
    output_audio_path="custom_output.mp3",  # Custom path / 自定义路径
    output_format="mp3",                   # Output format / 输出格式
    codec="libmp3lame",                   # Audio codec / 音频编码器
    bitrate="320k",                       # Bitrate / 比特率
    verbose=True                          # Show progress / 显示进度
)

Supported Formats / 支持格式

Format Description Notes
WAV Uncompressed audio 无损音频
MP3 MPEG Audio Layer III 需要LAME编码器
OGG Ogg Vorbis format 开源格式
AAC Advanced Audio Coding 高质量有损压缩
M4A MPEG-4 Audio Apple常用格式

FAQ / 常见问题

Q: Why is MP3 conversion not working?
问: 为什么MP3转换不起作用?
A: Ensure LAME MP3 encoder is installed on your system.
答: 请确保系统已安装LAME MP3编码器。

Q: How to improve output quality?
问: 如何提高输出质量?
A: Use higher bitrate (e.g., 320k) and appropriate codec.
答: 使用更高比特率(如320k)和合适的编码器。

Q: Can I convert multiple files at once?
问: 可以批量转换多个文件吗?
A: Currently only single file conversion is supported.
答: 当前仅支持单个文件转换。

Contributing / 贡献指南

We welcome contributions! Please follow these steps:
欢迎贡献!请按以下步骤操作:

  1. Fork the repository / 复刻仓库
  2. Create your feature branch / 创建特性分支
  3. Commit your changes / 提交更改
  4. Push to the branch / 推送到分支
  5. Create a Pull Request / 创建拉取请求

License / 许可证

This project is licensed under the MIT License - see the LICENSE file for details.
本项目采用MIT许可证 - 详见LICENSE文件。

Contact / 联系方式

For questions or suggestions, please contact:
如有问题或建议,请联系:


This README includes:
1. Comprehensive bilingual documentation
2. Installation instructions for all platforms
3. Usage examples for both API and CLI
4. Development and contribution guidelines
5. FAQ section
6. License and contact information

The formatting uses clear markdown structure with proper headers and consistent bilingual presentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

video_to_audio_converter-0.1.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

video_to_audio_converter-0.1.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file video_to_audio_converter-0.1.1.tar.gz.

File metadata

  • Download URL: video_to_audio_converter-0.1.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.9.17 Windows/10

File hashes

Hashes for video_to_audio_converter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5dfb275979db2ca092b81d7b2024033547ae72286e01b9ceea523d65c6a3f221
MD5 1e04362ab04e49b7f8e8ec1decb78c6f
BLAKE2b-256 8985812c111ba2b58646d0725d5093be01c9a1988f1f0ac767cd7ca25816d3d3

See more details on using hashes here.

File details

Details for the file video_to_audio_converter-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for video_to_audio_converter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d3035cc328349412fcf73798ee7bdd7fc13c8320f8236109ef476bd209d5b8f0
MD5 6da8228498ee2e31f4bd12f7af60d171
BLAKE2b-256 e03a3f4a5a40ee297665e73d29c1cb11bf05001e1b33d856aab7458adaf70052

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page