ffmpeg-for-python
Wrapper para o binário FFmpeg, permitindo o uso de comandos FFmpeg via Python. Para saber como usar FFmpeg, consulte a documentação no site oficial
conversão básica
from ffmpeg_for_python import FFmpeg, FFmpegExceptions
# Cria uma instância do wrapper FFmpeg
ffmpeg = FFmpeg()
# Caminho do arquivo de entrada e saída
input_video = 'input_video.mp4'
output_video = 'output_video.mkv'
# Define o arquivo de entrada e o arquivo de saída
(ffmpeg
.overwrite_output # Sobrescrever se existir
.input(input_video) # Vídeo de entrada
.output(output_video) # Vídeo final
)
# Executa o comando FFmpeg e exibe a saída
try:
lines = ffmpeg.run(capture_output=True)
for l in lines:
print(l)
except FFmpegExceptions as e:
print("Erro ao executar FFmpeg:", e)
remux audio e video
from ffmpeg_for_python import FFmpeg, FFmpegExceptions
# Cria uma instância do wrapper FFmpeg
ffmpeg = FFmpeg()
# Caminho dos arquivos de entrada e saída
input_video = 'input_video.mp4'
input_audio = 'input_audio.mp4'
output_video = 'output_video.mp4'
# Define os arquivos de entrada e o arquivo de saída
(ffmpeg
.overwrite_output # Sobrescrever se existir
.input(input_video) # Vídeo de entrada
.input(input_audio) # Áudio
.args(arguments=['-c:a', 'copy', '-c:v', 'copy']) # Parâmetros de cópia de áudio e vídeo
.output(output_video) # Vídeo final
)
# Executa o comando FFmpeg e exibe a saída
try:
lines = ffmpeg.run(capture_output=True)
for l in lines:
print(l)
except FFmpegExceptions as e:
print("Erro ao executar FFmpeg:", e)
Metadata
Release files for ffmpeg-for-python 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ffmpeg_for_python-0.4.0.tar.gz | 91.0 kB | Without provenance | Details for ffmpeg_for_python-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ffmpeg_for_python-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for ffmpeg_for_python-0.4.0-py3-none-any.whl |
Total release size: 101.2 kB
Release files / ffmpeg_for_python-0.4.0.tar.gz
| Download URL | ffmpeg_for_python-0.4.0.tar.gz |
|---|---|
| Size | 91.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b216fdc0976038bfe3d9cf24f71fd949743b1e821353fbe488381000b800f09
|
|
BLAKE2b-256 checksum How to use checksums |
eed5d83cdc73b028c9f1bb3bd87ef690258a04c8bce61a1fa19c3ed21b2102a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / ffmpeg_for_python-0.4.0-py3-none-any.whl
| Download URL | ffmpeg_for_python-0.4.0-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5609070d46c6e3cc7aedff271fdb6c8c6d0adc02abd60ddb25ca31ce2ec477e9
|
|
BLAKE2b-256 checksum How to use checksums |
35fe7f8f24b7253a9ccb14f8afb173db4928822f6c2a651e27ee04714f396b37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for ffmpeg-for-python 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.