- Posts: 6
- Joined: Tue Jun 02, 2015 3:55 pm
I am using the SDK to capture VANC data. The source is 1080i 59.94 and I am using the DeckLink Mini Recorder.
What I discovered is a large number of missing/dropped frames as evidenced by skips in the time info (along with missing VANC data that I know to be in there). A relevant code fragment is given at the end. Capturing with bmdModeHD1080i5994 and bmdFormat10BitYUV.
I am running on a dedicated Windows 7 PC. Though not the swiftest, it isn't ancient either (~3 yrs old). CPU is at 11%.
I've also confirmed, by extracting EIA 608 captions from VANC line 9, that there are missing characters whereas the same source dual fed to an SDI monitor shows captions w/o any missing characters.
The output for the test program looks like:
Frame time 78078 (on scale 60000)
Frame time 80080 (on scale 60000)
Frame time 82082 (on scale 60000)
Frame time 84084 (on scale 60000)
Frame time 86086 (on scale 60000)
Frame time 90090 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 92092 (on scale 60000)
Frame time 94094 (on scale 60000)
Frame time 96096 (on scale 60000)
Frame time 100100 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 102102 (on scale 60000)
Frame time 104104 (on scale 60000)
Frame time 106106 (on scale 60000)
Frame time 108108 (on scale 60000)
Frame time 110110 (on scale 60000)
Frame time 114114 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 116116 (on scale 60000)
Frame time 118118 (on scale 60000)
Frame time 120120 (on scale 60000)
Frame time 124124 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 126126 (on scale 60000)
Frame time 128128 (on scale 60000)
Frame time 130130 (on scale 60000)
Frame time 132132 (on scale 60000)
Frame time 134134 (on scale 60000)
Frame time 138138 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 140140 (on scale 60000)
Frame time 142142 (on scale 60000)
Frame time 144144 (on scale 60000)
Frame time 146146 (on scale 60000)
Frame time 148148 (on scale 60000)
Frame time 152152 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 172172 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 20020
Frame time 174174 (on scale 60000)
Frame time 176176 (on scale 60000)
Frame time 178178 (on scale 60000)
Frame time 182182 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 184184 (on scale 60000)
Frame time 186186 (on scale 60000)
Frame time 188188 (on scale 60000)
Frame time 192192 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 194194 (on scale 60000)
Frame time 196196 (on scale 60000)
Frame time 198198 (on scale 60000)
Frame time 200200 (on scale 60000)
Frame time 202202 (on scale 60000)
Frame time 206206 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 208208 (on scale 60000)
Frame time 210210 (on scale 60000)
Relevant code excerpt:
BMDTimeValue lastFrameTime = 0;
....
HRESULT STDMETHODCALLTYPE VideoInputFrameArrived(IDeckLinkVideoInputFrame *videoFrame, IDeckLinkAudioInputPacket *audioPacket) {
if (videoFrame != NULL) {
if (videoFrame->GetFlags() & bmdFrameHasNoInputSource) {
printf("VideoInputFrameArrived: NoInputSource\n");
fflush(stdout);
return S_OK;
}
BMDTimeValue frameTime, frameDuration;
videoFrame->GetStreamTime(&frameTime, &frameDuration, 60000);
printf("Frame time %ld (on scale 60000)\n", frameTime);
if (frameTime > lastFrameTime + 2100) {
printf(" Missing frame\n");
}
lastFrameTime = frameTime;
fflush(stdout);
}
return S_OK;
}
What I discovered is a large number of missing/dropped frames as evidenced by skips in the time info (along with missing VANC data that I know to be in there). A relevant code fragment is given at the end. Capturing with bmdModeHD1080i5994 and bmdFormat10BitYUV.
I am running on a dedicated Windows 7 PC. Though not the swiftest, it isn't ancient either (~3 yrs old). CPU is at 11%.
I've also confirmed, by extracting EIA 608 captions from VANC line 9, that there are missing characters whereas the same source dual fed to an SDI monitor shows captions w/o any missing characters.
The output for the test program looks like:
Frame time 78078 (on scale 60000)
Frame time 80080 (on scale 60000)
Frame time 82082 (on scale 60000)
Frame time 84084 (on scale 60000)
Frame time 86086 (on scale 60000)
Frame time 90090 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 92092 (on scale 60000)
Frame time 94094 (on scale 60000)
Frame time 96096 (on scale 60000)
Frame time 100100 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 102102 (on scale 60000)
Frame time 104104 (on scale 60000)
Frame time 106106 (on scale 60000)
Frame time 108108 (on scale 60000)
Frame time 110110 (on scale 60000)
Frame time 114114 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 116116 (on scale 60000)
Frame time 118118 (on scale 60000)
Frame time 120120 (on scale 60000)
Frame time 124124 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 126126 (on scale 60000)
Frame time 128128 (on scale 60000)
Frame time 130130 (on scale 60000)
Frame time 132132 (on scale 60000)
Frame time 134134 (on scale 60000)
Frame time 138138 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 140140 (on scale 60000)
Frame time 142142 (on scale 60000)
Frame time 144144 (on scale 60000)
Frame time 146146 (on scale 60000)
Frame time 148148 (on scale 60000)
Frame time 152152 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 172172 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 20020
Frame time 174174 (on scale 60000)
Frame time 176176 (on scale 60000)
Frame time 178178 (on scale 60000)
Frame time 182182 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 184184 (on scale 60000)
Frame time 186186 (on scale 60000)
Frame time 188188 (on scale 60000)
Frame time 192192 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 194194 (on scale 60000)
Frame time 196196 (on scale 60000)
Frame time 198198 (on scale 60000)
Frame time 200200 (on scale 60000)
Frame time 202202 (on scale 60000)
Frame time 206206 (on scale 60000)
Missing frame. Time delta is (on scale 60000): 4004
Frame time 208208 (on scale 60000)
Frame time 210210 (on scale 60000)
Relevant code excerpt:
BMDTimeValue lastFrameTime = 0;
....
HRESULT STDMETHODCALLTYPE VideoInputFrameArrived(IDeckLinkVideoInputFrame *videoFrame, IDeckLinkAudioInputPacket *audioPacket) {
if (videoFrame != NULL) {
if (videoFrame->GetFlags() & bmdFrameHasNoInputSource) {
printf("VideoInputFrameArrived: NoInputSource\n");
fflush(stdout);
return S_OK;
}
BMDTimeValue frameTime, frameDuration;
videoFrame->GetStreamTime(&frameTime, &frameDuration, 60000);
printf("Frame time %ld (on scale 60000)\n", frameTime);
if (frameTime > lastFrameTime + 2100) {
printf(" Missing frame\n");
}
lastFrameTime = frameTime;
fflush(stdout);
}
return S_OK;
}