Get progress information for an ffmpeg process.
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
ffmpeg-progress
Deprecated
I am no longer maintaining this project. Please seek alternatives:
Overview
Get progress information for an ffmpeg process.
This script is based on the work of Rupert Plumridge.
Installation
Poetry
poetry add ffmpeg-progress
Pip
pip install ffmpeg-progress
Usage
Usage: ffmpeg-progress [OPTIONS] FILE
Entry point for shell use.
Options:
-h, --help Show this message and exit.
All unknown arguments passed to ffmpeg-progress are passed on to ffmpeg.
Library usage
import subprocess as sp
import sys
from ffmpeg_progress import start
def ffmpeg_callback(in_file: str, outfile: str, vstats_path: str):
return sp.Popen(['ffmpeg',
'-nostats',
'-loglevel', '0',
'-y',
'-vstats_file', vstats_path,
'-i', in_file,
outfile]).pid
def on_message_handler(percent: float,
fr_cnt: int,
total_frames: int,
elapsed: float):
sys.stdout.write('\r{:.2f}%'.format(percent))
sys.stdout.flush()
start('my input file.mov',
'some output file.mp4',
ffmpeg_callback,
on_message=on_message_handler,
on_done=lambda: print(''),
wait_time=1) # seconds
start() is the main function to use. If on_message is not passed, a default function is used.
The on_done argument is optional. The initial_wait_time keyword argument can be used to specify
a time to wait before processing the log.
The ffmpeg callback must return a PID (int). It is recommended to pass -nostats -loglevel 0
to your ffmpeg process. The ffmpeg callback also must pass -vstats_file given the path from the
callback argument.
ffprobe
An ffprobe front-end function is included. Usage:
from ffmpeg_progress import ffprobe
ffprobe('my file.mp4') # returns a dict()
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ffmpeg_progress-0.0.6.tar.gz.
File metadata
- Download URL: ffmpeg_progress-0.0.6.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28bf201086df4d59ab8875604ea98369701c7028239f0556dbd08944c61d2617
|
|
| MD5 |
a51c74bcd6bc8fc8619b85b96d1860f4
|
|
| BLAKE2b-256 |
d638101c84779d1898fb5759cd3de46416d7c4908e2fb51e33ee8617eba0b97b
|
Provenance
The following attestation bundles were made for ffmpeg_progress-0.0.6.tar.gz:
Publisher:
publish.yml on Tatsh/ffmpeg-progress
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ffmpeg_progress-0.0.6.tar.gz -
Subject digest:
28bf201086df4d59ab8875604ea98369701c7028239f0556dbd08944c61d2617 - Sigstore transparency entry: 693028649
- Sigstore integration time:
-
Permalink:
Tatsh/ffmpeg-progress@f9862ee454d2b8a498060e50a25104f5e20ef451 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/Tatsh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f9862ee454d2b8a498060e50a25104f5e20ef451 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ffmpeg_progress-0.0.6-py3-none-any.whl.
File metadata
- Download URL: ffmpeg_progress-0.0.6-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68745a4167b6a9a6d682f343679cda538178a0c705f977b21419d16df69836c6
|
|
| MD5 |
47de272129efa4fd6c697fd1a4732c1c
|
|
| BLAKE2b-256 |
ae263993391c296155905616a285225113503a2ed9969226375ca2a82819ac66
|
Provenance
The following attestation bundles were made for ffmpeg_progress-0.0.6-py3-none-any.whl:
Publisher:
publish.yml on Tatsh/ffmpeg-progress
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ffmpeg_progress-0.0.6-py3-none-any.whl -
Subject digest:
68745a4167b6a9a6d682f343679cda538178a0c705f977b21419d16df69836c6 - Sigstore transparency entry: 693028651
- Sigstore integration time:
-
Permalink:
Tatsh/ffmpeg-progress@f9862ee454d2b8a498060e50a25104f5e20ef451 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/Tatsh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f9862ee454d2b8a498060e50a25104f5e20ef451 -
Trigger Event:
push
-
Statement type: