ffman 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ffman-0.1.0/.gitignore +18 -0
- ffman-0.1.0/LICENSE-APACHE +202 -0
- ffman-0.1.0/LICENSE-MIT +18 -0
- ffman-0.1.0/PKG-INFO +173 -0
- ffman-0.1.0/README.md +137 -0
- ffman-0.1.0/pyproject.toml +91 -0
- ffman-0.1.0/src/ffman/__init__.py +27 -0
- ffman-0.1.0/src/ffman/__main__.py +27 -0
- ffman-0.1.0/src/ffman/cli.py +176 -0
- ffman-0.1.0/src/ffman/effects/__init__.py +120 -0
- ffman-0.1.0/src/ffman/effects/blur.py +36 -0
- ffman-0.1.0/src/ffman/effects/camcorder.py +171 -0
- ffman-0.1.0/src/ffman/effects/chromatic_aberration.py +50 -0
- ffman-0.1.0/src/ffman/effects/crt.py +145 -0
- ffman-0.1.0/src/ffman/effects/datamosh.py +73 -0
- ffman-0.1.0/src/ffman/effects/dither.py +45 -0
- ffman-0.1.0/src/ffman/effects/frame.py +48 -0
- ffman-0.1.0/src/ffman/effects/halation.py +33 -0
- ffman-0.1.0/src/ffman/effects/invert.py +14 -0
- ffman-0.1.0/src/ffman/effects/pixelate.py +28 -0
- ffman-0.1.0/src/ffman/effects/spec.py +69 -0
- ffman-0.1.0/src/ffman/effects/stages.py +123 -0
- ffman-0.1.0/src/ffman/effects/vhs.py +84 -0
- ffman-0.1.0/src/ffman/errors.py +48 -0
- ffman-0.1.0/src/ffman/fmt.py +38 -0
- ffman-0.1.0/src/ffman/fonts/IBMPlexMono-Bold.otf +0 -0
- ffman-0.1.0/src/ffman/fonts/IBMPlexSans-Bold.otf +0 -0
- ffman-0.1.0/src/ffman/fonts/IBMPlexSans-Regular.otf +0 -0
- ffman-0.1.0/src/ffman/fonts/OFL.txt +93 -0
- ffman-0.1.0/src/ffman/graph/__init__.py +170 -0
- ffman-0.1.0/src/ffman/graph/gif.py +34 -0
- ffman-0.1.0/src/ffman/graph/light.py +45 -0
- ffman-0.1.0/src/ffman/graph/resize.py +143 -0
- ffman-0.1.0/src/ffman/graph/sizes.py +35 -0
- ffman-0.1.0/src/ffman/jobs/__init__.py +1 -0
- ffman-0.1.0/src/ffman/jobs/convert/__init__.py +10 -0
- ffman-0.1.0/src/ffman/jobs/convert/attach.py +58 -0
- ffman-0.1.0/src/ffman/jobs/convert/burn.py +201 -0
- ffman-0.1.0/src/ffman/jobs/convert/carried.py +31 -0
- ffman-0.1.0/src/ffman/jobs/convert/covers.py +110 -0
- ffman-0.1.0/src/ffman/jobs/convert/cuesheet.py +46 -0
- ffman-0.1.0/src/ffman/jobs/convert/dispatch.py +29 -0
- ffman-0.1.0/src/ffman/jobs/convert/fonts.py +60 -0
- ffman-0.1.0/src/ffman/jobs/convert/metadata.py +25 -0
- ffman-0.1.0/src/ffman/jobs/convert/options.py +253 -0
- ffman-0.1.0/src/ffman/jobs/convert/output.py +177 -0
- ffman-0.1.0/src/ffman/jobs/convert/passes.py +97 -0
- ffman-0.1.0/src/ffman/jobs/convert/remux.py +106 -0
- ffman-0.1.0/src/ffman/jobs/convert/render.py +176 -0
- ffman-0.1.0/src/ffman/jobs/convert/resize.py +47 -0
- ffman-0.1.0/src/ffman/jobs/convert/subtitles.py +54 -0
- ffman-0.1.0/src/ffman/jobs/convert/tagging.py +197 -0
- ffman-0.1.0/src/ffman/jobs/convert/youtube.py +105 -0
- ffman-0.1.0/src/ffman/jobs/meta/__init__.py +1 -0
- ffman-0.1.0/src/ffman/jobs/meta/io.py +126 -0
- ffman-0.1.0/src/ffman/jobs/meta/options.py +72 -0
- ffman-0.1.0/src/ffman/jobs/meta/run.py +70 -0
- ffman-0.1.0/src/ffman/media/__init__.py +1 -0
- ffman-0.1.0/src/ffman/media/flac.py +76 -0
- ffman-0.1.0/src/ffman/media/paths.py +123 -0
- ffman-0.1.0/src/ffman/media/probe.py +300 -0
- ffman-0.1.0/src/ffman/media/run.py +241 -0
- ffman-0.1.0/src/ffman/normalize/ffmpeg-normalize/presets/youtube-aac-native.json +15 -0
- ffman-0.1.0/src/ffman/normalize/ffmpeg-normalize/presets/youtube-aac.json +15 -0
- ffman-0.1.0/src/ffman/options.py +523 -0
- ffman-0.1.0/src/ffman/plan/__init__.py +1 -0
- ffman-0.1.0/src/ffman/plan/encode.py +245 -0
- ffman-0.1.0/src/ffman/plan/flows.py +96 -0
- ffman-0.1.0/src/ffman/plan/geometry.py +110 -0
- ffman-0.1.0/src/ffman/plan/outputs.py +85 -0
- ffman-0.1.0/src/ffman/plan/request.py +59 -0
- ffman-0.1.0/src/ffman/plan/streams.py +135 -0
- ffman-0.1.0/src/ffman/plan/youtube.py +215 -0
- ffman-0.1.0/src/ffman/py.typed +0 -0
- ffman-0.1.0/src/ffman/subs/__init__.py +1 -0
- ffman-0.1.0/src/ffman/subs/ass.py +496 -0
- ffman-0.1.0/src/ffman/subs/breaks.py +578 -0
- ffman-0.1.0/src/ffman/subs/colorize.py +209 -0
- ffman-0.1.0/src/ffman/subs/ingest.py +36 -0
- ffman-0.1.0/src/ffman/subs/layout.py +97 -0
- ffman-0.1.0/src/ffman/subs/markup.py +16 -0
- ffman-0.1.0/src/ffman/subs/metrics.py +156 -0
- ffman-0.1.0/src/ffman/subs/normalize.py +160 -0
- ffman-0.1.0/src/ffman/subs/paint.py +203 -0
- ffman-0.1.0/src/ffman/subs/srt.py +29 -0
- ffman-0.1.0/src/ffman/values.py +69 -0
- ffman-0.1.0/tests/__init__.py +1 -0
- ffman-0.1.0/tests/conftest.py +67 -0
- ffman-0.1.0/tests/fixtures/probe/anamorphic.mkv.json +71 -0
- ffman-0.1.0/tests/fixtures/probe/anim.gif.json +63 -0
- ffman-0.1.0/tests/fixtures/probe/cover_art.m4a.json +123 -0
- ffman-0.1.0/tests/fixtures/probe/h264_aac.mp4.json +139 -0
- ffman-0.1.0/tests/fixtures/probe/hdr10.mkv.json +77 -0
- ffman-0.1.0/tests/fixtures/probe/image.png.json +57 -0
- ffman-0.1.0/tests/fixtures/probe/interlaced.mp4.json +84 -0
- ffman-0.1.0/tests/fixtures/probe/record.sh +24 -0
- ffman-0.1.0/tests/fixtures/probe/rotated.mp4.json +143 -0
- ffman-0.1.0/tests/fixtures/probe/subs_attach.mkv.json +206 -0
- ffman-0.1.0/tests/fixtures/transcripts/cli-ja.json +104 -0
- ffman-0.1.0/tests/fixtures/transcripts/diarized.csv +6 -0
- ffman-0.1.0/tests/fixtures/transcripts/dtw-drift.ojf.json +392 -0
- ffman-0.1.0/tests/fixtures/transcripts/regular.csv +6 -0
- ffman-0.1.0/tests/fixtures/transcripts/regular.json +59 -0
- ffman-0.1.0/tests/fixtures/transcripts/regular.lrc +6 -0
- ffman-0.1.0/tests/fixtures/transcripts/regular.srt +20 -0
- ffman-0.1.0/tests/fixtures/transcripts/regular.vtt +17 -0
- ffman-0.1.0/tests/fixtures/transcripts/sentences.ojf.json +1762 -0
- ffman-0.1.0/tests/fixtures/transcripts/words.ojf.json +2786 -0
- ffman-0.1.0/tests/fixtures/transcripts/words.srt +348 -0
- ffman-0.1.0/tests/fixtures/transcripts/wx-diarized-wrapped.srt +910 -0
- ffman-0.1.0/tests/fixtures/transcripts/wx-gaps.json +1109 -0
- ffman-0.1.0/tests/fixtures/transcripts/wx-highlight.srt +732 -0
- ffman-0.1.0/tests/fixtures/transcripts/wx-highlight.vtt +551 -0
- ffman-0.1.0/tests/fixtures/transcripts/wx-hours.vtt +17 -0
- ffman-0.1.0/tests/fixtures/transcripts/wx-ja.json +67 -0
- ffman-0.1.0/tests/fixtures/transcripts/wx.json +1175 -0
- ffman-0.1.0/tests/fixtures/transcripts/wx.srt +20 -0
- ffman-0.1.0/tests/fixtures/transcripts/wx.tsv +6 -0
- ffman-0.1.0/tests/fixtures/transcripts/wx.vtt +17 -0
- ffman-0.1.0/tests/suite/__init__.py +5 -0
- ffman-0.1.0/tests/suite/conftest.py +37 -0
- ffman-0.1.0/tests/suite/test_blurs.py +139 -0
- ffman-0.1.0/tests/suite/test_effects.py +221 -0
- ffman-0.1.0/tests/suite/test_effects_review.py +252 -0
- ffman-0.1.0/tests/suite/test_encode.py +258 -0
- ffman-0.1.0/tests/suite/test_images.py +186 -0
- ffman-0.1.0/tests/suite/test_matrix_m1.py +335 -0
- ffman-0.1.0/tests/suite/test_matrix_m11.py +130 -0
- ffman-0.1.0/tests/suite/test_matrix_m2.py +535 -0
- ffman-0.1.0/tests/suite/test_matrix_m3.py +136 -0
- ffman-0.1.0/tests/suite/test_matrix_m5.py +170 -0
- ffman-0.1.0/tests/suite/test_matrix_m7.py +145 -0
- ffman-0.1.0/tests/suite/test_matrix_m8.py +57 -0
- ffman-0.1.0/tests/suite/test_matrix_m9_m10.py +236 -0
- ffman-0.1.0/tests/suite/test_multipass.py +273 -0
- ffman-0.1.0/tests/suite/test_resize.py +277 -0
- ffman-0.1.0/tests/suite/test_streams_proven.py +195 -0
- ffman-0.1.0/tests/suite/test_subtitles.py +1195 -0
- ffman-0.1.0/tests/suite/test_tracks.py +196 -0
- ffman-0.1.0/tests/suite/test_tracks_matrix.py +132 -0
- ffman-0.1.0/tests/suite/test_youtube.py +279 -0
- ffman-0.1.0/tests/support/__init__.py +1 -0
- ffman-0.1.0/tests/support/filtergraph.py +159 -0
- ffman-0.1.0/tests/support/fonts.py +79 -0
- ffman-0.1.0/tests/support/ingesting.py +13 -0
- ffman-0.1.0/tests/support/linebreak.py +72 -0
- ffman-0.1.0/tests/support/measures.py +568 -0
- ffman-0.1.0/tests/support/media.py +84 -0
- ffman-0.1.0/tests/support/processes.py +28 -0
- ffman-0.1.0/tests/support/subtitles.py +52 -0
- ffman-0.1.0/tests/support/transcripts.py +49 -0
- ffman-0.1.0/tests/test_architecture.py +310 -0
- ffman-0.1.0/tests/test_ass.py +655 -0
- ffman-0.1.0/tests/test_ass_properties.py +40 -0
- ffman-0.1.0/tests/test_breaks.py +82 -0
- ffman-0.1.0/tests/test_carried.py +55 -0
- ffman-0.1.0/tests/test_cli.py +259 -0
- ffman-0.1.0/tests/test_colorize.py +237 -0
- ffman-0.1.0/tests/test_convert_attached.py +171 -0
- ffman-0.1.0/tests/test_convert_covers.py +218 -0
- ffman-0.1.0/tests/test_convert_cuesheet.py +206 -0
- ffman-0.1.0/tests/test_convert_job.py +897 -0
- ffman-0.1.0/tests/test_convert_metadata.py +264 -0
- ffman-0.1.0/tests/test_convert_options.py +282 -0
- ffman-0.1.0/tests/test_convert_remux.py +307 -0
- ffman-0.1.0/tests/test_convert_subtitles.py +151 -0
- ffman-0.1.0/tests/test_convert_tagging.py +237 -0
- ffman-0.1.0/tests/test_convert_tags.py +209 -0
- ffman-0.1.0/tests/test_copies.py +52 -0
- ffman-0.1.0/tests/test_effects.py +141 -0
- ffman-0.1.0/tests/test_effects_filters.py +116 -0
- ffman-0.1.0/tests/test_encode.py +174 -0
- ffman-0.1.0/tests/test_errors.py +30 -0
- ffman-0.1.0/tests/test_fmt.py +40 -0
- ffman-0.1.0/tests/test_fonts.py +206 -0
- ffman-0.1.0/tests/test_geometry.py +271 -0
- ffman-0.1.0/tests/test_graph.py +232 -0
- ffman-0.1.0/tests/test_ingest.py +359 -0
- ffman-0.1.0/tests/test_layout.py +83 -0
- ffman-0.1.0/tests/test_measures.py +40 -0
- ffman-0.1.0/tests/test_media_flac.py +77 -0
- ffman-0.1.0/tests/test_meta_command.py +282 -0
- ffman-0.1.0/tests/test_metrics.py +82 -0
- ffman-0.1.0/tests/test_multipass.py +114 -0
- ffman-0.1.0/tests/test_options.py +115 -0
- ffman-0.1.0/tests/test_paths.py +158 -0
- ffman-0.1.0/tests/test_plan.py +519 -0
- ffman-0.1.0/tests/test_probe.py +271 -0
- ffman-0.1.0/tests/test_readme.py +16 -0
- ffman-0.1.0/tests/test_resize.py +146 -0
- ffman-0.1.0/tests/test_run.py +248 -0
- ffman-0.1.0/tests/test_tools.py +149 -0
- ffman-0.1.0/tests/test_transcript_fuzz.py +273 -0
- ffman-0.1.0/tests/test_values.py +66 -0
ffman-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
ffman-0.1.0/LICENSE-MIT
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 veralvx
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
6
|
+
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
|
7
|
+
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
|
9
|
+
following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
12
|
+
portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
|
15
|
+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
|
16
|
+
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
17
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
18
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
ffman-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: ffman
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Opinionated media conversion on ffmpeg: resize, effects, subtitles
|
|
5
|
+
Project-URL: Changelog, https://github.com/veramachine/ffsuite/blob/main/packages/ffman/CHANGELOG.md
|
|
6
|
+
Project-URL: Documentation, https://github.com/veramachine/ffsuite
|
|
7
|
+
Project-URL: Homepage, https://github.com/veramachine/ffsuite
|
|
8
|
+
Project-URL: Issues, https://github.com/veramachine/ffsuite/issues
|
|
9
|
+
Project-URL: Releasenotes, https://github.com/veramachine/ffsuite/releases
|
|
10
|
+
Project-URL: Repository, https://github.com/veramachine/ffsuite
|
|
11
|
+
Author-email: VERA LVX <veralvx@veralvx.com>
|
|
12
|
+
Maintainer-email: VERA LVX <veralvx@veralvx.com>
|
|
13
|
+
License-Expression: (MIT OR Apache-2.0) AND OFL-1.1
|
|
14
|
+
License-File: LICENSE-APACHE
|
|
15
|
+
License-File: LICENSE-MIT
|
|
16
|
+
License-File: src/ffman/fonts/OFL.txt
|
|
17
|
+
Keywords: audio,cli,conversion,effects,ffmpeg,media,metadata,resize,subtitles,video
|
|
18
|
+
Classifier: Development Status :: 4 - Beta
|
|
19
|
+
Classifier: Environment :: Console
|
|
20
|
+
Classifier: Intended Audience :: Developers
|
|
21
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
22
|
+
Classifier: Natural Language :: English
|
|
23
|
+
Classifier: Operating System :: POSIX
|
|
24
|
+
Classifier: Programming Language :: Python :: 3
|
|
25
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
28
|
+
Classifier: Topic :: Multimedia :: Graphics :: Graphics Conversion
|
|
29
|
+
Classifier: Topic :: Multimedia :: Sound/Audio :: Conversion
|
|
30
|
+
Classifier: Topic :: Multimedia :: Video :: Conversion
|
|
31
|
+
Classifier: Typing :: Typed
|
|
32
|
+
Requires-Python: >=3.13
|
|
33
|
+
Requires-Dist: ffmeta<0.2,>=0.1
|
|
34
|
+
Requires-Dist: subverter<0.2,>=0.1
|
|
35
|
+
Description-Content-Type: text/markdown
|
|
36
|
+
|
|
37
|
+
# ffman
|
|
38
|
+
|
|
39
|
+
Opinionated media conversion on ffmpeg: resize, effects, subtitles, encoding.
|
|
40
|
+
One command, `convert`, transforms one media file; `effects` lists the video
|
|
41
|
+
effects. Lossless by default: a resize keeps the source's codec and loses
|
|
42
|
+
nothing.
|
|
43
|
+
|
|
44
|
+
## Running it
|
|
45
|
+
|
|
46
|
+
On Linux or macOS; on Windows, in WSL (ffman refuses to run on Windows itself: it handles its
|
|
47
|
+
tools as POSIX does). From its flake -- on Linux (x86_64, aarch64) or macOS (Apple silicon: not
|
|
48
|
+
yet tested) -- the tools it runs come with it:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
nix run github:veramachine/ffsuite -- convert -i in.mp4 -w 1280
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Or as a container image, built from the flake on Linux, its ffmpeg with Fraunhofer's FDK AAC --
|
|
55
|
+
for your own use: ffmpeg's own build calls such an ffmpeg "nonfree and unredistributable", so no
|
|
56
|
+
binary cache holds it either (it builds from source). Docker, from the folder of your files:
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
nix build github:veramachine/ffsuite#image && ./result | docker load
|
|
60
|
+
docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/work" ffman:0.1.0 convert -i in.mp4 -w 1280
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`ffman convert --help` lists every option; `ffman effects`, the effects and
|
|
64
|
+
their values. `--dry-run` prints the plan and every ffmpeg command, and writes
|
|
65
|
+
nothing. Without `-o`, the output is `STEM.ffman.EXT` beside the input;
|
|
66
|
+
`--in-place` replaces the input.
|
|
67
|
+
|
|
68
|
+
## What it needs
|
|
69
|
+
|
|
70
|
+
The Nix package and the image bring everything. Installed any other way, ffman needs
|
|
71
|
+
**ffmpeg** (with ffprobe) on `PATH`; the rest only for what they serve:
|
|
72
|
+
|
|
73
|
+
| Tool | For | Without it |
|
|
74
|
+
| ---------------------------- | ---------------------------------------------------------------------- | --------------------------------------- |
|
|
75
|
+
| ffmpeg-normalize (and `env`) | `--preset youtube`, when the sound needs normalising | that job is refused |
|
|
76
|
+
| metaflac (flac) | a FLAC's cue sheet carried into a FLAC | noted and left out; the job completes |
|
|
77
|
+
| oxipng, jpegoptim, gifsicle | PNG, JPEG, GIF outputs optimised losslessly | noted; written unoptimised |
|
|
78
|
+
| nproc (coreutils) | the processor count: FFV1's slices past four, ffmpeg's threads past 16 | Python's count of the processors, noted |
|
|
79
|
+
|
|
80
|
+
ffman carries its fonts, IBM Plex Sans for burned captions and IBM Plex Mono for
|
|
81
|
+
the camcorder's stamp (`FFMAN_FONTS_DIR` names another folder), and the ffmpeg-normalize
|
|
82
|
+
presets `--preset youtube` uses (`FFMAN_NORMALIZE_HOME` names another: an `XDG_CONFIG_HOME`,
|
|
83
|
+
its presets in `ffmpeg-normalize/presets/`). Converting metadata files alone (with `meta` or
|
|
84
|
+
`convert`, no media) needs none of the tools.
|
|
85
|
+
|
|
86
|
+
## Examples
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
# a 9:16 story, the bars filled with the picture, blurred
|
|
90
|
+
ffman convert -i trip.mp4 -a 9:16 -w 1080 -b -o trip.story.mp4
|
|
91
|
+
# burned subtitles, the spoken word highlighted (word timings: whisper-cli -ojf, WhisperX)
|
|
92
|
+
ffman convert -i talk.mp4 --burn-subs talk.json --overlay-mode chunk-word --highlight-mode pop
|
|
93
|
+
# the same, the spoken word in a colour of your own
|
|
94
|
+
ffman convert -i talk.mp4 --burn-subs talk.json --overlay-mode chunk-word --highlight-colorize '#00BFFF'
|
|
95
|
+
# ...or by name, any case: gold, red, orange, amber, yellow, lime, green, emerald, teal, cyan
|
|
96
|
+
# (aqua), sky, blue, indigo, violet, purple, fuchsia (magenta), pink, rose, slate, gray (grey),
|
|
97
|
+
# zinc, neutral, stone, white, black
|
|
98
|
+
ffman convert -i talk.mp4 --burn-subs talk.json --overlay-mode chunk-word --highlight-colorize teal
|
|
99
|
+
# the text in a colour, outlined by contrast (black or white) unless --outline-color says
|
|
100
|
+
ffman convert -i talk.mp4 --burn-subs talk.srt --font-color amber
|
|
101
|
+
# the spoken word boxed in reverse video: the box the text's colour, the word its outline's
|
|
102
|
+
ffman convert -i talk.mp4 --burn-subs talk.json --overlay-mode chunk-word --highlight-colorize rectangle
|
|
103
|
+
# ...or the text itself in motion, outlines too
|
|
104
|
+
ffman convert -i talk.mp4 --burn-subs talk.srt --font-color iridescent --outline-color lsd
|
|
105
|
+
# ...or its letters in hues that turn: rainbow, lsd, iridescent
|
|
106
|
+
ffman convert -i talk.mp4 --burn-subs talk.json --overlay-mode chunk-word --highlight-colorize rainbow
|
|
107
|
+
# a subtitle track, nothing re-encoded
|
|
108
|
+
ffman convert -i film.mkv --add-subs film.srt --language eng --in-place
|
|
109
|
+
# for YouTube: H.264 High, two passes, AAC
|
|
110
|
+
ffman convert -i clip.mov -p youtube -o clip.mp4
|
|
111
|
+
# a cue sheet as Vorbis comments (a .txt: -p ffmetadata, the default, or vorbiscomment)
|
|
112
|
+
ffman convert -i album.cue -o album.txt -p vorbiscomment
|
|
113
|
+
# a media file's tags and chapters, as ffmetadata (or a .txt, a .cue)
|
|
114
|
+
ffman convert -i film.mkv -o film.ffmeta
|
|
115
|
+
# a metadata file edited (keys: ffmpeg's generic ones, any case), or written anew
|
|
116
|
+
ffman meta -i album.cue --in-place --set genre='Alt Rock' --set date=1991
|
|
117
|
+
ffman meta -o tags.txt -p vorbiscomment --set title=Song --add artist=A --add artist=B
|
|
118
|
+
# chapters (a cue's tracks): TIME as 62.5, 1:02.5, 1:01:02.5 or 4650f (frames)
|
|
119
|
+
ffman meta -i book.ffmeta --in-place --chapter 12:30=Road --retitle 1=Departure
|
|
120
|
+
# a cue sheet's own: its media, a track's flags and pregap (INDEX 00)
|
|
121
|
+
ffman meta -i album.cue --in-place --file album.flac --flags 2=PRE --pregap 2=4:15
|
|
122
|
+
# to stdout: a file's tags and chapters, as read (or -p ffmetadata, vorbiscomment, cue)
|
|
123
|
+
ffman meta -i film.mkv -o -
|
|
124
|
+
# a metadata file's tags and chapters, applied: alone (streams copied), or with any job
|
|
125
|
+
ffman convert -i film.mkv -o tagged.mkv --metadata chapters.cue
|
|
126
|
+
# another container: a remux, each stream copied (or encoded, when asked)
|
|
127
|
+
ffman convert -i clip.webm -o clip.mp4
|
|
128
|
+
ffman convert -i clip.mp4 -o clip.webm --video-codec vp9 --audio-codec opus
|
|
129
|
+
# effects, in any combination
|
|
130
|
+
ffman convert -i home.mp4 --vfx vhs --vfx camcorder:date=1998-07-04 -o home.vhs.mp4
|
|
131
|
+
# a GIF that loops
|
|
132
|
+
ffman convert -i trip.mp4 -w 480 --loop -o trip.gif
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## What a conversion keeps
|
|
136
|
+
|
|
137
|
+
Every stream an input carries is kept where the output holds it, and named
|
|
138
|
+
where it does not (`ffman: ... left out`) -- never dropped without a word:
|
|
139
|
+
|
|
140
|
+
- subtitles, copied or turned into the output's own text (`mov_text` in MP4,
|
|
141
|
+
WebVTT in WebM);
|
|
142
|
+
- tags and chapters (into Ogg and FLAC, as `CHAPTERxxx` comments);
|
|
143
|
+
- attachments into Matroska; elsewhere an attached cue, ffmetadata or Vorbis
|
|
144
|
+
comments file is applied as `--metadata` would apply it;
|
|
145
|
+
- the cover, copied, or into Matroska attached as `cover.png` (`cover_land`
|
|
146
|
+
when wider than tall).
|
|
147
|
+
|
|
148
|
+
The rules, each measured:
|
|
149
|
+
[`ffman-spec.md`](https://github.com/veramachine/ffsuite/blob/main/docs/ffman-spec.md) 3.12 to 3.15.
|
|
150
|
+
|
|
151
|
+
## More
|
|
152
|
+
|
|
153
|
+
- The command line's contract:
|
|
154
|
+
[`ffman-spec.md`](https://github.com/veramachine/ffsuite/blob/main/docs/ffman-spec.md).
|
|
155
|
+
- Every decision, with its evidence and the module it lives in:
|
|
156
|
+
[`docs/decisions.md`](https://github.com/veramachine/ffsuite/blob/main/docs/decisions.md).
|
|
157
|
+
- Changes, release by release:
|
|
158
|
+
[`CHANGELOG.md`](https://github.com/veramachine/ffsuite/blob/main/packages/ffman/CHANGELOG.md).
|
|
159
|
+
- Working on it: [`AGENTS.md`](https://github.com/veramachine/ffsuite/blob/main/AGENTS.md).
|
|
160
|
+
|
|
161
|
+
It replaced a bash ffman (retired in phase 5 of
|
|
162
|
+
[`ffman-python.md`](https://github.com/veramachine/ffsuite/blob/main/docs/ffman-python.md)),
|
|
163
|
+
after equalling it on every invocation of the bash suites; what it changed on purpose:
|
|
164
|
+
[`ffman-from-bash.md`](https://github.com/veramachine/ffsuite/blob/main/docs/ffman-from-bash.md).
|
|
165
|
+
|
|
166
|
+
## Licence
|
|
167
|
+
|
|
168
|
+
Part of [ffsuite](https://github.com/veramachine/ffsuite), beside its libraries ffmeta and
|
|
169
|
+
subverter. Licensed under either of
|
|
170
|
+
[MIT](https://github.com/veramachine/ffsuite/blob/main/packages/ffman/LICENSE-MIT)
|
|
171
|
+
or [Apache-2.0](https://github.com/veramachine/ffsuite/blob/main/packages/ffman/LICENSE-APACHE),
|
|
172
|
+
at your option; its fonts, IBM Plex, under the
|
|
173
|
+
[OFL](https://github.com/veramachine/ffsuite/blob/main/packages/ffman/src/ffman/fonts/OFL.txt).
|
ffman-0.1.0/README.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# ffman
|
|
2
|
+
|
|
3
|
+
Opinionated media conversion on ffmpeg: resize, effects, subtitles, encoding.
|
|
4
|
+
One command, `convert`, transforms one media file; `effects` lists the video
|
|
5
|
+
effects. Lossless by default: a resize keeps the source's codec and loses
|
|
6
|
+
nothing.
|
|
7
|
+
|
|
8
|
+
## Running it
|
|
9
|
+
|
|
10
|
+
On Linux or macOS; on Windows, in WSL (ffman refuses to run on Windows itself: it handles its
|
|
11
|
+
tools as POSIX does). From its flake -- on Linux (x86_64, aarch64) or macOS (Apple silicon: not
|
|
12
|
+
yet tested) -- the tools it runs come with it:
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
nix run github:veramachine/ffsuite -- convert -i in.mp4 -w 1280
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Or as a container image, built from the flake on Linux, its ffmpeg with Fraunhofer's FDK AAC --
|
|
19
|
+
for your own use: ffmpeg's own build calls such an ffmpeg "nonfree and unredistributable", so no
|
|
20
|
+
binary cache holds it either (it builds from source). Docker, from the folder of your files:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
nix build github:veramachine/ffsuite#image && ./result | docker load
|
|
24
|
+
docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/work" ffman:0.1.0 convert -i in.mp4 -w 1280
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`ffman convert --help` lists every option; `ffman effects`, the effects and
|
|
28
|
+
their values. `--dry-run` prints the plan and every ffmpeg command, and writes
|
|
29
|
+
nothing. Without `-o`, the output is `STEM.ffman.EXT` beside the input;
|
|
30
|
+
`--in-place` replaces the input.
|
|
31
|
+
|
|
32
|
+
## What it needs
|
|
33
|
+
|
|
34
|
+
The Nix package and the image bring everything. Installed any other way, ffman needs
|
|
35
|
+
**ffmpeg** (with ffprobe) on `PATH`; the rest only for what they serve:
|
|
36
|
+
|
|
37
|
+
| Tool | For | Without it |
|
|
38
|
+
| ---------------------------- | ---------------------------------------------------------------------- | --------------------------------------- |
|
|
39
|
+
| ffmpeg-normalize (and `env`) | `--preset youtube`, when the sound needs normalising | that job is refused |
|
|
40
|
+
| metaflac (flac) | a FLAC's cue sheet carried into a FLAC | noted and left out; the job completes |
|
|
41
|
+
| oxipng, jpegoptim, gifsicle | PNG, JPEG, GIF outputs optimised losslessly | noted; written unoptimised |
|
|
42
|
+
| nproc (coreutils) | the processor count: FFV1's slices past four, ffmpeg's threads past 16 | Python's count of the processors, noted |
|
|
43
|
+
|
|
44
|
+
ffman carries its fonts, IBM Plex Sans for burned captions and IBM Plex Mono for
|
|
45
|
+
the camcorder's stamp (`FFMAN_FONTS_DIR` names another folder), and the ffmpeg-normalize
|
|
46
|
+
presets `--preset youtube` uses (`FFMAN_NORMALIZE_HOME` names another: an `XDG_CONFIG_HOME`,
|
|
47
|
+
its presets in `ffmpeg-normalize/presets/`). Converting metadata files alone (with `meta` or
|
|
48
|
+
`convert`, no media) needs none of the tools.
|
|
49
|
+
|
|
50
|
+
## Examples
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
# a 9:16 story, the bars filled with the picture, blurred
|
|
54
|
+
ffman convert -i trip.mp4 -a 9:16 -w 1080 -b -o trip.story.mp4
|
|
55
|
+
# burned subtitles, the spoken word highlighted (word timings: whisper-cli -ojf, WhisperX)
|
|
56
|
+
ffman convert -i talk.mp4 --burn-subs talk.json --overlay-mode chunk-word --highlight-mode pop
|
|
57
|
+
# the same, the spoken word in a colour of your own
|
|
58
|
+
ffman convert -i talk.mp4 --burn-subs talk.json --overlay-mode chunk-word --highlight-colorize '#00BFFF'
|
|
59
|
+
# ...or by name, any case: gold, red, orange, amber, yellow, lime, green, emerald, teal, cyan
|
|
60
|
+
# (aqua), sky, blue, indigo, violet, purple, fuchsia (magenta), pink, rose, slate, gray (grey),
|
|
61
|
+
# zinc, neutral, stone, white, black
|
|
62
|
+
ffman convert -i talk.mp4 --burn-subs talk.json --overlay-mode chunk-word --highlight-colorize teal
|
|
63
|
+
# the text in a colour, outlined by contrast (black or white) unless --outline-color says
|
|
64
|
+
ffman convert -i talk.mp4 --burn-subs talk.srt --font-color amber
|
|
65
|
+
# the spoken word boxed in reverse video: the box the text's colour, the word its outline's
|
|
66
|
+
ffman convert -i talk.mp4 --burn-subs talk.json --overlay-mode chunk-word --highlight-colorize rectangle
|
|
67
|
+
# ...or the text itself in motion, outlines too
|
|
68
|
+
ffman convert -i talk.mp4 --burn-subs talk.srt --font-color iridescent --outline-color lsd
|
|
69
|
+
# ...or its letters in hues that turn: rainbow, lsd, iridescent
|
|
70
|
+
ffman convert -i talk.mp4 --burn-subs talk.json --overlay-mode chunk-word --highlight-colorize rainbow
|
|
71
|
+
# a subtitle track, nothing re-encoded
|
|
72
|
+
ffman convert -i film.mkv --add-subs film.srt --language eng --in-place
|
|
73
|
+
# for YouTube: H.264 High, two passes, AAC
|
|
74
|
+
ffman convert -i clip.mov -p youtube -o clip.mp4
|
|
75
|
+
# a cue sheet as Vorbis comments (a .txt: -p ffmetadata, the default, or vorbiscomment)
|
|
76
|
+
ffman convert -i album.cue -o album.txt -p vorbiscomment
|
|
77
|
+
# a media file's tags and chapters, as ffmetadata (or a .txt, a .cue)
|
|
78
|
+
ffman convert -i film.mkv -o film.ffmeta
|
|
79
|
+
# a metadata file edited (keys: ffmpeg's generic ones, any case), or written anew
|
|
80
|
+
ffman meta -i album.cue --in-place --set genre='Alt Rock' --set date=1991
|
|
81
|
+
ffman meta -o tags.txt -p vorbiscomment --set title=Song --add artist=A --add artist=B
|
|
82
|
+
# chapters (a cue's tracks): TIME as 62.5, 1:02.5, 1:01:02.5 or 4650f (frames)
|
|
83
|
+
ffman meta -i book.ffmeta --in-place --chapter 12:30=Road --retitle 1=Departure
|
|
84
|
+
# a cue sheet's own: its media, a track's flags and pregap (INDEX 00)
|
|
85
|
+
ffman meta -i album.cue --in-place --file album.flac --flags 2=PRE --pregap 2=4:15
|
|
86
|
+
# to stdout: a file's tags and chapters, as read (or -p ffmetadata, vorbiscomment, cue)
|
|
87
|
+
ffman meta -i film.mkv -o -
|
|
88
|
+
# a metadata file's tags and chapters, applied: alone (streams copied), or with any job
|
|
89
|
+
ffman convert -i film.mkv -o tagged.mkv --metadata chapters.cue
|
|
90
|
+
# another container: a remux, each stream copied (or encoded, when asked)
|
|
91
|
+
ffman convert -i clip.webm -o clip.mp4
|
|
92
|
+
ffman convert -i clip.mp4 -o clip.webm --video-codec vp9 --audio-codec opus
|
|
93
|
+
# effects, in any combination
|
|
94
|
+
ffman convert -i home.mp4 --vfx vhs --vfx camcorder:date=1998-07-04 -o home.vhs.mp4
|
|
95
|
+
# a GIF that loops
|
|
96
|
+
ffman convert -i trip.mp4 -w 480 --loop -o trip.gif
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## What a conversion keeps
|
|
100
|
+
|
|
101
|
+
Every stream an input carries is kept where the output holds it, and named
|
|
102
|
+
where it does not (`ffman: ... left out`) -- never dropped without a word:
|
|
103
|
+
|
|
104
|
+
- subtitles, copied or turned into the output's own text (`mov_text` in MP4,
|
|
105
|
+
WebVTT in WebM);
|
|
106
|
+
- tags and chapters (into Ogg and FLAC, as `CHAPTERxxx` comments);
|
|
107
|
+
- attachments into Matroska; elsewhere an attached cue, ffmetadata or Vorbis
|
|
108
|
+
comments file is applied as `--metadata` would apply it;
|
|
109
|
+
- the cover, copied, or into Matroska attached as `cover.png` (`cover_land`
|
|
110
|
+
when wider than tall).
|
|
111
|
+
|
|
112
|
+
The rules, each measured:
|
|
113
|
+
[`ffman-spec.md`](https://github.com/veramachine/ffsuite/blob/main/docs/ffman-spec.md) 3.12 to 3.15.
|
|
114
|
+
|
|
115
|
+
## More
|
|
116
|
+
|
|
117
|
+
- The command line's contract:
|
|
118
|
+
[`ffman-spec.md`](https://github.com/veramachine/ffsuite/blob/main/docs/ffman-spec.md).
|
|
119
|
+
- Every decision, with its evidence and the module it lives in:
|
|
120
|
+
[`docs/decisions.md`](https://github.com/veramachine/ffsuite/blob/main/docs/decisions.md).
|
|
121
|
+
- Changes, release by release:
|
|
122
|
+
[`CHANGELOG.md`](https://github.com/veramachine/ffsuite/blob/main/packages/ffman/CHANGELOG.md).
|
|
123
|
+
- Working on it: [`AGENTS.md`](https://github.com/veramachine/ffsuite/blob/main/AGENTS.md).
|
|
124
|
+
|
|
125
|
+
It replaced a bash ffman (retired in phase 5 of
|
|
126
|
+
[`ffman-python.md`](https://github.com/veramachine/ffsuite/blob/main/docs/ffman-python.md)),
|
|
127
|
+
after equalling it on every invocation of the bash suites; what it changed on purpose:
|
|
128
|
+
[`ffman-from-bash.md`](https://github.com/veramachine/ffsuite/blob/main/docs/ffman-from-bash.md).
|
|
129
|
+
|
|
130
|
+
## Licence
|
|
131
|
+
|
|
132
|
+
Part of [ffsuite](https://github.com/veramachine/ffsuite), beside its libraries ffmeta and
|
|
133
|
+
subverter. Licensed under either of
|
|
134
|
+
[MIT](https://github.com/veramachine/ffsuite/blob/main/packages/ffman/LICENSE-MIT)
|
|
135
|
+
or [Apache-2.0](https://github.com/veramachine/ffsuite/blob/main/packages/ffman/LICENSE-APACHE),
|
|
136
|
+
at your option; its fonts, IBM Plex, under the
|
|
137
|
+
[OFL](https://github.com/veramachine/ffsuite/blob/main/packages/ffman/src/ffman/fonts/OFL.txt).
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
# 1.26.0 brought license-files to PEP 639's final form; 1.26.2 fixed the metadata 1.26.0 wrote
|
|
3
|
+
# for older core-metadata versions (hatchling's changelog)
|
|
4
|
+
requires = ["hatchling>=1.26.2"]
|
|
5
|
+
build-backend = "hatchling.build"
|
|
6
|
+
|
|
7
|
+
[project]
|
|
8
|
+
name = "ffman"
|
|
9
|
+
version = "0.1.0"
|
|
10
|
+
description = "Opinionated media conversion on ffmpeg: resize, effects, subtitles"
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
# the owner's: MIT or Apache-2.0, the user's choice; the wheel carries the OFL fonts. The
|
|
13
|
+
# parentheses are the meaning: SPDX applies AND before OR (3.0.1, Annex B)
|
|
14
|
+
license = "(MIT OR Apache-2.0) AND OFL-1.1"
|
|
15
|
+
license-files = ["LICENSE-MIT", "LICENSE-APACHE", "src/ffman/fonts/OFL.txt"]
|
|
16
|
+
requires-python = ">=3.13"
|
|
17
|
+
authors = [{ name = "VERA LVX", email = "veralvx@veralvx.com" }]
|
|
18
|
+
maintainers = [{ name = "VERA LVX", email = "veralvx@veralvx.com" }]
|
|
19
|
+
keywords = [
|
|
20
|
+
"ffmpeg",
|
|
21
|
+
"video",
|
|
22
|
+
"audio",
|
|
23
|
+
"subtitles",
|
|
24
|
+
"media",
|
|
25
|
+
"conversion",
|
|
26
|
+
"resize",
|
|
27
|
+
"effects",
|
|
28
|
+
"metadata",
|
|
29
|
+
"cli",
|
|
30
|
+
]
|
|
31
|
+
# https://pypi.org/classifiers/ -- no License :: one: with a license expression, PyPI rejects
|
|
32
|
+
# the upload (PEP 639). POSIX: process groups, killpg, SIGHUP (media/run.py)
|
|
33
|
+
classifiers = [
|
|
34
|
+
"Development Status :: 4 - Beta", # 0.x, as its libraries: young, not yet stable (the owner's)
|
|
35
|
+
"Environment :: Console",
|
|
36
|
+
"Intended Audience :: Developers",
|
|
37
|
+
"Intended Audience :: End Users/Desktop",
|
|
38
|
+
"Natural Language :: English",
|
|
39
|
+
"Operating System :: POSIX",
|
|
40
|
+
"Programming Language :: Python :: 3",
|
|
41
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
42
|
+
"Programming Language :: Python :: 3.13",
|
|
43
|
+
"Programming Language :: Python :: 3.14",
|
|
44
|
+
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
|
|
45
|
+
"Topic :: Multimedia :: Sound/Audio :: Conversion",
|
|
46
|
+
"Topic :: Multimedia :: Video :: Conversion",
|
|
47
|
+
"Typing :: Typed",
|
|
48
|
+
]
|
|
49
|
+
# each library's 0.1 line: in 0.x a minor release may break, so the next is kept out (PEP 440:
|
|
50
|
+
# `<0.2` admits no 0.2 pre-release either)
|
|
51
|
+
dependencies = ["ffmeta>=0.1,<0.2", "subverter>=0.1,<0.2"]
|
|
52
|
+
|
|
53
|
+
[project.urls]
|
|
54
|
+
Changelog = "https://github.com/veramachine/ffsuite/blob/main/packages/ffman/CHANGELOG.md"
|
|
55
|
+
Documentation = "https://github.com/veramachine/ffsuite"
|
|
56
|
+
Homepage = "https://github.com/veramachine/ffsuite"
|
|
57
|
+
Issues = "https://github.com/veramachine/ffsuite/issues"
|
|
58
|
+
Releasenotes = "https://github.com/veramachine/ffsuite/releases"
|
|
59
|
+
Repository = "https://github.com/veramachine/ffsuite"
|
|
60
|
+
|
|
61
|
+
[project.scripts]
|
|
62
|
+
ffman = "ffman.__main__:main"
|
|
63
|
+
|
|
64
|
+
[tool.uv.sources]
|
|
65
|
+
ffmeta = { workspace = true }
|
|
66
|
+
subverter = { workspace = true }
|
|
67
|
+
|
|
68
|
+
[tool.hatch.build.targets.sdist]
|
|
69
|
+
# hatchling adds pyproject.toml, the README and the licence files itself. Its tests pass from it
|
|
70
|
+
# alone (measured); the repository's own are left out -- test_workspace (it reads the whole
|
|
71
|
+
# workspace) and the outcome harness with its test (it compares the repository's revisions,
|
|
72
|
+
# each run on its own sources)
|
|
73
|
+
only-include = ["src", "tests", "CHANGELOG.md"]
|
|
74
|
+
exclude = ["tests/test_workspace.py", "tests/test_outcome.py", "tests/outcome"]
|
|
75
|
+
|
|
76
|
+
[tool.hatch.build.targets.wheel]
|
|
77
|
+
packages = ["src/ffman"]
|
|
78
|
+
|
|
79
|
+
[tool.pytest.ini_options]
|
|
80
|
+
# its own, for its sdist's tests alone; from the repository's root, the root's governs
|
|
81
|
+
minversion = "9.0"
|
|
82
|
+
testpaths = ["tests"]
|
|
83
|
+
pythonpath = ["."]
|
|
84
|
+
addopts = ["--strict-markers", "--strict-config", "-ra", "--import-mode=importlib"]
|
|
85
|
+
xfail_strict = true
|
|
86
|
+
filterwarnings = ["error"]
|
|
87
|
+
timeout = 600
|
|
88
|
+
markers = [
|
|
89
|
+
"ffmpeg: needs a pinned tool, ffmpeg 8.1 or metaflac 1.5 (integration)",
|
|
90
|
+
"slow: the combination matrix",
|
|
91
|
+
]
|