YUV4MPEG2 (.y4m) Reader/Writer
tested with python-2.7, python-3.3 and python3.4
```python
import sys
import y4m
def process_frame(frame):
# do something with the frame
pass
if __name__ == '__main__':
parser = y4m.Reader(process_frame, verbose=True)
# simulate chunk of data
infd = sys.stdin
if sys.hexversion >= 0x03000000: # Python >= 3
infd = sys.stdin.buffer
with infd as f:
while True:
data = f.read(1024)
if not data:
break
parser.decode(data)
```
tested with python-2.7, python-3.3 and python3.4
```python
import sys
import y4m
def process_frame(frame):
# do something with the frame
pass
if __name__ == '__main__':
parser = y4m.Reader(process_frame, verbose=True)
# simulate chunk of data
infd = sys.stdin
if sys.hexversion >= 0x03000000: # Python >= 3
infd = sys.stdin.buffer
with infd as f:
while True:
data = f.read(1024)
if not data:
break
parser.decode(data)
```
Metadata
Release files for y4m 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| y4m-1.1.1.tar.gz | 2.4 kB | Details |
Release files / y4m-1.1.1.tar.gz
| Download URL | y4m-1.1.1.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dfc2dc5059bf459fd259a481683ad33ed2b85fc2f32c3764f859dfc7c77d1854
|
|
BLAKE2b-256 checksum How to use checksums |
4e5d76bc09a47ece079ec015fd47e8e34e41989bf0b461750896045d0ba3766f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |