Fedora Linux Support Community & Resources Center
  #1  
Old 9th September 2017, 11:31 AM
blnlx's Avatar
blnlx Offline
Registered User
 
Join Date: Jan 2010
Location: The Netherlands
Age: 45
Posts: 249
linuxfedorafirefox
ffmpeg fails, Cannot open display :0.0, error 1.

The ffmpeg command that I was using a lot before, in the previous Fedora releases, does not work any more.
SOURCE: https://trac.ffmpeg.org/wiki/Capture/Desktop
Code:
ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -i :0.0 -c:v libx264 -qp 0 -preset ultrafast capture.mkv
It fails with the following message:
Code:
Invalid MIT-MAGIC-COOKIE-1 key[x11grab @ 0x5558eb7d5240] Cannot open display :0.0, error 1.
:0.0: Input/output error
What is going on? How to fix this?

Code:
[boris@E7440 ~]$ ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -i :0.0 -c:v libx264 -qp 0 -preset ultrafast capture.mkv
ffmpeg version 3.1.10 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.4.1 (GCC) 20170727 (Red Hat 6.4.1-1)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcdio --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --extra-cflags=-I/usr/include/nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 47.100 /  6. 47.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Invalid MIT-MAGIC-COOKIE-1 key[x11grab @ 0x5558eb7d5240] Cannot open display :0.0, error 1.
:0.0: Input/output error
[boris@E7440 ~]$
__________________
Fedora25.GNOME@Dell_Latitude_E7440
Fedora24.MATE@HP_Compaq_DC7100

Last edited by blnlx; 9th September 2017 at 11:27 PM.
Reply With Quote
  #2  
Old 9th September 2017, 02:53 PM
srakitnican Offline
Registered User
 
Join Date: Oct 2011
Posts: 1,540
linuxchrome
Re: ffmpeg fails, Cannot open display :0.0, error 1.

Log in into "Gnome on Xorg" session, or try some workaround like "xhost +".
Reply With Quote
  #3  
Old 9th September 2017, 03:04 PM
lsatenstein Online
Registered User
 
Join Date: Jun 2005
Location: Montreal, Que, Canada
Posts: 4,284
linuxfedorafirefox
Re: ffmpeg fails, Cannot open display :0.0, error 1.

Fedora supports to versions of GNOME. Wayland and X11.
After choosing or entering your logon name, there is a gear icon that appears
choose gnome-xorg
and continue with your logon.
__________________
Leslie in Montreal

Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840
Reply With Quote
  #4  
Old 9th September 2017, 11:25 PM
blnlx's Avatar
blnlx Offline
Registered User
 
Join Date: Jan 2010
Location: The Netherlands
Age: 45
Posts: 249
linuxfedorafirefox
Re: ffmpeg fails, Cannot open display :0.0, error 1.

I tried both "Gnome on Xorg" and "Gnome Classic", still the same message is displayed.
__________________
Fedora25.GNOME@Dell_Latitude_E7440
Fedora24.MATE@HP_Compaq_DC7100
Reply With Quote
  #5  
Old 10th September 2017, 12:16 AM
srakitnican Offline
Registered User
 
Join Date: Oct 2011
Posts: 1,540
linuxchrome
Re: ffmpeg fails, Cannot open display :0.0, error 1.

Are you actually using the display specified?

Code:
$ echo $DISPLAY
Reply With Quote
  #6  
Old 10th September 2017, 12:16 AM
bob's Avatar
bob Online
Administrator (yeah, back again)
 
Join Date: Jul 2004
Location: Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
Age: 72
Posts: 23,257
linuxfedorafirefox
Re: ffmpeg fails, Cannot open display :0.0, error 1.

Maybe this? https://unix.stackexchange.com/quest...ogram-remotely
or this? https://bbs.archlinux.org/viewtopic.php?id=206743
__________________
Linux & Beer - That TOTALLY Computes!
Registered Linux User #362651


Don't use any of my solutions on working computers or near small children.
Reply With Quote
  #7  
Old 10th September 2017, 11:00 AM
blnlx's Avatar
blnlx Offline
Registered User
 
Join Date: Jan 2010
Location: The Netherlands
Age: 45
Posts: 249
linuxfedorafirefox
Re: ffmpeg fails, Cannot open display :0.0, error 1.

Quote:
Originally Posted by srakitnican View Post
Are you actually using the display specified?

Code:
$ echo $DISPLAY
Thank you, that was really helpful.

Code:
[boris@E7440 ~]$ echo $DISPLAY
:1
[boris@E7440 ~]$
It works now...

Code:
[boris@E7440 ~]$ ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -i :1 -c:v libx264 -qp 0 -preset ultrafast capture.mkv
ffmpeg version 3.1.10 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.4.1 (GCC) 20170727 (Red Hat 6.4.1-1)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcdio --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --extra-cflags=-I/usr/include/nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 47.100 /  6. 47.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
[x11grab @ 0x559882062240] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, x11grab, from ':1':
  Duration: N/A, start: 1505036793.110097, bitrate: N/A
    Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080, 30 fps, 1000k tbr, 1000k tbn, 1000k tbc
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x55988206b720] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x55988206b720] profile High 4:4:4 Predictive, level 4.0, 4:4:4 8-bit
[libx264 @ 0x55988206b720] 264 - core 148 r2708 86b7198 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=0 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=0 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=0
[matroska @ 0x559882069f60] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, matroska, to 'capture.mkv':
  Metadata:
    encoder         : Lavf57.41.100
    Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv444p, 1920x1080, q=-1--1, 30 fps, 1k tbn, 30 tbc
    Metadata:
      encoder         : Lavc57.48.101 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
Past duration 0.653297 too large
frame=  149 fps= 30 q=-1.0 Lsize=    3074kB time=00:00:06.83 bitrate=3685.4kbits/s dup=0 drop=56 speed=1.39x
__________________
Fedora25.GNOME@Dell_Latitude_E7440
Fedora24.MATE@HP_Compaq_DC7100
Reply With Quote
Reply

Tags
display, error, fails, ffmpeg, open

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Capture audio with ffmpeg, /dev/dsp and oss fails logictox Using Fedora 1 11th October 2009 08:11 PM
ssh -X fail with Error: Can't open display: powah Servers & Networking 3 8th January 2009 11:13 PM
"Can't open display" Error when running X applications remotely TsanChung Security and Privacy 1 8th August 2008 01:22 AM
Xdmx cannot open display error nitao Using Fedora 1 4th January 2008 09:54 AM
FC5 - "Cannot open display" error rapsball4 EOL (End Of Life) Versions 2 15th June 2006 02:17 AM


Current GMT-time: 17:46 (Sunday, 24-09-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat