[FFmpeg-user] Issue Overlaying Video from x11grab and video4linux2

Ian Milligan ianmllgn at gmail.com
Tue Dec 3 05:49:59 CET 2013


The issue of dropped frames is more visible if I pass the x11grab stream
through showinfo. Here is what this looks like with no overlay using the
command
~/git/ffmpeg/ffmpeg \
        -f x11grab -video_size 1680x1050 -framerate 30 -i :0.0 \
        -vf showinfo -y \
        test.mkv

http://pastebin.ca/2488878

Notice that the pts values correspond to approximately 30 fps.

Now suppose I run the overlay and insert showinfo before the stream is sent
to overlay using the command
VF="
[0] showinfo [screen];
[1] fifo [webcam];
[screen][webcam] overlay=W-w
"

~/git/ffmpeg/ffmpeg \
        -f x11grab -video_size 1680x1050 -framerate 30 -i :0.0 \
        -f video4linux2 -video_size 320x176 -framerate 30 -ts abs -i
/dev/video0 \
        -filter_complex "$VF" \
        test.mkv

http://pastebin.ca/2488911

Notice that in 11.8 seconds I have only 86 frames! So frames are being
dropped somehow before they even reach the overlay filter.


On Mon, Dec 2, 2013 at 6:13 PM, Ian Milligan <ianmllgn at gmail.com> wrote:

> I forgot to mention that the output also shows many dropped frames.
>
>
> On Mon, Dec 2, 2013 at 4:58 PM, Johnny Klonaris <jawknee at sonic.net> wrote:
>
>> Newbie alert - I'm new to ffmpeg and very new to the list…
>>
>> On Dec 2, 2013, at 4:26 PM, Ian Milligan wrote:
>>
>> > ...
>> > output looks like: http://pastie.org/8524085. However when I try to
>> capture
>> > simultaneously using video4linux2 and overlay the two streams, the
>> encoder
>> > reports getting only about 5 fps. Here is some sample output:
>> > http://pastie.org/8524055.
>>
>> The links above show text that appears to be cut off with no scroll bar
>> and
>> the output largely appeared on one line, but I eventually figured it out.
>>
>> In each of these, the fps output I see I believe is the rate
>> at which frames are being encoded.   In other words - how fast
>> ffmpeg is able do the the encoding as opposed to the ultimate playback
>> rate.
>>
>> Hope that helps.
>>
>> Johnny
>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>
>


More information about the ffmpeg-user mailing list