Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6709 Discussions

Only NONE_PICTURE is returned with GetFrame() call?

9ine
Beginner
209 Views


I'm using that code to grabfirst 5 secondsfrom the video file:

pSplitter->Run();
do {
while ((sts = pSplitter->GetNextData(&in, videoTrack)) == UMC::UMC_ERR_NOT_ENOUGH_DATA)vm_time_sleep(5);
if (sts != UMC::UMC_OK) {
vm_string_printf(VM_STRING("failed to get next data from splitter %d\\n"), sts);
exit(1);
}

if (in.GetTime() > 5.0)
quit = TRUE;

vm_string_printf(VM_STRING(" %lf second %s frame"), in.GetTime(), GetFrameTypeString(in.GetFrameType()));

sts = pVideoRender->LockInputBuffer(&out);
sts = pVideoDecoder->GetFrame(&in, &out);
vm_string_printf(VM_STRING(" sts=%d\\n"), sts);
if (sts == UMC::UMC_OK) {
// useout.GetDataPointer() andout.GetDataSize() to save image
}

sts = pVideoRender->UnLockInputBuffer(&out);
} while (quit == FALSE);


However the output gives only NON_PICTURE types and every buffer returned is the first image in the video file only:

data size: 7846115 bytes
stream type: MP4ATOM
stream duration: 189.322 seconds
audio track 0: AAC AAC_MP4 2 channels 11025Hz 32000bps 16bits 189.381950 seconds
video track 1: MPEG4V MPEG4 720x480 YV12 4096bps 23.976fps 189.356 seconds
Video Render : NULL
-RenderFormat: RGB24

0.000000 second I_PICTURE frame sts=-996
0.041708 second NONE_PICTURE frame sts=0
0.083417 second NONE_PICTURE frame sts=0
0.125125 second NONE_PICTURE frame sts=0
0.166834 second NONE_PICTURE frame sts=0
0.208542 second NONE_PICTURE frame sts=0
0.250250 second NONE_PICTURE frame sts=0

...

1.000000 second I_PICTURE frame sts=0
1.041708 second NONE_PICTURE frame sts=0
1.083417 second NONE_PICTURE frame sts=0
1.125125 second NONE_PICTURE frame sts=0
1.166834 second NONE_PICTURE frame sts=0
1.208542 second NONE_PICTURE frame sts=0
1.250250 second NONE_PICTURE frame sts=0

Also started from about 0.2 second capture speed drops significantly to about 0.5 sec to extract one frame.
What is the probelm?

0 Kudos
1 Reply
9ine
Beginner
209 Views
Another HD video gives that output:

data size: 253231104 bytes
stream type: MPEGx
stream duration: 96.5286 seconds
video track 0: H264 H264 1920x1080 YUV420 0bps 29.97fps 96.5286 seconds
audio track 1: AC3 AC3 2 channels 48000Hz 384000bps 16bits 96.528600 seconds
Video Render : NULL
-RenderFormat: RGB24
0.444433 second I_PICTURE frame sts=-996
-1.000000 second P_PICTURE frame sts=-996
0.377700 second B_PICTURE frame sts=-996
-1.000000 second B_PICTURE frame sts=-996
0.411067 second B_PICTURE frame sts=-996
-1.000000 second B_PICTURE frame sts=-996
0.544533 second P_PICTURE frame sts=-996
-1.000000 second P_PICTURE frame sts=-996
0.477800 second B_PICTURE frame sts=-996
-1.000000 second B_PICTURE frame sts=0
0.511167 second B_PICTURE frame sts=0
-1.000000 second B_PICTURE frame sts=0
0.644633 second P_PICTURE frame sts=-996
-1.000000 second P_PICTURE frame sts=-996
0.577900 second B_PICTURE frame sts=-996
-1.000000 second B_PICTURE frame sts=-996
0.611267 second B_PICTURE frame sts=0
-1.000000 second B_PICTURE frame sts=0
0.744733 second P_PICTURE frame sts=0
-1.000000 second P_PICTURE frame sts=0
0.678000 second B_PICTURE frame sts=-996
-1.000000 second B_PICTURE frame sts=-996
0.711367 second B_PICTURE frame sts=-996
-1.000000 second B_PICTURE frame sts=-996
0.844833 second P_PICTURE frame sts=0
-1.000000 second P_PICTURE frame sts=0
0.778100 second B_PICTURE frame sts=0
-1.000000 second B_PICTURE frame sts=0
0.811467 second B_PICTURE frame sts=0
-1.000000 second B_PICTURE frame sts=-996
0.944933 second I_PICTURE frame sts=-996
-1.000000 second P_PICTURE frame sts=-996
0.878200 second B_PICTURE frame sts=-996
-1.000000 second B_PICTURE frame sts=0
0.911567 second B_PICTURE frame sts=0
-1.000000 second B_PICTURE frame sts=0
1.045033 second P_PICTURE frame sts=-996
-1.000000 second P_PICTURE frame sts=-996
0.978300 second B_PICTURE frame sts=-996
-1.000000 second B_PICTURE frame sts=-996
1.011667 second B_PICTURE frame sts=0
-1.000000 second B_PICTURE frame sts=0

0 Kudos
Reply