xpra icon
Bug tracker and wiki

Opened 6 years ago

Closed 6 years ago

#629 closed defect (fixed)

x265 encoder error in server log

Reported by: Szunti Owned by: Szunti
Priority: minor Milestone: 0.14
Component: server Version: 0.13.x
Keywords: Cc:

Description

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",),
    }

Change History (3)

comment:1 Changed 6 years ago by Antoine Martin

Owner: changed from Antoine Martin to Szunti

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

Does r7190 fix things?

comment:2 Changed 6 years ago by Szunti

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

comment:3 Changed 6 years ago by Antoine Martin

Resolution: fixed
Status: newclosed

Thanks!

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

Note: See TracTickets for help on using tickets.