成功解决:Could not initialize SDL - No available video device (Did you set the DISPLAY variable?)

简介: 成功解决:Could not initialize SDL - No available video device (Did you set the DISPLAY variable?)

收集了以下方法,都试过,最终播放成功。


修改ffbuild目录下的config.mak

无效。


2、安装依赖库

apt-get install ia32-libs lib32stdc++6

无效。


3、安装依赖库

apt-get install grub-pc-bin

可能无效。


4、安装依赖库

apt-get install libsdl2-dev

因为吾是自己编译SDL,不确定是否有用。

如果没用,还是建议下载编译。具体参考:

https://blog.csdn.net/quantum7/article/details/104173159


5,配置DISPLAY

export DISPLAY=:0

这个不影响出错。配置成其他看不到画面(输出到别的地方了)。


**

有效解决办法(组合):

**

安装依赖库

sudo apt install xorg-dev

sudo apt build-dep xscreensaver totem vlc

sudo apt source xscreensaver totem -b


#is this OK?

#apt -y install xscreensaver totem vlc

重新编译SDL

绝对必要!

以下配置参数并无必要。

./configure --enable-video-x11 --enable-x11-shared --enable-video-x11-vm


配置PATH/LD_LIBRARY_PATH

这个不用多说。


重新运行ffplay

做完以上事情,再运行ffplay。怎么样?终于看到画面了吧。


目录
相关文章
|
7月前
|
Android开发
Can t process attribute android:fillColor=@color/camera_progress_delete: references to other resou
Can t process attribute android:fillColor=@color/camera_progress_delete: references to other resou
48 1
|
TensorFlow 算法框架/工具 Python
成功解决File "frozen importlib._bootstrap", line 219, in _call_with_frames_removed ImportError: DLL lo
成功解决File "frozen importlib._bootstrap", line 219, in _call_with_frames_removed ImportError: DLL lo
成功解决File "frozen importlib._bootstrap", line 219, in _call_with_frames_removed ImportError: DLL lo
YOLO V5出现RuntimeError: result type Float can‘t be cast to the desired output type long int解决方法
YOLO V5出现RuntimeError: result type Float can‘t be cast to the desired output type long int解决方法
723 0
|
Ubuntu C语言
【ubuntu】2.c:(.text+0xd2): undefined reference to `pthread_create‘ collect2: error: ld returned
【ubuntu】2.c:(.text+0xd2): undefined reference to `pthread_create‘ collect2: error: ld returned
148 0
成功解决absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'data_format'
成功解决absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'data_format'
成功解决:Could not initialize SDL - No available video device (Did you set the DISPLAY variable?)
成功解决:Could not initialize SDL - No available video device (Did you set the DISPLAY variable?)
675 0
|
Android开发
libx264.c:function X264_init: error: undefined reference to x264_encoder_open_142
libx264.c:function X264_init: error: undefined reference to x264_encoder_open_142
157 0
error: x264_bit_depth undeclared (first use in this function) did you mean x264_picture_t
error: x264_bit_depth undeclared (first use in this function) did you mean x264_picture_t
167 0
tdav_converter_video.cxx:49:9: error: ‘uint8’ does not name a type; did you mean ‘uint’?
tdav_converter_video.cxx:49:9: error: ‘uint8’ does not name a type; did you mean ‘uint’?
122 0