Hi Bertrand,
Thanks for your reply! I have version 2.1 Beta running here from Jan
12th. I couldn't find a newer one than this, but if there is one,
could you tell me where I can get it? I checked the value of the
YUV420P constant in the pixel format class and it is 0. It might be
the problem that this corresponds to False in some statement somewhere
later in the program, causing the crash when you choose it?
I think your suggestion of return the Y and UV planes as a list of
arrays is the one that works with the Overlay.display() function of
pygame. The non-formatted image buffer could also work, as I could
transform it to the specified (y,u,v) tuple that the display()
function requires, but then you'd still have to figure out how to
construct these separate y, u and v arrays, if they have different
lengths. I will try to look into it when I can. You've done a great
job with this project!
Best regards,
Daniel
On 13 mrt, 04:21, Bertrand Nouvel <
bertrand.nou...@gmail.com> wrote:
> Dear Daniel,
>
> First of all be sure to have the pyffmpeg 2.1. Since some pixel-formats ids
> where invalid in the previous release.
>
> Also regarding YUV420p as the size of Y plane and the of UV planes are
> different, if we want to separate the planes
> they must be returned as a list of arrays in python, also this requires some
> specific code that has not be written right now.
> Another option is to give a one dimensional array that contains the data of
> the image buffer but not formated
> (i.e. as one dimensional array), it less convenient if you need to do some
> processing,
> but in your case it would be the fastest, and it would provide a convenient
> way for all the formats with plane of different
> size. This should be quite easy to patch the source that for, and I believed
> I used to have this already working in a previous release.
> I'll try to give it a look soon. Feel free to have a look at the
> instantiation of the videobuffers in the initialization of the videotrack,
> and at the decoding procedure of the videoframes if you want it more
> rapidly.
>
> Best regards,
>
> Bertrand
>
> 2011/3/13 Daniel <
dschr...@gmail.com>