[FFmpeg-user] got black screen when recording on Ubuntu Server 14.04 LTS EC2 instance

Moritz Barsnick barsnick at gmx.net
Mon Oct 26 20:16:55 CET 2015


Hi Radoslav,

On Mon, Oct 26, 2015 at 00:57:39 +0100, Radoslav HorĂ¡k wrote:
> when I record via ffmpeg, I got blank screen
> would you please advice?

Are you sure it's really black? Which video player are you using to
check the video? You may have missed this very important warning:

> No pixel format specified, yuv444p for H.264 encoding chosen.
> Use -pix_fmt yuv420p for compatibility with outdated media players.

Apply that, and it may suddenly work for you. :)


Furthermore, some of your command line arguments are incorrect. Please
read this section:
https://ffmpeg.org/ffmpeg-devices.html#x11grab

> ubuntu at ip-172-31-17-224:~$ ffmpeg  -y  -s 1920x1080 -f x11grab -i :10.0 -f alsa -i default -r 5 out.mkv

You are effectively grabbing at 29.97 fps and VGA (640x480) resolution,
then reducing that rate to 5 fps and blowing the screen up to
1920x1080. That was certainly not intended.

>     Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 640x480, 29.97 fps, 29.97 tbr, 1000k tbn, 29.97 tbc

Use "-video_size" instead of "-s", and "-framerate" instead or "-r".
Both as input options, before "-i".

Moritz


More information about the ffmpeg-user mailing list