Skip to content

How do I decode cinepak frames #1161

@rvanlaar

Description

@rvanlaar

Overview

From a quicktime movie encoded with cinepak I dumped the data per frame to disk.
With a python script I'm able to convert the cinepak frames to PIL images and save those
Script: https://github.com/rvanlaar/QTVR/blob/master/read_cinepak.py

Expected behavior

In the manner of Parsing https://pyav.org/docs/stable/cookbook/basics.html#parsing
I expect to be able to parse packets to frames.

Actual behavior

import av
fh = open("cinepak/nav_13.cinepak", "rb")
codec = av.CodecContext.create("cinepak", "r")
chunk = fh.read()
packets = codec.parse(chunk)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[5], line 1
----> 1 packets = codec.parse(chunk)

File av/codec/context.pyx:343, in av.codec.context.CodecContext.parse()

ValueError: No parser for cinepak

Investigation

I looked at the source code and couldn't see anything which specifically is different.

Research

I have done the following:

Additional context

I am working on figuring out QTVR 1 fileformat. For that I would like to be able to pass raw frame data to PyAV to use FFMPEG to decode the frames., as to not have to write a decoder for every different encoding I find.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions