Opened 3 years ago

Last modified 3 years ago

#8600 reopened defect

Capture xserver desktop fails

Reported by: Ameera865 Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

ameer@localhost:~$ ffmpeg -video_size 720x1280 -framerate 25 -f x11grab -i :0.0 output.mp4
ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers

built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/i386-linux-gnu --incdir=/usr/include/i386-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --disable-i686
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100

[x11grab @ 0x80a6560] XFixes not available, cannot draw the mouse.
Input #0, x11grab, from ':0.0':

Duration: N/A, bitrate: N/A

Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 720x1280, 25 fps, 25 tbr, 1000k tbn, 25 tbc

File 'output.mp4' already exists. Overwrite ? [y/N] y
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x80add40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x80add40] profile High 4:4:4 Predictive, level 3.1, 4:4:4 8-bit
[libx264 @ 0x80add40] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':

Metadata:

encoder : Lavf56.40.101
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 720x1280, q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:

encoder : Lavc56.60.100 libx264

Stream mapping:

Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))

Could not write header for output file #0 (incorrect codec parameters ?): Immediate exit requested
Exiting normally, received signal 2.
ameer@localhost:~$

Change History (20)

comment:1 by Carl Eugen Hoyos, 3 years ago

Resolution: invalid
Status: newclosed

Please test current FFmpeg git head, the only version supported here.

comment:2 by Ameera865, 3 years ago

ameer@localhost:~$ apt upgrade ffmpeg
Reading package lists... Done
Building dependency tree
Reading state information... Done
ffmpeg is already the newest version (7:2.8.15-0ubuntu0.16.04.1).
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

comment:3 by llogan, 3 years ago

Your version is 4+ years old.

Always get a recent version from the git master branch before reporting a bug. It's easy. On Ubuntu can download it or compile:
https://www.johnvansickle.com/ffmpeg/
https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

comment:4 by Ameera865, 3 years ago

Here we are
[code]
ameer@localhost:~$ ffmpeg -video_size 720x1280 -framerate 25 -f x11grab -i 127.0.0.1:0.0 output.mp4
ffmpeg version N-52056-ge5d25d1147-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2020 the FFmpeg developers

built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libfribidi --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg
libavutil 56. 42.101 / 56. 42.101
libavcodec 58. 76.100 / 58. 76.100
libavformat 58. 42.100 / 58. 42.100
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 77.100 / 7. 77.100
libswscale 5. 6.101 / 5. 6.101
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100

[x11grab @ 0xba25900] XFixes not available, cannot draw the mouse.
Input #0, x11grab, from '127.0.0.1:0.0':

Duration: N/A, bitrate: 737280 kb/s

Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 720x1280, 737280 kb/s, 25 fps, 1000k tbr, 1000k tbn, 1000k tbc

File 'output.mp4' already exists. Overwrite? [y/N] y
Stream mapping:

Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))

Press [q] to stop, ? for help
Finishing stream 0:0 without any data written to it.
[libx264 @ 0xba2e740] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0xba2e740] profile High 4:4:4 Predictive, level 3.1, 4:4:4, 8-bit
[libx264 @ 0xba2e740] 264 - core 159 r2991 1771b55 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':

Metadata:

encoder : Lavf58.42.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p, 720x1280, q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:

encoder : Lavc58.76.100 libx264

Side data:

cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A

frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Exiting normally, received signal 2.
ameer@localhost:~$
code
Well I guess I just need to get rid of this then it'll work

[x11grab @ 0xba25900] XFixes not available, cannot draw the mouse.

Last edited 3 years ago by Ameera865 (previous) (diff)

comment:5 by Ameera865, 3 years ago

Do I need to open another ticket?

comment:6 by Carl Eugen Hoyos, 3 years ago

Why did you test another command line (that doesn't work here and that I don't know is supposed to work)?

comment:7 by Ameera865, 3 years ago

Just tell me how to get rid of xfixes because I Have to enter ctrl+c to get rid of it so I guess that's the problem

comment:8 by Carl Eugen Hoyos, 3 years ago

See ffmpeg -h demuxer=x11grab: -draw_mouse 0

comment:9 by Ameera865, 3 years ago

Resolution: invalid
Status: closedreopened

Now the xfixes error gone but I still need to enter ctrl+c to continue

ameer@localhost:~$ ffmpeg -draw_mouse 0 -video_size 720x1280 -framerate 25 -f x11grab -i 127.0.0.1:0.0 output.mp4
ffmpeg version N-52056-ge5d25d1147-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2020 the FFmpeg developers

built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libfribidi --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg
libavutil 56. 42.101 / 56. 42.101
libavcodec 58. 76.100 / 58. 76.100
libavformat 58. 42.100 / 58. 42.100
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 77.100 / 7. 77.100
libswscale 5. 6.101 / 5. 6.101
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100

Freezing at this point

comment:10 by Ameera865, 3 years ago

https://cdn.discordapp.com/attachments/512378007198105602/696049763367518270/Screenshot_2020-04-04-20-24-47.png

comment:11 by Carl Eugen Hoyos, 3 years ago

Sorry but this is completely unacceptable.

comment:12 by Ameera865, 3 years ago

What do you mean ? I wrote an invalid syntax?

comment:13 by Carl Eugen Hoyos, 3 years ago

Posting screenshots is not welcome, the question is now: What kind of device is this, why do you think it has support for xcb?

comment:14 by Ameera865, 3 years ago

what's xcb?

in reply to:  13 comment:15 by Balling, 3 years ago

Replying to cehoyos:

Posting screenshots is not welcome, the question is now: What kind of device is this, why do you think it has support for xcb?

It is a ssh app. I suppose, so we are not talking about android ffmpeg here ;)

comment:16 by Carl Eugen Hoyos, 3 years ago

But you typically cannot record a screen (which one?) over ssh, can you?

comment:17 by Ameera865, 3 years ago

Yeah of course I can unless there's problem with static ffmpeg there is screenshot of the desktop I want to record
https://cdn.discordapp.com/attachments/434712505189793793/696144276488192297/Screenshot_2020-04-05-02-48-39.png
this is xfce4 launched by termux

comment:18 by Balling, 3 years ago

this is xfce4 launched by termux

What? OMG. It will most certainly not work. Crazy ;)

I also use Linux on dex, very cool thing, real linux with root inside non-root android, hehe.

comment:19 by Ameera865, 3 years ago

It gonna work

comment:20 by Ameera865, 3 years ago

The point of ffmpeg is capture images from the xserver then make them into a video what won't work?

Note: See TracTickets for help on using tickets.