[mythtv] Re: [mythtv-commits] Ticket #758: In "disk usage" / "typical recording profile", using machine's average instead of fixed value

aaron memoryguy at gmail.com
Mon Dec 5 16:26:10 UTC 2005


On 05/12/05, MythTV <mythtv at cvs.mythtv.org> wrote:
>  This patch computes the (time-weighted) average of the stored recordings
>  and uses that bitrate, giving a better estimate of the number of hours of
>  disk space left.
>

Can the calculation not be pushed down to the database? Makes for a
smaller resultset. This is the query I use in my own script:

SELECT sum(filesize) AS totbytes,
                    sum( ((unix_timestamp(endtime)
                          - unix_timestamp(starttime))/3600) ) AS totlen
FROM recorded

And you might even be able to push the rest of the calculation down as
well, so that you get back the bitrate itself.

--
aaron

"Oh oh oh. I'm incoherent with excitement. Please tell me what fascinating
bit of badger-spewtumly inconsequential trivia you will assail me with next."
        -- Arthur Dent


More information about the mythtv-dev mailing list