Opened 18 months ago

Last modified 11 months ago

#13306 new Bug Report - General

MythArchive fails during DVD Menu creation

Reported by: jpilk Owned by:
Priority: minor Milestone: needs_triage
Component: Plugin - MythArchive Version: Unspecified
Severity: high Keywords:
Cc: Ticket locked: no


Until last year I used MythArchive? regularly. A recent attempt under Fedora 27 failed, but under SL7 at the same MythTV Master commit it succeeded.

DVD menus screens are assembled from images and masks in RGBA format that are combined and saved as jpeg. Since python-pillow release 4.2.0 this causes an 'IOError: cannot write mode RGBA as JPEG'

The release note says:

Before Pillow 4.2.0, attempting to save an RGBA image as JPEG would discard the alpha channel. From Pillow 3.4.0, a deprecation warning was shown. From Pillow 4.2.0, the deprecation warning is removed and an :py:exc:`IOError` is raised

Fedora 27 has python2-pillow-4.3.0-1, SL7 has python-pillow-2.0.0-19-git...

ubuntu 16.04 has python-pil 3.1.2, ubuntu 18.04 has python-pil 5.1.0

My initial post about this, with a log extract, was at

Attachments (1)

mythburn-RGBA-JPEG.patch (4.3 KB) - added by jreiser 11 months ago.
patch to detour through RGB when saving to JPEG

Download all attachments as: .zip

Change History (5)

comment:1 Changed 18 months ago by jpilk

Searches suggest saving RGBA as png. lines 3656 and 3657 from git are

      ,"background-%s-f%06d.png" % (page, framenum)),"PNG",quality=100,optimize=0,dpi=screendpi),"background-%s-f%06d.jpg" % (page, framenum)),"JPEG",quality=99)

so it looks as if something like this has been used or tried before, probably long ago, but I don't see any other comment there and git history didn't show me anything appropriate. Any ideas?

comment:2 Changed 17 months ago by jpilk

DVD creation in fc27 works for me with python2-pillow installed from a rebuild of this fc26 package.

Changed 11 months ago by jreiser

Attachment: mythburn-RGBA-JPEG.patch added

patch to detour through RGB when saving to JPEG

comment:3 Changed 11 months ago by jreiser

Attachment mythburn-RGBA-JPEG.patch works for me on channel 29/fixes. It looks like the identical change will work in channel 30/fixes.

comment:4 Changed 11 months ago by jpilk

I made the changes from this patch in systems running recent master under el7.6 and Fedora 28, and successfully created DVD .iso images on each. MythCenter_Animated theme and a few old local tweaks.

In addition, a change in syntax was needed for psutil-5.4 in Fedora:

p.set_ionice(psutil.IOPRIO_CLASS_IDLE) becomes p.ionice(psutil.IOPRO_CLASS_IDLE)

The old version still works with psutil-2.2 in el7

I had an initial failure caused by an illegal character in place of an apostrophe in a title derived from EIT. I have a feeling that this has been reported before. Workaround with the metadata editor.

Version 0, edited 11 months ago by jpilk (next)
Note: See TracTickets for help on using tickets.