Parser for Avidemux TinyPY project scripts
Project description
parse-avidemux-project
Standalone Python library for parsing Avidemux TinyPY project scripts into structured data (video path, segments, filters, audio tracks, etc.). No ffmpeg, ccextractor, or Avidemux CLI required.
Installation
pip install parse-avidemux-project
CLI Usage
parse-avidemux-project input.py -o output.json
Omitting -o prints the JSON to stdout.
Python API
from parse_avidemux_project import (
AvidemuxProject,
Segment,
AudioTrack,
parse_project,
parse_project_file,
us_to_iso_time,
)
# Parse a file
project: AvidemuxProject = parse_project_file("project.py")
# Or parse a string
project = parse_project('''
adm = Avidemux()
if not adm.loadVideo("/path/to/video.mkv"):
raise
adm.addSegment(0, 1000000, 5000000)
adm.markerA = 0
adm.markerB = 6000000
''')
print(project.video_file) # /path/to/video.mkv
print(project.segments) # [Segment(start=1000000, duration=5000000)]
print(project.segments[0].end) # 6000000 (computed property)
# Convert to dict for JSON serialization
print(project.to_dict())
# Microsecond to ISO time conversion
print(us_to_iso_time(3661000000)) # 01:01:01.000
Data model
| Attribute | Type | Description |
|---|---|---|
video_file |
str | None |
Path to the source video |
segments |
list[Segment] |
List of cut segments (each has start, duration, and end property) |
marker_a, marker_b |
int | None |
A/B markers in microseconds |
video_codec |
str | None |
Output video codec |
container |
str | None |
Output container format |
container_options |
dict[str, str] |
Container options |
audio_tracks |
list[AudioTrack] |
Audio track configs (each has index, language, codec) |
hdr_config |
tuple[int, ...] |
HDR parameters |
License
MIT
Project details
Release history Release notifications | RSS feed
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 parse_avidemux_project-0.1.0.tar.gz.
File metadata
- Download URL: parse_avidemux_project-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8df465ce2d0b661512d07cb64c0a03878e321eb0524744518b94c35dbced3d2e
|
|
| MD5 |
f601424286101b32da84a8e305367207
|
|
| BLAKE2b-256 |
7461acec2e15833f68632c7921ac7f980eae45440f94eace7d5d3f30d2e1285d
|
File details
Details for the file parse_avidemux_project-0.1.0-py3-none-any.whl.
File metadata
- Download URL: parse_avidemux_project-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91c9f7327f51973bd4e39dd3d27bc2c857f5cb5a22ddbbf68f5d958ba69a959a
|
|
| MD5 |
96e51e17876f15f568a794060b5682cc
|
|
| BLAKE2b-256 |
1dbd3d08530165f5a17b5b89b5698290ac75f30ae3e389053894afa60c1a140e
|