Opened 2 years ago

Closed 6 months ago

#13306 closed Bug Report - General (fixed)

MythArchive fails during DVD Menu creation

Reported by: jpilk Owned by: Bill Meek
Priority: minor Milestone: 31.0
Component: Plugin - MythArchive Version: Master Head
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 18 months ago.
patch mythburn.py to detour through RGB when saving to JPEG

Download all attachments as: .zip

Change History (7)

comment:1 Changed 2 years 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 2 years 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 18 months ago by jreiser

Attachment: mythburn-RGBA-JPEG.patch added

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

comment:3 Changed 18 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 18 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 18 months ago by jpilk (previous) (diff)

comment:5 Changed 7 months ago by Bill Meek

Milestone: needs_triage31.0
Owner: set to Bill Meek
Status: newaccepted
Version: UnspecifiedMaster Head

comment:6 Changed 6 months ago by Roland Ernst <rcrernst@…>

Resolution: fixed
Status: acceptedclosed

In 20827d1bc/mythtv:

MythArchive?: Python v2/v3 changes.

Solution for 13562 - Transition to python3 breaks MythArchive?
Includes 13306 - MythArchive? fails during DVD Menu creation from: jreiser
Includes 13565 - Fix recorded markup handling in python3 bindings

Plus two of typos in: mytharchivehelper/main.cpp

Closes: #13562
Closes: #13306
Closes: #13565

Signed-off-by: Bill Meek <billmeek@…>

Note: See TracTickets for help on using tickets.