[mythtv-users] Converting frames to time
Brian Wood
beww at beww.org
Mon May 8 23:46:25 EDT 2006
On May 8, 2006, at 9:07 PM, Robert Johnston wrote:
> On 5/8/06, Andrew Robinson <awrobinson-ml at nc.rr.com> wrote:
>> My goal here is to create a chapter list for dvdauthor from the frame
>> markers from Myth's commercial flagging. Chris Pinkham was kind
>> enough
>> to provide me with this query for getting frame markers:
>>
>> select mark, type
>> from recordedmarkup
>> where chanid = CHANID
>> and starttime = STARTTIME
>> and type in (4,5)
>> order by mark;
>>
>> This returns the frame numbers. Is there a straightforward way to
>> convert the frame numbers to elapsed time? I've been poking around
>> the
>> mythconverg database, but I haven't found anything yet.
>
> Quick Pseudo-code
>
> IF Picturebase="NTSC" THEN
> Time_In_Seconds = Frames/30
> ELSE IF Picturebase="PAL" THEN
> Time_In_Seconds = Frames/25
> ELSE
> // Unknown
> END IF
Close enough for government work. NTSC is actually Time_In_Seconds =
Frames/29.970 :-) It would be 30 if color burst of 3.57945 was 3.6Mhz.
But timecode assumes 30/sec., so you have to run "dropframe" T/C to
track real time.
Can make a difference when editing.
Not to nitpick or anything :-)))
More information about the mythtv-users
mailing list