[FFmpeg-devel] [PATCH 1/2] avdevice/decklink_dec: mark the field flag if framerate > 30FPS
lance.lmwang at gmail.com
lance.lmwang at gmail.com
Thu Jul 30 04:39:00 EEST 2020
On Wed, Jul 29, 2020 at 10:16:33PM +0200, Marton Balint wrote:
>
>
> > > > > > > > > if you tested with SDI with TC.
> > > > > > > > > 00:00:00:24
> > > > > > > > > 00:00:00:24
> > > > > > > > > 00:00:00:00
> > > > > > > > > 00:00:00:00
>
> I did tests, and depending on which timecode you select, and the timecode
> formats which are available in the SDI signal, this really can be the case,
> so you were right that the decklink API usually does not provide the proper
> timecode as string, only the value of "raw" timecodes in the signal,
> regardless of used frame rate.
>
> I could not test, but assume that if a high frame rate timecode is detected
> then valid string timecode is returned. Otherwise max 30fps timecode.
>
> > > > > I have tested with bmdTimecodeFieldMark
> > > > > flag, it's not set as expected for testing. I have no clue how to get
> > > > > the flag as the API provide the TC string is same for the frame pair.
> > > > > Maybe I miss something.
>
> SMPTE ST 12-2 has a good overview of the used signalling in section 7.
> Basically for 50/60 fps different timecode types (VITC1, VITC2) are used for
> different parity frames.
>
> We have to be smart here to generate proper timecode, because the decklink
> API does not tell you which timecode it had found for an rp188any query... I
> suggest the following:
>
> - If the user selects high frame rate timecode (not available as an
> option at the moment, but can be added), then use that directly.
> - If the user selects rp188any then
> - Query high frame rate timecode, if exists use that directly.
> - Otherwise
> - for <= 30fps query rp188any and use that directly
> - for > 30fps
> - query VITC1, if exists use that with frame doubling and field flag
> checking
> - otherwise query VITC2, if exists use that with frame doubling
> and field flag checking
> - otherwise query LTC, if exists use that with frame doubling and
> field flag checking
> - note that this special ordering of querying the timecode types
> is slightly different from what the decklink API does and it
> should be mentioned in the docs.
> - Otherwise
> - for <= 30fps query the selected timecode and use that directly
> - for > 30fps query the selected timecode and use that with frame
> doubling and field flag checking
The suggestion is very clear, I lacks the different TC test signal so I can't
try to implement and test it yet.
>
> Also probably it is better to use IDeckLinkTimecode->GetComponents() and use
> av_timecode_get_smpte() instead of using the string value.
Yes, the TC format is rp188any when I test, I recall I have try to get by GetComponents,
the result is consistent with string() before, I'll try to retest again if I
test signal is avaiable.
>
> Regards,
> Marton
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
--
Thanks,
Limin Wang
More information about the ffmpeg-devel
mailing list