encode_utils_cli
¶
Public accessible objects of that module.
chapt2bmqpyml
¶
chapt2bmqpyml
¶
Generate bookmarks and chapters YAML file from chapters text file.
Source code in src/encode_utils_cli/chapt2bmqpyml.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
frames_denum
¶
frames_denum
¶
Divide the frames by the specified divisor.
Example:
>>> frames_denum((16886, 26280), denum=2)
<<< "8443 13140"
>>> frames_denum((16886, 26280), denum=.5)
<<< "33772 52560"
Source code in src/encode_utils_cli/frames_denum.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
mpls2chap
¶
mpls2chap
¶
Convert MPLS file to chapter files.
Source code in src/encode_utils_cli/mpls2chap.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
num_frames
¶
num_frames
¶
Calculate the number of frames in the given videos.
Source code in src/encode_utils_cli/num_frames.py
8 9 10 11 12 13 14 15 16 17 18 |
|
re_chapters
¶
re_chapters
¶
Replaces chapter names in episodes with names from a config file.
Source code in src/encode_utils_cli/re_chapters.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
sub_chapter
¶
Replace chapter name.
Source code in src/encode_utils_cli/re_chapters.py
42 43 44 |
|
re_titles
¶
re_titles
¶
Reformat titles from AniDB.
Example:
>>> 1 The Prince`s New Clothes
<<< e1: EP1 «The Prince`s New Clothes»
Source code in src/encode_utils_cli/re_titles.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|
screens2bm
¶
screens2bm
¶
Convert hh:mm:ss.xxxx
in screens filenames to bookmark frames.
Example:
>>> 00000 (00:12:34.34) 01.png
<<< 18086
>>> 00000 (00_00_03.34) 02.png
<<< 80
Source code in src/encode_utils_cli/screens2bm.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
|
util
¶
Public accessible objects of that module.
load_mpls
¶
PlayList
¶
Bases: NamedTuple
Represents a playlist.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
The name of the playlist. |
times |
list[int]
|
The list of times associated with the playlist. |
load_mpls
¶
Load and parse an MPLS (Blu-ray playlist) file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
f |
BinaryIO
|
The file object representing the MPLS file. |
required |
fix_overlap |
bool
|
Whether to fix overlapping timestamps. Defaults to True. |
True
|
Returns:
Type | Description |
---|---|
list[PlayList]
|
A list of PlayList objects representing the playlists in the MPLS file. |
Examples:
>>> [
>>> PlayList(name="00014", times=[189000000, 194469213, 225901239, 249525465, 253620806]),
>>> PlayList(name="00015", times=[189000000, 200779267, 223110326, 249510450, 253620806]),
>>> ]
Source code in src/encode_utils_cli/util/load_mpls.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|
source
¶
source
¶
source(video: Path) -> VideoNode
Load a video source using VapourSynth.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
video |
Path
|
The path to the video file. |
required |
Returns:
Name | Type | Description |
---|---|---|
VideoNode |
VideoNode
|
The loaded video source. |
Source code in src/encode_utils_cli/util/source.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
timeconv
¶
seconds2ts
¶
Convert seconds to timestamp in the format hh:mm:ss.xxx
.
Source code in src/encode_utils_cli/util/timeconv.py
4 5 6 7 8 9 10 |
|
ts2seconds
¶
Convert timestamp hh:mm:ss.xxxx
to seconds.
Source code in src/encode_utils_cli/util/timeconv.py
13 14 15 16 |
|
seconds2f
¶
Convert seconds to frames.
Source code in src/encode_utils_cli/util/timeconv.py
19 20 21 |
|
ts2f
¶
Convert a timestamp hh:mm:ss.xxxx
in number of frames.
Source code in src/encode_utils_cli/util/timeconv.py
24 25 26 |
|
vs_screens
¶
vs_screens
¶
vs_screens(vids: tuple[Path], out_dir: Path, frames: str, offset: int, crop: int, drop_prop: bool) -> None
Generate screen frames from videos.
Source code in src/encode_utils_cli/vs_screens.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
|
open_clip
¶
Prepare clip.
Source code in src/encode_utils_cli/vs_screens.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
zones_validator
¶
zones_validator
¶
zones_validator(zones_config: Path) -> None
Validate x264/x265 zones configuration file.
Source code in src/encode_utils_cli/zones_validator.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|