Closed stardiviner closed 4 years ago
Please check with other video play, if other video player can't play, it's something wrong in your video file.
I can play video with mpv, it works fine.
best upload video url let me check.
链接: https://pan.baidu.com/s/1Dl3HjnSuWIeAczNMxa26mQ 提取码: f57i
A small video file
I can't show video graphics when I first time play it.
But video is show after i try mpv or ffplay.
I don't know why.
I tried many different video files, also tried different format video files. None of them works. And the eaf-enable-debug
can't give my any meaning info at all. Is there more advanced way to debug it?
I tried many different video files, also tried different format video files. None of them works. And the
eaf-enable-debug
can't give my any meaning info at all. Is there more advanced way to debug it?
eaf-enable-debug only effect for segfault, but your problem looks is something wrong with ffmpeg or qt.
其实有一个更好的方案,就是用 plyr.js 和浏览器来重新实现视频播放器,但是QtWebEngine默认没有加入视频解码器,导致Chrome可以播放,EAF浏览器无法播放。
当前的实现是在浏览器里播放视频么?我浏览器打开 eaf-open-browser
是没问题的。
关于视频解码,Qt能否调用FFMpeg或者MPlayer他们的库么?这是我这个菜鸡唯一能想到的办法。(可能你早就想过了。。。:)
当前的实现是在浏览器里播放视频么?我浏览器打开
eaf-open-browser
是没问题的。关于视频解码,Qt能否调用FFMpeg或者MPlayer他们的库么?这是我这个菜鸡唯一能想到的办法。(可能你早就想过了。。。:)
当前播放器是用QMediaPlayer实现的,而QMediaPlayer本身就是用的FFMpeg实现的,Mplayer也是用的ffmpeg.
估计问题出在你的系统环境和QMediaPlayer的兼容性了。
当前的实现是在浏览器里播放视频么?我浏览器打开
eaf-open-browser
是没问题的。关于视频解码,Qt能否调用FFMpeg或者MPlayer他们的库么?这是我这个菜鸡唯一能想到的办法。(可能你早就想过了。。。:)
你的浏览器可以播放视频文件吗?你是怎么安装QtWebEngine这个库的?
pip install -U PyQtWebEngine
用pip 安装的。我打开Bilibili视频网站,无法看,需要Flash。不知道有哪个 不是 Flash 的视频网站可以测试下 HTML 5 video支持的。
我想用youtube测试下,但是设置了 EAF 代理,打不开youtube。
(defvar eaf-proxy-enabled nil)
(defun eaf-proxy-toggle ()
"Toggle EAF proxy."
(interactive)
(if eaf-proxy-enabled
(progn
(eaf-setq eaf-proxy-type nil)
(eaf-setq eaf-proxy-host nil)
(eaf-setq eaf-proxy-port nil))
(progn
(eaf-setq eaf-proxy-type "socks5")
(eaf-setq eaf-proxy-host "127.0.0.1")
(eaf-setq eaf-proxy-port "1086"))))
我想用youtube测试下,但是设置了 EAF 代理,打不开youtube。
(defvar eaf-proxy-enabled nil) (defun eaf-proxy-toggle () "Toggle EAF proxy." (interactive) (if eaf-proxy-enabled (progn (eaf-setq eaf-proxy-type nil) (eaf-setq eaf-proxy-host nil) (eaf-setq eaf-proxy-port nil)) (progn (eaf-setq eaf-proxy-type "socks5") (eaf-setq eaf-proxy-host "127.0.0.1") (eaf-setq eaf-proxy-port "1086"))))
你要本地配置代理才行,EAF只是代理设置,并不包括代理功能。
你要本地配置代理才行,EAF只是代理设置,并不包括代理功能。
我设置了代理的,Firefox能够通过这个代理打开youtube。
我这边实在无法重现你说的视频问题。
我现在对你的无法播放视频的问题实在无能为力,没有时间折腾为啥我行你不行。
除非你能提供更有效的解决方案,我可能不能跟进这个 issue 了,抱歉。
嗯嗯,对此我表示理解。我自己再折腾下。
我又尝试打开一些视频文件,发现又可以了,但是我获得一个报错,是在能够播放视频之前。
dbus-call-method: D-Bus error: "Traceback (most recent call last):
File \"/home/stardiviner/.virtualenvs/python3.8/lib/python3.8/site-packages/dbus/service.py\", line 711, in _message_cb
retval = candidate_method(self, *args, **keywords)
File \"/home/stardiviner/Code/Emacs/emacs-application-framework/eaf.py\", line 89, in new_buffer
return self.create_app(buffer_id, str(url), \"app.{0}.buffer\".format(str(app_name)), str(arguments))
File \"/home/stardiviner/Code/Emacs/emacs-application-framework/eaf.py\", line 131, in create_app
self.create_buffer(buffer_id, url, module_path, arguments)
File \"/home/stardiviner/Code/Emacs/emacs-application-framework/eaf.py\", line 144, in create_buffer
app_buffer = module.AppBuffer(buffer_id, url, eaf_config_dir, arguments, self.emacs_var_dict)
File \"/home/stardiviner/Code/Emacs/emacs-application-framework/app/video-player/buffer.py\", line 37, in __init__
self.build_widget_method(method_name)
File \"/home/stardiviner/Code/Emacs/emacs-application-framework/core/buffer.py\", line 332, in build_widget_method
setattr(self, method_name, getattr(self.buffer_widget, method_name))
AttributeError: 'VideoPlayerWidget' object has no attribute 'play_backward'
这好像是 DBus 的问题? Anyway,现在能正常播放视频文件了。
是的,一周之前重构的时候引入的问题。
我看你更新了README的提示。感谢。
我看你更新了README的提示。感谢。
最新版增加了 js-video-player , 当QWebEngine是通过pacman安装的,就用 js-video-player 替换 video-player 来播放本地视频。
因为 js-video-player 是基于 plyr.js 这个库开发的,不论界面效果还是功能来说都要好很多,应该不会出现黑屏的问题。
我 pull 了最新的更新。懒猫真厉害,这么快就出新feature了。
用新的EAF(重启了Emacs的)
打开了几个视频试了下。还是有问题,有的没有声音,有的还是黑屏。
因为视频有点大,上传不是很方便。
这几个视频我是从YouTube用 youtube-dl
(用 pip install youtube-dl
安装) 下载的。
这个视频 https://www.youtube.com/watch?v=oJNHXPs0XDk 只有视频没有声音。
这个视频 https://www.youtube.com/watch?v=VC_MTD68erY 只有声音没有视频,黑屏的。
我怀疑可能是我系统问题?还是说EAF选择编码的时候依然有问题?MPV,MPlayer,之类的我测试了是能正常播放的。 比如MPlayer:
mplayer One\ Million\ Clicks\ per\ Minute\ with\ Kafka\ and\ Clojure\ -\ Devon\ Peticolas-VC_MTD68erY.mkv
do_connect: could not connect to socket
connect: No such file or directory
Failed to open VDPAU backend libvdpau_va_gl.so: cannot open shared object file: No such file or directory
虽然报错,但是能正常播放。MPV是没有输出这个报错的。
另外,新的视频播放器确实要好很多,毕竟界面控制摆在那里嘛。哈哈哈。点个赞。原先 l
快进不方便,现在拉进度条就方便多了。
我 pull 了最新的更新。懒猫真厉害,这么快就出新feature了。 用新的EAF(重启了Emacs的) 打开了几个视频试了下。还是有问题,有的没有声音,有的还是黑屏。 因为视频有点大,上传不是很方便。 这几个视频我是从YouTube用
youtube-dl
(用pip install youtube-dl
安装) 下载的。 这个视频 https://www.youtube.com/watch?v=oJNHXPs0XDk 只有视频没有声音。 这个视频 https://www.youtube.com/watch?v=VC_MTD68erY 只有声音没有视频,黑屏的。我怀疑可能是我系统问题?还是说EAF选择编码的时候依然有问题?MPV,MPlayer,之类的我测试了是能正常播放的。 比如MPlayer:
mplayer One\ Million\ Clicks\ per\ Minute\ with\ Kafka\ and\ Clojure\ -\ Devon\ Peticolas-VC_MTD68erY.mkv do_connect: could not connect to socket connect: No such file or directory Failed to open VDPAU backend libvdpau_va_gl.so: cannot open shared object file: No such file or directory
虽然报错,但是能正常播放。MPV是没有输出这个报错的。
我感觉你的系统VDPAU有问题,不管是什么播放器,最底层都是ffmpeg.
好的,虽然不知道这VDPAU是啥,我去调查下,然后检查下我的系统。稍后更新反馈。
了解了VDPAU,运行一些命令后的测试结果确实是我的VDPAU不支持一些视频格式。MPV这些倒是正常播放,于是我写了一个函数给Org Mode,让它在打开视频链接的时候选择使用什么播放。暂时只能这样了。不知道怎么解决这个VDPAU不支持问题,难道是因为我在MacBook Pro 2015上安装Manjaro Linux的问题?
vainfo
vainfo: VA-API version: 1.6 (libva 2.6.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Broadwell - 2.4.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointVLD
$ vdpauinfo
display: :0 screen: 0
API version: 1
Information string: OpenGL/VAAPI backend for VDPAU
Video surface:
name width height types
-------------------------------------------
420 4096 4096 NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 NV24 YV24
422 4096 4096 NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 NV24 YV24
444 4096 4096 NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 NV24 YV24
Decoder capabilities:
name level macbs width height
----------------------------------------------------
MPEG1 --- not supported ---
MPEG2_SIMPLE --- not supported ---
MPEG2_MAIN --- not supported ---
H264_BASELINE 51 16384 2048 2048
H264_MAIN 51 16384 2048 2048
H264_HIGH 51 16384 2048 2048
VC1_SIMPLE --- not supported ---
VC1_MAIN --- not supported ---
VC1_ADVANCED --- not supported ---
MPEG4_PART2_SP --- not supported ---
MPEG4_PART2_ASP --- not supported ---
DIVX4_QMOBILE --- not supported ---
DIVX4_MOBILE --- not supported ---
DIVX4_HOME_THEATER --- not supported ---
DIVX4_HD_1080P --- not supported ---
DIVX5_QMOBILE --- not supported ---
DIVX5_MOBILE --- not supported ---
DIVX5_HOME_THEATER --- not supported ---
DIVX5_HD_1080P --- not supported ---
H264_CONSTRAINED_BASELINE 51 16384 2048 2048
H264_EXTENDED --- not supported ---
H264_PROGRESSIVE_HIGH --- not supported ---
H264_CONSTRAINED_HIGH --- not supported ---
H264_HIGH_444_PREDICTIVE --- not supported ---
VP9_PROFILE_0 --- not supported ---
VP9_PROFILE_1 --- not supported ---
VP9_PROFILE_2 --- not supported ---
VP9_PROFILE_3 --- not supported ---
HEVC_MAIN --- not supported ---
HEVC_MAIN_10 --- not supported ---
HEVC_MAIN_STILL --- not supported ---
HEVC_MAIN_12 --- not supported ---
HEVC_MAIN_444 --- not supported ---
Output surface:
name width height nat types
----------------------------------------------------
B8G8R8A8 16384 16384 y
R8G8B8A8 16384 16384 y
R10G10B10A2 16384 16384 y
B10G10R10A2 16384 16384 y
A8 16384 16384 y
Bitmap surface:
name width height
------------------------------
B8G8R8A8 16384 16384
R8G8B8A8 16384 16384
R10G10B10A2 16384 16384
B10G10R10A2 16384 16384
A8 16384 16384
Video mixer:
feature name sup
------------------------------------
DEINTERLACE_TEMPORAL -
DEINTERLACE_TEMPORAL_SPATIAL -
INVERSE_TELECINE -
NOISE_REDUCTION -
SHARPNESS -
LUMA_KEY -
HIGH QUALITY SCALING - L1 -
HIGH QUALITY SCALING - L2 -
HIGH QUALITY SCALING - L3 -
HIGH QUALITY SCALING - L4 -
HIGH QUALITY SCALING - L5 -
HIGH QUALITY SCALING - L6 -
HIGH QUALITY SCALING - L7 -
HIGH QUALITY SCALING - L8 -
HIGH QUALITY SCALING - L9 -
parameter name sup min max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH -
VIDEO_SURFACE_HEIGHT -
CHROMA_TYPE -
LAYERS -
attribute name sup min max
-----------------------------------------------------
BACKGROUND_COLOR -
CSC_MATRIX -
NOISE_REDUCTION_LEVEL -
SHARPNESS_LEVEL -
LUMA_KEY_MIN_LUMA -
LUMA_KEY_MAX_LUMA -
grep -iE 'vdpau | dri driver' /var/log/Xorg.0.log
[ 5.863] (II) intel(0): [DRI2] DRI driver: i965
[ 5.863] (II) intel(0): [DRI2] VDPAU driver: va_gl
I confirmed Emacs started from KDE/krunner (without virtualenv) can play local video files. But when open Emacs from shell (which has enabled virtualenv) will caused this problem.
As you mentioned in latest commit about using Arch installed python library webengine will use private encoder/decoder for vidoes. But not work for webengine which is installed by pip
.
This is awkward, because I have to use virtualenv in Emacs.
By the way, I have not corresponding package for fitz
module under Arch Linux.
fitz is module from package python-pymupdf
That's weird, I remember I have installed python-pymupdf before, and now I re-installed it again. I found when I enter python without virtualenv, it can't find fitz module. I will search for this issue.
I confirmed this problem. I deactived virtualenv, and enter Arch Linux python. import fitz
failed.
Here is the log exception dump from *eaf*
which failed to open PDF file.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe3103700 (LWP 464289)]
[New Thread 0x7fffe12d0700 (LWP 464290)]
[New Thread 0x7fffdb307700 (LWP 464291)]
[New Thread 0x7fffda976700 (LWP 464292)]
[New Thread 0x7fffd9fe5700 (LWP 464293)]
[New Thread 0x7fffd9654700 (LWP 464294)]
EAF process starting...
Traceback (most recent call last):
File "/home/stardiviner/Code/Emacs/emacs-application-framework/eaf.py", line 134, in create_app
self.create_buffer(buffer_id, url, module_path, arguments)
File "/home/stardiviner/Code/Emacs/emacs-application-framework/eaf.py", line 146, in create_buffer
module = importlib.import_module(module_path)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/stardiviner/Code/Emacs/emacs-application-framework/app/pdf-viewer/buffer.py", line 29, in <module>
import fitz
ModuleNotFoundError: No module named 'fitz'
Then I use command sudo pip3 install pymupdf
solved this problem.
I believe this is some thing wrong in your environment.
I even don't use virtualenv, sorry can't help you.
Thanks @manateelazycat , The problem is solved anyway. :smile:
I use command
eaf-open
to open a .mp4 video file.It only has sound. And EAF does not automatically switch to the video file name buffer. Still on current buffer. Then I toggled eaf debug option
eaf-enable-debug
. Here is the*eaf*
buffer log:My system: Manjaro Linux latest version. Python (virtualenv version):
3.8.1
Emacs version:GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.13) of 2020-02-09
EAF version: latest master branch (latest commita76d42a * master upstream/master Use eaf-send-second-key-sequence instead eaf-send-cancel-key-sequence.