Screen Capture Application

For the developers that use FFmpeg in their software.
Post Reply
FennecFix
Posts: 1
Joined: Wed Feb 28, 2018 8:30 am

Screen Capture Application

Post by FennecFix » Wed Feb 28, 2018 8:57 am

I'm looking for the way to build screen capturing application, and I hardly can google any tutorial about that topic. So, my first question is - can I even build screen capturing application with FFMPEG?

For now I'm using DirectX to grab a framebuffer. So my second question is - if I can capture screen with FFMPEG, can I do it in crossplatform way?

I'm trying to write file with FFMPEG. Written file by itself seems to be fine and playable, but there's a bunch of warning messages during writing process, like

Code: Select all

[mpeg @ 03181c80] buffer underflow st=0 bufi=329180 size=333211
[mpeg @ 03181c80] buffer underflow st=0 bufi=331221 size=333211
[mpeg1video @ 0adb3680] AVFrame.width or height is not set
[mpeg @ 03181c80] packet too large, ignoring buffer limits to mux it
And I hardly can tell how do I fix them.

There's also a bunch of very confusing messages, such as

Code: Select all

Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
and when I remove that value from codec context and put in in the stream, avcodec_open2(codecContext, codec, NULL) returns an error.

Code: Select all

Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Trying to fix that warning leads me to the same result.

And finally there's a message

Code: Select all

VBV buffer size not set, using default size of 130KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
which I have no idea how to deal with.

Any helpwould be greatly appreciated.

Post Reply