Mytharchive.

For discussion of topics specific to MythTV on linux
Post Reply
User avatar
Steve Goodey
Moderator
Posts: 248
Joined: Fri Feb 07, 2014 6:30 pm
Location: Colchester, England
Great Britain

Mytharchive.

Post by Steve Goodey »

Hello,

I noticed a fixes/35 commit dated the 1st March this year for mytharchive, Commit 70cb82b.

I was under the impression that mytharchive was no longer maintained?

Since a new install of Ubuntu 24.04/Mythbuntu V35 with a restored database I have been unable get mytharchive to work, creating a DVD or ISO. mythburn.log shows "AttributeError: 'ImageDraw' object has no attribute 'textsize'" this is because 'textsize is deprecated. :cry:

Previous versions of MythTV/mytharchive I have been able to get working by finding fixes on forum searches and poke and hope.

Does anyone archive recordings creating DVD/ISO using mytharchive or some other tools external to MythTV?

Thanks.
Last edited by Steve Goodey on Thu Apr 17, 2025 9:52 pm, edited 2 times in total.
Reason: Corrected Ubuntu version.
Don't forget the Wiki.
User avatar
pgbennett
Developer
Posts: 573
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Mytharchive.

Post by pgbennett »

I use ffmpeg to encode in the correct format, devedeng to create the DVD image, xfburn or k3b to burn the disk.
white_haired_uncle
Senior
Posts: 554
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: Mytharchive.

Post by white_haired_uncle »

Pretty sure last time I burned a DVD I just used k3b to create the image and burn.

Or maybe it was nuvexport.

Oh, and handbrake to transcode. You can use a GUI to set up all your options and maybe transcode a recording or two, or use the CLI with those settings if you're doing a batch. And it'll use more than one core for a single transcode (I use taskset to restrict it because it'll use all available cores) - I don't know how to do that with ffmpeg.
User avatar
dnalorernst
Developer
Posts: 128
Joined: Mon Feb 17, 2020 8:03 pm
Austria

Re: Mytharchive.

Post by dnalorernst »

Steve,
the fix in `mythburn.py` could be easy.
See line 1039 of https://github.com/MythTV/mythtv/blob/4 ... n.py#L1039
Replace

Code: Select all

             if drawer.textsize(' '.join(thistext),font.getFont())[0] > containerWidth:
with

Code: Select all

             if drawer.textlength(' '.join(thistext),font.getFont()) > containerWidth:
Take care on the indentation and insert spaces correctly.
Could you please check this ?
Thank you,
Roland
P.S: This error only pops up in python pillow > 10.0, which is in Ubuntu Noble (24.04).
Are you really observing this on Ubuntu 22.04 as stated above?
User avatar
Steve Goodey
Moderator
Posts: 248
Joined: Fri Feb 07, 2014 6:30 pm
Location: Colchester, England
Great Britain

Re: Mytharchive.

Post by Steve Goodey »

Are you really observing this on Ubuntu 22.04 as stated above?
Well spotted, I meant 24.04. I've now corrected that post.

I'll give your suggestion a try tomorrow, thanks very much.
Don't forget the Wiki.
User avatar
Steve Goodey
Moderator
Posts: 248
Joined: Fri Feb 07, 2014 6:30 pm
Location: Colchester, England
Great Britain

Re: Mytharchive.

Post by Steve Goodey »

Thanks Roland
if drawer.textlength(' '.join(thistext),font.getFont()) > containerWidth:
fixed it... until the next error :roll:
File "/usr/share/mythtv/mytharchive/scripts/mythburn.py", line 283, in drawText
textwidth, textheight = self.font.getsize(text)
^^^^^^^^^^^^^^^^^
AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
Doing a search in mythburn.py shows a load of 'getsize' used and, sure enough, 'getsize' has also been deprecated.

So that's a lot of work for me who's not a coder :(

It seems a workaround is
pip uninstall pillow
pip install Pillow==9.5.0
I haven't tried this. Thanks very much for your suggested fix. Time to move on.
Don't forget the Wiki.
User avatar
dnalorernst
Developer
Posts: 128
Joined: Mon Feb 17, 2020 8:03 pm
Austria

Re: Mytharchive.

Post by dnalorernst »

Steve,
thank you very much for your effort in analysing that bug.
I created an issue on github https://github.com/MythTV/mythtv/issues/1072
for further steps.
Roland
Post Reply