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 |
|