[Libav-user] Best approach for screen & microphone recorder

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Libav-user] Best approach for screen & microphone recorder


Hello everyone,

I’m trying to build an application to capture the desktop and a microphone in real time.

To accomplish that I’m using the ffmpeg-lib and c++.

The problem is that the documentation is very hard to understand for a newbie.


I divided the Program in 3 major parts.

1.       Capture screen

2.       Capture microphone

3.       Muxing them together and write them to the mpeg file.


The first part is more or less working, lets say it’s functional.

·         Capture the packets

·         Decode them

·         Rescale them via swscaling

·         Encode them

·         Write them to a queue


The microphone capture is not working at all.

·         Capture the packets

·         Decode them

·         Resample them via Swresample

·         Encode them

·         Write them to a queue

I think that this is working except from the pts but I don’t know how to test it to be honest.


The muxing is working for only one stream. So it works for audio and video, but not for both of them at the same time.

·         Get the packets from video and audio

·         Write them to file.


The big problems are:

1.       I don’t know if this is the right approach?

2.       Is it possible to write the captured packages directly to the file without resampling and rescaling?



I hope someone can help me, best regards

Libav-user mailing list
[hidden email]

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".