[FFmpeg-user] Black video when recording from vnc server.

Michel Albert michel at albert.lu
Sun Apr 3 10:26:36 CEST 2016


I just fixed the problem by compiling ffmpeg from source (and thus
upgrading from ffmpeg2 to ffmpeg3).

On Sat, Apr 2, 2016 at 4:46 PM, Michel Albert <michel at albert.lu> wrote:

> Hello everyone :)
>
>
> I wanted to record a screencast via a VNC server. My desktop does not run
> Linux, and I have a headless server running Linux.
>
> In Ubuntu 12.04, I was able to record screencasts using vlc, but since
> upgrading to Ubuntu 15.04 this has become unbearably slow, so I wanted to
> switch to ffmpeg. To be honest, seems like a better solution anyway.
>
> On the server I run a slim fluxbox setup, starting up with "vncserver".
>
> Inspecting xdpyinfo (output attached as xdpyinfo.txt), I see that my
> display is ":1.0"
>
> So following [1], the command I tried to use was:
>
>     ffmpeg -f x11grab -framerate 25 -video_size cif -i :1.0 out.mpg
>
> The output is attached as "output.txt". I also attached the output of
> "ffprobe" on the resulting video file.
>
> I also noticed this on my Laptop (which runs the same Ubuntu version). The
> peculiar thing here is that running it from my Laptop's desktop manually
> works. But when I run a vncserver instance, and try to record *that* one, I
> get a black video.
>
> Adding "show_region" to the command does *not* show a border in the vnc
> instance. But it *does* show the border when running on my main Laptop
> desktop.
>
> Googlin only turned up [2] and [3]. So I am wondering if it is an isolated
> issue with my installation, or if there's something wrong with my ffmpeg
> incantation? Following [3] I tried with an x264 output with yuv420p but I
> still get only black video :(
>
> [1]: https://ffmpeg.org/ffmpeg-devices.html#x11grab
> [2]:
> http://superuser.com/questions/727352/got-black-screen-when-recording-screen-from-xvfb-by-ffmpeg-x11grab-device
> [3]: https://ffmpeg.org/pipermail/ffmpeg-user/2015-October/028962.html
>


More information about the ffmpeg-user mailing list