Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

imdecode incoming stream

Hello,

I am recieving a stream from rtmpdump of type char*. So, it's an RTMP stream.

I have converted pushed each of the 3518 char items into a std::vector<uchar>

cv::Mat img = cv::imdecode(bufVec,0); cv::Mat img = cv::imdecode(cv::Mat(bufVec),0); cv::Mat img = cv::imdecode(bufVec,1); cv::Mat img = cv::imdecode(cv::Mat(bufVec),1);

All of these attempts yield an empty image.

If i read the uchar array to the console, it has a lot of meta data etc.

This is what i get if i push the data to the console.

C:\fakepath\Untitled.png

Any clues on how to approach this?

imdecode incoming stream

Hello,

I am recieving a stream from rtmpdump of type char*. So, it's an RTMP stream.

I have converted pushed each of the 3518 char items into a std::vector<uchar>

cv::Mat img = cv::imdecode(bufVec,0);
cv::Mat img = cv::imdecode(cv::Mat(bufVec),0);
cv::Mat img = cv::imdecode(bufVec,1);
cv::Mat img = cv::imdecode(cv::Mat(bufVec),1);

cv::imdecode(cv::Mat(bufVec),1);

All of these attempts yield an empty image.

If i read the uchar array to the console, it has a lot of meta data etc.

This is what i get if i push the data to the console.

C:\fakepath\Untitled.png

Any clues on how to approach this?

imdecode incoming stream

Hello,

I am recieving a stream from rtmpdump of type char*. So, it's an RTMP stream.

I have converted pushed each of the 3518 char items into a std::vector<uchar>

cv::Mat img = cv::imdecode(bufVec,0);
cv::Mat img = cv::imdecode(cv::Mat(bufVec),0);
cv::Mat img = cv::imdecode(bufVec,1);
cv::Mat img = cv::imdecode(cv::Mat(bufVec),1);

All of these attempts do not yield an empty image.image. The cv::Mat img has 0 rows and 0 cols. The rtmpdump example code writes this data to a file object.

If i read the uchar array to the console, it has a lot of meta data etc.

This is what i get if i push the data to the console.

C:\fakepath\Untitled.png

Any clues on how to approach this?this? How do i get each frame?

click to hide/show revision 4
retagged

updated 2014-07-07 08:20:49 -0600

berak gravatar image

imdecode incoming stream

Hello,

I am recieving a stream from rtmpdump of type char*. So, it's an RTMP stream.

I have converted pushed each of the 3518 char items into a std::vector<uchar>

cv::Mat img = cv::imdecode(bufVec,0);
cv::Mat img = cv::imdecode(cv::Mat(bufVec),0);
cv::Mat img = cv::imdecode(bufVec,1);
cv::Mat img = cv::imdecode(cv::Mat(bufVec),1);

All of these attempts do not yield an image. The cv::Mat img has 0 rows and 0 cols. The rtmpdump example code writes this data to a file object.

If i read the uchar array to the console, it has a lot of meta data etc.

This is what i get if i push the data to the console.

C:\fakepath\Untitled.png

Any clues on how to approach this? How do i get each frame?