Opened 9 months ago

Last modified 2 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

Description

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

http://lists.mythtv.org/pipermail/mythtv-users/2018-August/396941.html

Attachments (1)

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

Download all attachments as: .zip

Change History (5)

comment:1 Changed 9 months ago by jpilk

Searches suggest saving RGBA as png.

mythburn.py lines 3656 and 3657 from git are

                #bgimage.save(os.path.join(getTempPath(),"background-%s-f%06d.png" % (page, framenum)),"PNG",quality=100,optimize=0,dpi=screendpi)
bgimage.save(os.path.join(getTempPath(),"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 8 months ago by jpilk

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

https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/26/Everything/source/tree/Packages/p/python-pillow-4.1.1-1.fc26.src.rpm

Changed 2 months ago by jreiser

Attachment: mythburn-RGBA-JPEG.patch added

patch mythburn.py to detour through RGB when saving to JPEG

comment:3 Changed 2 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 2 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.IOPRIO_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.

Last edited 2 months ago by jpilk (previous) (diff)
Note: See TracTickets for help on using tickets.