Xpra: Ticket #629: x265 encoder error in server log

In version 0.13.8 server log contains:

init_video_encoders_options() cannot add x265 encoder
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/xpra/codecs/video_helper.py", line 236, in init_video_encoders_options
    self.init_video_encoder_option(mod)
  File "/usr/lib/python2.7/site-packages/xpra/codecs/video_helper.py", line 262, in init_video_encoder_option
    spec = encoder_module.get_spec(encoding, colorspace)
  File "encoder.pyx", line 241, in xpra.codecs.enc_x265.encoder.get_spec (xpra/codecs/enc_x265/encoder.c:1689)
TypeError: list indices must be integers, not str

The problematic line is:

return video_codec_spec(encoding=encoding, output_colorspaces=COLORSPACES[colorspace],
                      codec_class=Encoder, codec_type=get_type(),
                      min_w=64, min_h=64,
                      setup_cost=70, width_mask=0xFFFE, height_mask=0xFFFE)

And indeed, COLORSPACES is a list in this file(enc_x265/encoder.pyx):

COLORSPACES = ["YUV420P", "YUV444P"]

but a dictionary in enc_x264/encoder.pyx:

COLORSPACES = {
    "YUV420P"   : ("YUV420P",),
    "YUV422P"   : ("YUV422P",),
    "YUV444P"   : ("YUV444P",),
    "BGR"       : ("BGR",),
    "BGRA"      : ("BGRA",),
    "BGRX"      : ("BGRX",),
    "RGB"       : ("RGB",),
    }


Fri, 08 Aug 2014 01:22:14 GMT - Antoine Martin: owner changed

Thanks for the report - we don't test x265 much..

Does r7190 fix things?


Fri, 08 Aug 2014 14:32:05 GMT - Szunti:

The error vanished, and I could choose H.265 encoding, although it's not working well. Created a new ticket: #631


Fri, 08 Aug 2014 16:18:11 GMT - Antoine Martin: status changed; resolution set

Thanks!

Backported to v0.13.x in r7205. Closing.


Sat, 23 Jan 2021 05:01:21 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/629