ffmpeg-cpp
ffmpeg-cpp copied to clipboard
OpenCV and RTMP
Hi, ffmpeg for cpp is quite challenging so thanks. I was wondering if this could be used as well using openCV Mat as input, and RTMP output
You're going to have to create your own video source class to convert the OpenCV mat to a format that ffmpeg understands (see https://github.com/Raveler/ffmpeg-cpp/blob/master/source/ffmpeg-cpp/ffmpeg-cpp/Sources/RawVideoDataSource.cpp for an example). I don't know about RTMP - does ffmpeg support this?
@TimTreurniet I think this repo does exactly what you are looking for
@juniorxsound This is what I have been using so far. However I do not believe it supports audio streams, which is something I need since my project requires youtube streaming. Somehow adding an empty audio stream would be fine which I'm currently doing using a ffmpeg session in command line. This adds an unnecessary step with encoding and decoding. I find ffmpeg in cpp a difficult subject to get into...
I have added support for audio streams in the latest version of ffmpeg-cpp.