Post Camera stream to flask API

Hello Team,

We are building a flutter app which is used to post camera planes stream to flask based API.

We tried in the below ways. But, unfortunately, we unable to use the valid stream at the API (server) end.

Read camera planes(single plane as well concatenated all the planes) and converted into base64 and posting it into the API. We can able to receive the encoded stream. The problem is when we decoded the stream, we are saving it into a .jpeg file. The file is corrupted while opening. Tried in another way, which converts the decoded base64 into an array using cv2.imdecode. But, all the side it is not working properly

FYI - we read (thru python script) an existing .jpeg file and converted into base64 and posted into the same API. We can able to decode into array(cv2.imdecode) with NO issues and even we can do further manipulation.

We are not sure, how do post from flutter

Could you please help us, how do we send from flutter to flask API in order to use it for further process.

Note - we are struggling with this since 3 weeks.

please help us to resolve it


  • Amixo