CV_CAP_PROP_FOURCC not returning video codec on some videos
I am using the follwing code to get the fourcc
int ex = videocap.get(CV_CAP_PROP_FOURCC);
char vcodec[] = {(char)(ex & 0XFF) , (char)((ex & 0XFF00) >> 8),(char)((ex & 0XFF0000) >> 16),(char)((ex & 0XFF000000) >> 24), 0};
and on some files I get a blank string, it can't possible decode a file without knowing its codec so I must be doing something wrong. Here is how I'm storing the value and sending it to debug so I can see what's going on
insert_video.bindValue(":vcodec",vcodec);
qDebug() << "video codec: " << insert_video.boundValue(":vcodec").toString();
please help
UPDATE: it seems to be happening for flv files also for some mpg files so this isn't just about flv files