You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, currently I am pretty busy so I don't have time to add this. And also I don't really have a example in with which I could test this. But I do not object to adding this. If you want to try and add this it should not be to hard. That being said the c interface to ffmpeg is not documented very well. So if you want to take a crack at this I would suggest you look for some ffmpeg audio encoding examples on Github and going from there.
Hm I am also not an expert on audio and video encoding. Doing a quick search gave me this example on how to encode audio with avcodec. So my guess on how to best approch this would be to add an audio_context to the QVideoWriter class. Initialization of this context should be similar to the example, but you might need to a different codec depending in what format your audio data is stored in the QByteArray. The encode function in the example basically is the same as the one I am using, so you don't need to add one for audio. I think adding an addAudioFrame(QByteArray &soundData) function that calls the encoding function with the audio context instead of the video context and which does not increment the frame_cnt variable might just do the trick.
example:
addFrame(QImage &img,QByteArray &soundData) or ...
The text was updated successfully, but these errors were encountered: