Skip to main content

YUV4MPEG2 (.y4m) Reader/Writer

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

y4m-1.1.1.tar.gz (2.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page