FFmpeg git repo
Go to file
Andriy Gelman 8e0a4d2d4d avdevice/xcbgrab: don't assume xserver endianness
xserver defines the endianness of the grabbed images. Use this information
to set the correct pixel format.

This also fixes format selection in configuration depth=32/bpp=32 with
xserver on a little endian machine. Before the patch, the big endian
layout 0RGB was always selected which is incorrect because BGR0 should
be used. RGB24 was also incorrectly assumed (but this format was removed
in xserver 1.20).

The big-endian settings can be tested using docker+qemu from a little-endian
machine:

$ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
$ docker run --rm -it -v /tmp:/tmp powerpc64/debian /bin/bash

In docker container
$ apt-get update
$ apt-get install xvfb
$ apt-get install x11-apps

To test AV_PIX_FMT_0RGB32
$ Xvfb :2 -screen 0 720x480x24 &
$ export DISPLAY=:2
$ xclock -geometry 720x480 -bg green #test different colors

On your host machine grab the frames using the following
command. View output to check that colors are rendered correctly
$ ./ffmpeg -y -f x11grab -i :2.0 -codec:v mpeg2video out.mp4

Other pixel formats can be tested by modifying how Xvfb is started in the docker
container:

AV_PIX_FMT_RGB565
$ Xvfb :2 -screen 0 720x480x16

AV_PIX_FMT_RGB555
$ Xvfb :2 -screen 0 720x480x15

AV_PIX_FMT_BGR24 / AV_PIX_FMT_RGB24
This is difficult to test because bpp=24 support was removed in xserver 1.20
https://lists.x.org/archives/xorg-devel/2018-February/056175.html?hmsr=joyk.com&utm_source=joyk.com&utm_medium=referral
However, I was able to run previous version of Xvfb (with some
modifications to force 24bpp) to check that images are rendered correctly.

Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2021-02-06 11:42:12 -05:00
compat All: update names in copyright headers 2021-01-20 01:02:56 -06:00
doc avfilter/vf_deblock: add support for commands 2021-02-06 15:26:39 +01:00
ffbuild
fftools ffmpeg: add -fpsmax to clamp output framerate 2021-02-05 22:54:18 +05:30
libavcodec avcodec/xbm_parser: mark frame as intra only and as key frame 2021-02-05 15:49:13 +01:00
libavdevice avdevice/xcbgrab: don't assume xserver endianness 2021-02-06 11:42:12 -05:00
libavfilter avfilter/vf_deblock: add support for commands 2021-02-06 15:26:39 +01:00
libavformat avformat/img2dec: improve xbm probing 2021-02-05 22:37:34 +01:00
libavresample
libavutil libavutil/frame.h: correct typo for AVFilmGrainParams in comment 2021-01-27 13:13:47 +08:00
libpostproc lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bump 2021-01-01 14:14:57 +01:00
libswresample swresample/audioconvert: Fix left shift of negative value 2020-09-30 10:50:45 +02:00
libswscale lsws/ppc/yuv2rgb: Fix transparency converting from yuv->rgb32. 2021-01-24 17:17:29 +01:00
presets
tests avformat/mxf: add platform local tag 2021-02-05 09:27:06 +08:00
tools tools/target_dec_fuzzer: Adjust threshold for interplayacm 2021-02-04 23:34:29 +01:00
.gitattributes
.gitignore
.mailmap
.travis.yml
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
Changelog avformat: add xbm_pipe demuxer 2021-02-05 15:36:19 +01:00
INSTALL.md
LICENSE.md
MAINTAINERS MAINTAINERS: update names 2021-01-20 01:04:26 -06:00
Makefile tools/enum_options: fix build and add to Makefile 2020-11-20 15:20:24 +01:00
README.md
RELEASE
configure avformat/mxf: add platform local tag 2021-02-05 09:27:06 +08:00

README.md

FFmpeg README

FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.

Libraries

  • libavcodec provides implementation of a wider range of codecs.
  • libavformat implements streaming protocols, container formats and basic I/O access.
  • libavutil includes hashers, decompressors and miscellaneous utility functions.
  • libavfilter provides a mean to alter decoded Audio and Video through chain of filters.
  • libavdevice provides an abstraction to access capture and playback devices.
  • libswresample implements audio mixing and resampling routines.
  • libswscale implements color conversion and scaling routines.

Tools

  • ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
  • ffplay is a minimalistic multimedia player.
  • ffprobe is a simple analysis tool to inspect multimedia content.
  • Additional small tools such as aviocat, ismindex and qt-faststart.

Documentation

The offline documentation is available in the doc/ directory.

The online documentation is available in the main website and in the wiki.

Examples

Coding examples are available in the doc/examples directory.

License

FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.

Contributing

Patches should be submitted to the ffmpeg-devel mailing list using git format-patch or git send-email. Github pull requests should be avoided because they are not part of our review process and will be ignored.