iterframes 0.5.0__cp311-abi3-win_amd64.whl

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.
iterframes/__init__.py ADDED
@@ -0,0 +1,149 @@
1
+ """Iterate over the frames of a video as NumPy arrays.
2
+
3
+ The frames are decoded on a background thread that never takes the GIL,
4
+ so the next ones are decoded while your code processes the current one.
5
+ """
6
+
7
+ import os
8
+ from typing import Iterator, Optional, Sequence, Union
9
+
10
+ import numpy as np
11
+
12
+ from .iterframes import (
13
+ DEVICES,
14
+ FFMPEG_VERSION,
15
+ Batch,
16
+ CudaFrame,
17
+ Frame,
18
+ FrameReader,
19
+ Plane,
20
+ __version__,
21
+ )
22
+
23
+ __all__ = [
24
+ "DEVICES",
25
+ "Batch",
26
+ "FFMPEG_VERSION",
27
+ "CudaFrame",
28
+ "Frame",
29
+ "FrameReader",
30
+ "Plane",
31
+ "__version__",
32
+ "read",
33
+ "read_batches",
34
+ ]
35
+
36
+ PathLike = Union[str, "os.PathLike[str]"]
37
+
38
+
39
+ def read(
40
+ path: PathLike,
41
+ height: Optional[int] = None,
42
+ width: Optional[int] = None,
43
+ prefetch_frames: int = 1,
44
+ device: str = "cpu",
45
+ on_device: bool = False,
46
+ frames: Optional[Sequence[int]] = None,
47
+ start: int = 0,
48
+ stop: Optional[int] = None,
49
+ step: int = 1,
50
+ ) -> Iterator[Union[np.ndarray, CudaFrame]]:
51
+ """Yield the frames of the video at ``path``, in order.
52
+
53
+ With ``frames``, or ``start``, ``stop``, and ``step``, only those
54
+ frames are read, in the order asked for.
55
+
56
+ Each frame is a ``(height, width, 3)`` array of ``uint8`` RGB pixels.
57
+ ``height`` and ``width`` resize the frames; when only one is given, the
58
+ other keeps the size of the video. While your code processes a frame, a
59
+ background thread decodes up to ``prefetch_frames`` frames ahead of it,
60
+ without taking the GIL.
61
+
62
+ ``device`` is where to decode, named as in PyTorch: ``"cpu"``,
63
+ ``"mps"`` (Apple's VideoToolbox), or ``"cuda"`` (NVIDIA's NVDEC); see
64
+ :data:`DEVICES`. ``"auto"`` picks the first hardware device that opens
65
+ and falls back to the CPU, while a hardware name raises
66
+ ``RuntimeError`` when its device cannot be opened. Codecs the device
67
+ does not support are decoded on the CPU either way. The frames reach
68
+ your code as NumPy arrays in memory.
69
+
70
+ With ``device="cuda"``, ``on_device=True`` leaves the frames on the GPU
71
+ instead, as :class:`CudaFrame` objects in NV12 whose planes PyTorch and
72
+ other libraries take through DLPack without a copy. The frames must
73
+ then be decoded on the GPU: other codecs raise ``RuntimeError``.
74
+
75
+ ``frames`` reads the frames with those numbers, in that order, instead
76
+ of the whole video; ``start``, ``stop``, and ``step`` read a slice of
77
+ it, with the meaning they have when slicing a list. Negative numbers
78
+ count from the end of the video, and a number the video does not have
79
+ raises ``IndexError``. ``start=0`` with ``step=1`` reads the video
80
+ straight through and stops at ``stop``; every other selection indexes
81
+ the file first, by reading its packets without decoding them, and then
82
+ decodes each frame from the key frame before it, so frames asked for
83
+ in order cost no more than reading the video straight through.
84
+ """
85
+ reader = FrameReader(
86
+ path,
87
+ height,
88
+ width,
89
+ prefetch_frames,
90
+ device,
91
+ on_device,
92
+ frames=frames if frames is None else list(frames),
93
+ start=start,
94
+ stop=stop,
95
+ step=step,
96
+ )
97
+ if on_device:
98
+ yield from reader
99
+ return
100
+ # The arrays share memory with the frames, which they keep alive.
101
+ for frame in reader:
102
+ yield np.asarray(frame)
103
+
104
+
105
+ def read_batches(
106
+ path: PathLike,
107
+ batch_size: int,
108
+ height: Optional[int] = None,
109
+ width: Optional[int] = None,
110
+ prefetch_frames: int = 1,
111
+ device: str = "cpu",
112
+ drop_last: bool = False,
113
+ frames: Optional[Sequence[int]] = None,
114
+ start: int = 0,
115
+ stop: Optional[int] = None,
116
+ step: int = 1,
117
+ ) -> Iterator[np.ndarray]:
118
+ """Yield the frames of the video at ``path`` in batches, in order.
119
+
120
+ Each batch is a ``(batch_size, height, width, 3)`` array of ``uint8``
121
+ RGB pixels. The frames are decoded straight into it, so it costs no
122
+ copy. The last batch holds the frames left over, unless ``drop_last``
123
+ drops it. The frames of a batch have the size of the first frame of the
124
+ video, or ``height`` and ``width``.
125
+
126
+ Takes the same arguments as :func:`read`, except ``on_device``, so
127
+ ``frames``, or ``start``, ``stop``, and ``step``, batch the frames
128
+ with those numbers instead of the whole video. The background thread
129
+ decodes up to ``prefetch_frames`` frames ahead, rounded up to whole
130
+ batches.
131
+ """
132
+ if batch_size < 1:
133
+ raise ValueError("batch_size must be at least 1")
134
+ reader = FrameReader(
135
+ path,
136
+ height,
137
+ width,
138
+ prefetch_frames,
139
+ device,
140
+ batch_size=batch_size,
141
+ drop_last=drop_last,
142
+ frames=frames if frames is None else list(frames),
143
+ start=start,
144
+ stop=stop,
145
+ step=step,
146
+ )
147
+ # The arrays share memory with the batches, which they keep alive.
148
+ for batch in reader:
149
+ yield np.asarray(batch)
Binary file
@@ -0,0 +1,196 @@
1
+ Metadata-Version: 2.4
2
+ Name: iterframes
3
+ Version: 0.5.0
4
+ Classifier: Intended Audience :: Science/Research
5
+ Classifier: Programming Language :: Python :: 3
6
+ Classifier: Programming Language :: Python :: Implementation :: CPython
7
+ Classifier: Programming Language :: Rust
8
+ Classifier: Topic :: Multimedia :: Video
9
+ Requires-Dist: numpy>=1.21
10
+ License-File: LICENSE
11
+ Summary: Iterate over the frames of a video as NumPy arrays, decoded on a background thread while you process them
12
+ Keywords: video,decoder,ffmpeg,frames,numpy,video-reader,pytorch,deep-learning,computer-vision,nvdec,videotoolbox
13
+ Home-Page: https://github.com/alesanfra/iterframes
14
+ Author-email: Alessio Sanfratello <sanfra90@gmail.com>
15
+ License-Expression: LGPL-3.0-only
16
+ Requires-Python: >=3.11
17
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
18
+ Project-URL: Changelog, https://github.com/alesanfra/iterframes/blob/main/CHANGELOG.md
19
+ Project-URL: Documentation, https://iterframes.readthedocs.io
20
+ Project-URL: Homepage, https://github.com/alesanfra/iterframes
21
+ Project-URL: Issues, https://github.com/alesanfra/iterframes/issues
22
+ Project-URL: Source, https://github.com/alesanfra/iterframes
23
+
24
+ # iterframes
25
+
26
+ [![PyPI](https://img.shields.io/pypi/v/iterframes.svg)](https://pypi.org/project/iterframes/)
27
+ [![CI](https://github.com/alesanfra/iterframes/actions/workflows/ci.yaml/badge.svg)](https://github.com/alesanfra/iterframes/actions/workflows/ci.yaml)
28
+ [![Documentation](https://readthedocs.org/projects/iterframes/badge/?version=latest)](https://iterframes.readthedocs.io)
29
+
30
+ **Video frames as NumPy arrays, decoded while your code is busy with the
31
+ last one.**
32
+
33
+ ```python
34
+ import iterframes
35
+
36
+ for frame in iterframes.read("video.mp4", height=224, width=224):
37
+ model(frame) # (224, 224, 3) uint8 RGB, resized by FFmpeg, no copy
38
+ ```
39
+
40
+ `model` runs on one frame while a Rust thread decodes the next ones. That
41
+ thread never takes the GIL, so decoding overlaps with your work instead of
42
+ adding to it, even when your code is pure Python. `pip install iterframes`
43
+ brings FFmpeg with it: nothing else to install, no system packages, no
44
+ `ffmpeg` binary to call.
45
+
46
+ The documentation is at
47
+ [iterframes.readthedocs.io](https://iterframes.readthedocs.io): the
48
+ [reference](https://iterframes.readthedocs.io/en/latest/reference/)
49
+ documents every argument and error, and the
50
+ [development guide](https://iterframes.readthedocs.io/en/latest/development/)
51
+ covers building from source.
52
+
53
+ ## Numbers
54
+
55
+ One video, 901 frames of 480x270 H.264, decoded and converted to RGB,
56
+ best of seven runs on an Apple silicon Mac with the bundled FFmpeg 9.0.2.
57
+ The benchmarks are in
58
+ [`tests/test_benchmark.py`](https://github.com/alesanfra/iterframes/blob/main/tests/test_benchmark.py);
59
+ run them on your own videos before believing them.
60
+
61
+ | | Time |
62
+ | --- | --- |
63
+ | Every frame, iterframes | **0.046 s** |
64
+ | Every frame, PyAV, same decode and conversion | 0.208 s |
65
+ | 32 frames at random positions | 0.036 s |
66
+ | First 10 frames (`stop=10`) | 0.003 s |
67
+ | Second half (`start=450`) | 0.028 s |
68
+
69
+ In the overlap benchmark, which upscales the same video to 1080p, adding
70
+ per-frame work as expensive as decoding took 16% longer in total, not
71
+ twice as long: the decoding had already happened.
72
+
73
+ ## What you get
74
+
75
+ - **Frames without copies.** RGB `uint8` arrays of shape
76
+ `(height, width, 3)`, straight out of FFmpeg's buffers.
77
+ - **Batches as one array.** `read_batches` decodes into a single
78
+ `(batch, height, width, 3)` block, ready for a model.
79
+ - **Resizing while decoding**, not a `cv2.resize` afterwards.
80
+ - **Random access.** Read frames by number, without decoding the rest.
81
+ - **Hardware decoding** on NVIDIA GPUs (NVDEC) and Apple silicon
82
+ (VideoToolbox), in the wheels. On NVIDIA the frames can stay on the GPU
83
+ for PyTorch.
84
+ - **Wheels** for Linux (x86_64, aarch64), macOS (Apple silicon), and
85
+ Windows, for every CPython from 3.11 on.
86
+
87
+ ```python
88
+ # Batches of 12 frames, decoded into one (12, 224, 224, 3) array
89
+ for batch in iterframes.read_batches("video.mp4", 12, height=224, width=224):
90
+ ...
91
+
92
+ # Stop whenever you like; the decoder stops with the loop
93
+ for index, frame in enumerate(iterframes.read("video.mp4")):
94
+ if index == 100:
95
+ break
96
+ ```
97
+
98
+ ## Random access
99
+
100
+ Sample clips for training, or grab a thumbnail, without reading the whole
101
+ file:
102
+
103
+ ```python
104
+ clip = list(iterframes.read("video.mp4", frames=[0, 30, 60]))
105
+ every_fifth = iterframes.read("video.mp4", start=100, stop=200, step=5)
106
+ last = next(iterframes.read("video.mp4", frames=[-1]))
107
+ ```
108
+
109
+ Both work with `read_batches`. Negative numbers count from the end, and
110
+ frame `n` is the one `read` yields `n`-th. iterframes indexes the file
111
+ once, without decoding it, then decodes each frame from the key frame
112
+ before it; frames asked for in order cost no more than reading the video
113
+ straight through. See
114
+ [Reading frames by number](https://iterframes.readthedocs.io/en/latest/reference/#reading-frames-by-number).
115
+
116
+ ## Hardware decoding
117
+
118
+ Pass `device` to decode on a GPU instead of the CPU, which then stays free
119
+ for your model. The names are PyTorch's:
120
+
121
+ ```python
122
+ # NVIDIA GPU on Linux and Windows; with height and width, the GPU resizes too
123
+ for frame in iterframes.read("video.mp4", height=224, width=224, device="cuda"):
124
+ ...
125
+
126
+ # Apple silicon (VideoToolbox)
127
+ for frame in iterframes.read("video.mp4", device="mps"):
128
+ ...
129
+
130
+ # Whatever the machine has, else the CPU
131
+ for frame in iterframes.read("video.mp4", device="auto"):
132
+ ...
133
+
134
+ print(iterframes.DEVICES) # ('cpu', 'mps') on a Mac
135
+ ```
136
+
137
+ The frames still arrive as NumPy arrays in memory. A GPU saves CPU time
138
+ but is not always faster than the CPU decoder, so measure both; see
139
+ [Hardware decoding](https://iterframes.readthedocs.io/en/latest/reference/#hardware-decoding).
140
+
141
+ With an NVIDIA GPU, `on_device=True` keeps the frames on it, in NV12, for
142
+ PyTorch and other libraries to take without a copy:
143
+
144
+ ```python
145
+ import torch
146
+
147
+ for frame in iterframes.read("video.mp4", device="cuda", on_device=True):
148
+ y = torch.from_dlpack(frame.y) # (height, width) uint8, on the GPU
149
+ uv = torch.from_dlpack(frame.uv) # (height / 2, width / 2, 2)
150
+ ```
151
+
152
+ [Frames on the GPU](https://iterframes.readthedocs.io/en/latest/reference/#frames-on-the-gpu) shows how to
153
+ convert them to RGB there.
154
+
155
+ ## Compared with OpenCV, decord, and PyAV
156
+
157
+ | | iterframes | OpenCV `VideoCapture` | decord | PyAV |
158
+ | --- | --- | --- | --- | --- |
159
+ | Decoding runs | Ahead of your code, on a background thread | When you call `read()` | When you index the reader | When you ask for the next frame |
160
+ | Pixels | RGB | BGR | RGB | Any format FFmpeg supports |
161
+ | Resize while decoding | Yes | No, with `cv2.resize` after | Yes | Yes, with `reformat` |
162
+ | Batches as one array | Yes, `read_batches` | No | Yes, `get_batch` | No |
163
+ | Seeking and random access | Yes, `frames=[...]` or `start`, `stop`, `step` | Yes | Yes, fast | Yes |
164
+ | Audio, encoding, muxing | No | Encoding with `VideoWriter` | Audio reading | Yes |
165
+ | Hardware decoding | NVIDIA, Apple silicon, in the wheels | Depends on the build and backend | NVIDIA, when built from source | Depends on the build |
166
+ | Latest wheels | Linux, macOS, Windows, CPython 3.11+ | Linux, macOS, Windows | x86_64 only, last release in 2021 | Linux, macOS, Windows |
167
+
168
+ Pick iterframes to read videos into a model, in order or by frame number,
169
+ and keep decoding out of your loop's way. Pick PyAV when you need the rest
170
+ of FFmpeg: audio, encoding, streams, or precise control over the decoder.
171
+ OpenCV is the natural choice when the rest of the pipeline already uses
172
+ it.
173
+
174
+ ## Installation
175
+
176
+ ```console
177
+ pip install iterframes
178
+ ```
179
+
180
+ The wheels bundle FFmpeg and work on any CPython from 3.11 on, on Linux
181
+ (x86_64, aarch64), macOS (Apple silicon), and Windows (x86_64). Other
182
+ platforms build from source, FFmpeg included.
183
+
184
+ ## Contributing
185
+
186
+ Contributions are welcome. The
187
+ [development guide](https://iterframes.readthedocs.io/en/latest/development/#help-wanted)
188
+ lists features that are waiting for someone to build them.
189
+
190
+ ## License
191
+
192
+ iterframes is released under the [LGPL-3.0](https://github.com/alesanfra/iterframes/blob/main/LICENSE). The wheels include
193
+ [FFmpeg](https://ffmpeg.org/), built under the LGPL, and
194
+ [dav1d](https://code.videolan.org/videolan/dav1d), under the BSD 2-clause
195
+ license.
196
+
@@ -0,0 +1,7 @@
1
+ iterframes/__init__.py,sha256=7mtAkZujhGGI4-M928Hu9ZXWlJ4XSYWQXNzGFp8rthQ,5094
2
+ iterframes/iterframes.pyd,sha256=bw0JJpH-NPVHhmLUx4-aFvfAxTW_qicL_418_DbebSQ,17415168
3
+ iterframes-0.5.0.dist-info/METADATA,sha256=ajWImwnAamKPppG3_KlNsV_5uYeefWXtWzNrdVnuJEI,8410
4
+ iterframes-0.5.0.dist-info/WHEEL,sha256=I37eTNpE2wbBLxuGAyG7p6lFvJQiIjnLN05rBA0wN9g,96
5
+ iterframes-0.5.0.dist-info/licenses/LICENSE,sha256=fTqV5eBpeAZO0_jit8j4Ref9ikBSlHJ8xwj5TLg7gFk,7817
6
+ iterframes-0.5.0.dist-info/sboms/iterframes.cyclonedx.json,sha256=aamhyrnizmBReavFEAqj9t-Y8lE3Ko1-Ks6dfZY1RTA,42879
7
+ iterframes-0.5.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.15.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp311-abi3-win_amd64
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.