-
Notifications
You must be signed in to change notification settings - Fork 417
Closed
Description
Overview
Encoding to GIF does not work, as I get an error about yuv420p not being supported for that format. However, PyAV seems to ignore any attempt I make to overwrite the pixel format of the stream.
Expected behavior
I should be able to save a GIF
Actual behavior
I get an error
Traceback:
[0] for packet in writer.out_stream.encode(out_frame):
[0] File "av\stream.pyx", line 153, in av.stream.Stream.encode
[0] File "av\codec\context.pyx", line 482, in av.codec.context.CodecContext.encode
[0] File "av\codec\context.pyx", line 291, in av.codec.context.CodecContext.open
[0] File "av\error.pyx", line 336, in av.error.err_check
[0] av.error.ValueError: [Errno 22] Invalid argument; last error log: [gif] Specified pixel format yuv420p is invalid or not supported
Investigation
I tried several different ways I hoped would be able to override the pixel format, mainly setting stream.pix_fmt = "gif", assuming that would work based on the numpy example. I also tried setting the attribute elsewhere and in the stream options, to no avail.
Research
I have done the following:
- Checked the PyAV documentation
- Searched on Google
- Searched on Stack Overflow
- Looked through old GitHub issues
[ ] Asked on PyAV Gitter<- this doesn't even work anymore[ ] ... and waited 72 hours for a response.
Additional context
Apologies if I've gotten something wrong here. It just seems like the output format does not get overwritten by anything I enter there.
Metadata
Metadata
Assignees
Labels
No labels