Replies: 3 comments
-
|
Dug into the code, it seems to me somethings off with the way the decoder is created... Take the following example With the output: The exception comes from: |
Beta Was this translation helpful? Give feedback.
-
|
Update: How to proceed, I still would like to decode single frames. |
Beta Was this translation helpful? Give feedback.
-
|
Success. A little bit of context. import av
FILENAME = "quicktime.mov"
# constants for this specific movie
# frame 1 starts at:
offset = 1621
# and has a size of
size = 1772
# the frame has these dimensions
image_height = 120
image_width = 120
f = open(FILENAME, "rb")
f.seek(offset)
data = f.read(size)
codec = av.codec.Codec("rpza", "r").create()
codec.width = image_height
codec.height = image_width
packet = av.Packet(data)
frames = codec.decode(packet)
frames[0].to_image().show()As an idea, create an example for decoding a single frame. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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
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.
Beta Was this translation helpful? Give feedback.
All reactions