How can I change the amount of time into the recordings that the preview image is taken from?
I sometimes record long sports events (~8h) and I find the preview is sometimes taken from hours in, which if I see it ruins half the event!!
I managed to google some stuff about PreviewPixmapOffset, but it seems that setting was deprecated a long time ago in favor of a "smarter" preview time generation algorithm.
A simple maximum time setting would be great. Then I could set it to 10 minutes or so, and then I would know that the preview image won't ruin the match for me.
I think I'm on mythtv28.
How to change time into recording that preview is taken from?
Moderator: Forum Moderators
-
- Newcomer
- Posts: 3
- Joined: Wed Jan 29, 2020 3:36 am
Re: How to change time into recording that preview is taken from?
I don't see a way to change it, but you can generate a new preview like this:
Note, that if the preview has already been created (what you're trying to avoid) the
cache on all frontends needs to be deleted too. For the example above:
If you're seeing previews that are "hours in", then I suspect that you've
bookmarked that location and a new preview was generated at that
spot.
Maybe a User Job would work here. https://www.mythtv.org/wiki/User_Jobs
Code: Select all
mythpreviewgen --seconds 1 --chanid=1111 --starttime=20200621190000
cache on all frontends needs to be deleted too. For the example above:
Code: Select all
rm ~/.mythtv/cache/thumbnails/-home-bill-.mythtv-cache-remotecache-1111_20200621190000.ts.png--418x238.png ~/.mythtv/cache/remotecache/1111_20200621190000.ts.png
bookmarked that location and a new preview was generated at that
spot.
Maybe a User Job would work here. https://www.mythtv.org/wiki/User_Jobs
Re: How to change time into recording that preview is taken from?
Looking at the code in previewgenerator.cpp around line 675
the preview is taken from one third of the total program length. This means that with a six hour recording the preview will be taken after the first two hours. It is not too difficult to put an upper limit of e.g. 10 minutes on this. I do not know the history why the code is how it is but avoiding spoilers sound like a good reason to implement an upper limit. Does anybody have an opinion on this?
Code: Select all
if (programDuration > 0) { captime = startEarly + (programDuration / 3); } if (captime < 0) captime = 600; captime += preroll; LOG(VB_GENERAL, LOG_INFO, QString("Preview at calculated offset (%1 seconds)").arg(captime));
the preview is taken from one third of the total program length. This means that with a six hour recording the preview will be taken after the first two hours. It is not too difficult to put an upper limit of e.g. 10 minutes on this. I do not know the history why the code is how it is but avoiding spoilers sound like a good reason to implement an upper limit. Does anybody have an opinion on this?
Re: How to change time into recording that preview is taken from?
My opinion is I couldn't care less. You could completely do away with it and it wouldn't bother me. Most of the time it's a snapshot of a commercial.
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.
Re: How to change time into recording that preview is taken from?
The preview is now taken from one third of the total program length with a maximum of 10 minutes.A simple maximum time setting would be great. Then I could set it to 10 minutes or so, and then I would know that the preview image won't ruin the match for me.
This is in v31 and in master, so this is a good reason to upgrade to v31.I think I'm on mythtv28.
Enjoy!