Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FFmpeg avformat_open_input with memory located file

I want to decode an internet-audiostream, but I don't want to write the data to disk, so the data is located in the memory only.

But when I want to decode data to raw-data, I must initialise the format-context and so I need to use avformat_open_input. But these function needs a detailed location of the file.

Have anyone a solution, how I can get my memory located data into the format-context to decode this data to a raw data?

like image 407
user2492388 Avatar asked Oct 02 '22 03:10

user2492388


1 Answers

You must create custom AVIOContext.

For details, see my answer to Play a Video from MemoryStream, Using FFMpeg

like image 93
pogorskiy Avatar answered Oct 11 '22 15:10

pogorskiy