bylee20 / bomi

bomi - a powerful and easy-to-use multimedia player
http://bomi-player.github.io
Other
425 stars 89 forks source link

Core log in another separate window #150

Closed sl1pkn07 closed 9 years ago

sl1pkn07 commented 9 years ago

Hi

can add a option for show the core/GUI events? like a missing fonts in a ASS subtitles (fontconfig events), find video/audio corruptions, etc?

if exist, i can't found in the player options

greetings

bylee20 commented 9 years ago

I'm not sure what kind of event you're talking about, although I agree that separated window for log is a good idea. However, there's still lots of things to be fixed and implemented and log window is not necessary because logs can be read from console. I'll add this function late. If you have any concrete and specific idea about this, please let me know, ESPECIALLY what you want to know from log about GUI events. I think video/audio curruption is already logged and ASS issues, too but they're logged in mpv side(which starts with [mpv/...]).

sl1pkn07 commented 9 years ago

i mean playback events like:

AV: 00:04:45 / 00:21:55 (21%) A-V: -0.000
[mkv] Invalid EBML length at position 189514164
[mkv] Corrupt file detected. Trying to resync starting from position 189514168...                                                                                                                                                            
AV: 00:04:45 / 00:21:55 (21%) A-V:  0.000
[mkv] Cluster found at 189806256.
[mkv] Invalid EBML length at position 203001031                                                                                                                                                                                              
[mkv] Corrupt file detected. Trying to resync starting from position 203001032...                                                                                                                                                            
[mkv] Cluster found at 204164357.                                                                                                                                                                                                            
AV: 00:04:45 / 00:21:55 (21%) A-V:-204.632
[ffmpeg/video] h264: reference picture missing during reorder

or fontconfig events like:

fontconfig: cannot find font 'LeviReBrushed', falling back to 'Arial'
fontconfig: cannot find font 'LeviReBrushed', falling back to 'Arial Negreta'

the main problem is because when start playback media from for example, dolphin filemanager, (without use any console to launch cmplayer) that's events don't show, then the user can not see them.

greetings

bylee20 commented 9 years ago

I made a integration for logging with systemd journal(#218). Although it's not a separated window, you can see the log through journalctl now. Also, now you can specify log file, if you want, but I don't think it's useful if you can use systemd journal. It' for who cannot utilize systemd journal.

It's not exactly what you requested but it can be used for your purpose. Because displaying log in real-time can be quite expensive jobs, I'm thinking that search log functionality in bomi instead of just showing full log in a separated window. What do you think of it?

sl1pkn07 commented 9 years ago

Hi.

with journalctl is more confusing. because is not easy to read (can't read event in real time (auto reload), need reload the log in each event)

my petition is focused to make a log like a mpv (console) or smplayer (MPV/MPLAYER log window). with this can read the playback event instantly when occur

the journalctl is good if use for debug GUI (no mpv core) events

greetings

bylee20 commented 9 years ago

So you wanted real time log viewer. That's totally different thing from what I've thought.

To avoid another misundertanding, what is 'core log' exactly? You're repeating the term 'core' but I cannot see any common parts which stands for 'core' from your descriptions. You said mpv core, playback events, GUI events, ffmpeg events, fontconfig events... Usually core means something special but what you mentioned is everything.

Can you explain more exactly what you want? Do you want just exact duplication of SMPlayer's log window?

sl1pkn07 commented 9 years ago

Hi

With the "core" i mean the player engine, in this case MPV, I name "bomi" to a GUI of mpv

like a 'core events' is like a events posted in this https://github.com/xylosper/bomi/issues/150#issuecomment-69462897

'Do you want just exact duplication of SMPlayer's log window?'

yes that's is the idea. but focused on the 'core' (mpv) events. the 'GUI' (bomi) events can handle with journalctl

greetings

bylee20 commented 9 years ago

First of all, there's a big difference the relation between mpv and bomi from that of MPlayer and smplayer. SMPlayer can be perfectly separated from MPlayer but bomi cannot be separated from mpv. bomi has its own audio/video filters/subtitle parser/subtitle renderer/video renderer to provide better integration. What makes mpv's parsing error core event and bomi's parsing error non-core event? If you want just mpv's log messages, it's fine. But you'll still miss lots of important logs.

There's a concept called context in logging system which represents the agent logging. I think breaking logs into each context and filtering logs by context is more proper way.

Btw, I can't understand why you keep saying journalctl is good for GUI. It's good for both of GUI/non-GUI logging.

sl1pkn07 commented 9 years ago

' I can't understand why you keep saying journalctl is good for GUI'

because, i think , is not much relevant when the playback is running, for exaple if have a missing fonts (or wrong styles sets in the ASS) in subtitles (MKV with embeded fonts) or switch from hardware decoding to software decoding if the 'core' can't handle that media. for example trying to playbak a Hi10p contents (h264 profile) with HW/Decoding. (in mpv show a event with this info)

that events can view in MPV OOTB in console (or in smplayer log mpv/mplayer log windows (not smplayer gui log), but not when run bomi

you say use internal filters and more other filters/features integrate in the GUI, but the playback core always work with mpv (integrated in the gui as static linked(?)), but i can't view any playback events in any place

view the playback log with journalctl needs:

first search the PID of bomi run journalctl with that PID go to the last event registred close the journalctl and re open for search to view if a new event is registred

this is god if you want debug the program (gui and 'core', if can show this info), like segfaults, OOM, memory leaks, etc. but not when you want a realtime playback events

if you can merge any events (GUI, core, filters etc) in one output, make it, but please, make it in a easy read place (and with realtime capable)

greetings

bylee20 commented 9 years ago

hardware decoding to software decoding if the 'core' can't handle that media.

That's the 'Unavailable' state for hardware acceleration in playback info.

you say use internal filters and more other filters/features integrate in the GUI, but the playback core always work with mpv (integrated in the gui as static linked(?)),

Again, what is playback core?

but i can't view any playback events in any place

Of course not unless you launch it from terminal. I didn't say bomi provide a view.

if you can merge any events (GUI, core, filters etc) in one output, make it, but please, make it in a easy read place (and with realtime capable)

I feel you thinking that I'm enforcing you to stick to journald. I've never said I won't implement your request. If I thought I won't or journald were enoguth for you, I've closed this issue. Since still I have to make you wait for respond your request, I just wanted you to know new logging feature whichi I thought it's good for you too because you've never mentioned about real time.

sl1pkn07 commented 9 years ago

'That's the 'Unavailable' state for hardware acceleration in playback info.'

this in mpv

[ffmpeg/video] h264: decode_slice_header error
[ffmpeg/video] h264: no frame!
Error while decoding frame!
Error using hardware decoding, falling back to software decoding.

but that is one of the exaples, other is if the the file is corrupt (or have corrupted chunks), like

AV: 00:04:45 / 00:21:55 (21%) A-V: -0.000
[mkv] Invalid EBML length at position 189514164
[mkv] Corrupt file detected. Trying to resync starting from position 189514168...                                                                                                                                                            
AV: 00:04:45 / 00:21:55 (21%) A-V:  0.000
[mkv] Cluster found at 189806256.
[mkv] Invalid EBML length at position 203001031                                                                                                                                                                                              
[mkv] Corrupt file detected. Trying to resync starting from position 203001032...                                                                                                                                                            
[mkv] Cluster found at 204164357.                                                                                                                                                                                                            
AV: 00:04:45 / 00:21:55 (21%) A-V:-204.632
[ffmpeg/video] h264: reference picture missing during reorder

Again, what is playback core?

mpv, or for what bomi use it?

Of course not unless you launch it from terminal. I didn't say bomi provide a view.

launch bomi by terminal can't view that events I cited

I feel you thinking that I'm enforcing you to stick to journald. I've never said I won't implement your request. If I thought I won't or journald were enoguth for you, I've closed this issue. Since still I have to make you wait for respond your request, I just wanted you to know new logging feature whichi I thought it's good for you too because you've never mentioned about real time.

smplayer (log viewer) and mpv (terminal) show that info in a real time (playback event implies show when occour that events)

greetings

bylee20 commented 9 years ago

launch bomi by terminal can't view that events I cited

That's absolutely wrong. bomi kept displaying logs into terminal and I always requested the logs when user reported bugs. Here's example of 0.9.0 version log with default logging level:

[xylosper@xylosper-ArchPC bomi]$ bomi /media/nas/sample.mkv 
[OpenGL] Check OpenGL stuffs.
[OpenGL] Version: 4.5
[OpenGL] Available FBO texture format: OGL::RGBA16_UNorm
[OpenGL] Available FBO texture format: OGL::RGBA8_UNorm
[OpenGL] Available extensions: GL_ARB_texture_rg, GL_ARB_texture_float, GL_KHR_debug, GL_NV_vdpau_interop, GLX_EXT_swap_control, GLX_SGI_swap_control, GL_ARB_framebuffer_object
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_0_35
libva info: va_openDriver() returns 0
[HwAcc] Initialized hardware acceleration API: vdpau.
[App] Cannot convert JSON object to AppState
service is "org.kde.StatusNotifierItem-7449-1"
Registering a client interface to the KStatusNotifierWatcher
[Menu] Cannot set shortcuts for 'video/motion'
[Menu] Cannot set shortcuts for 'video/dithering/cycle'
[Menu] Cannot set shortcuts for 'subtitle/track/cycle'
[Menu] Cannot set shortcuts for 'video/deinterlacing/cycle'
[Menu] Cannot set shortcuts for 'video/interpolator/advanced'
[Menu] Cannot set shortcuts for 'audio/track/cycle'
[Menu] Cannot set shortcuts for 'play/state'
[Menu] Cannot set shortcuts for 'audio/equalizer'
[Menu] Cannot set shortcuts for 'play/seek/begin'
[Menu] Cannot set shortcuts for 'play/seek/black-frame'
[Menu] Cannot set shortcuts for 'video/interpolator/cycle'
[Menu] Cannot set shortcuts for 'audio/channel/cycle'
[mpv/cplayer] Playing: /media/nas/sample.mkv
[mpv/cplayer] File uses ordered chapters, will build edit timeline.
[mpv/cplayer] This file references data from other sources.
[mpv/cplayer] Will scan other files in the same directory to find referenced sources.
[mpv/cplayer] Failed to find ordered chapter part!
[mpv/cplayer] There are 90.048 seconds missing from the timeline!
[mpv/cplayer]  (+) Video --vid=1 'AVC 720p' (h264)
[mpv/cplayer]  (+) Audio --aid=1 --alang=jpn (*) 'AAC 2.0ch' (aac)
[mpv/cplayer]  (+) Subs  --sid=1 --slang=spa (*) 'Español' (ass)
[mpv/cplayer] File tags:
[mpv/cplayer]  Title: [Sabishii & Shinkoku] Mondaiji-tachi ga Isekai kara Kuru Sou Desu yo 01 BD [720p][Hi10p][AAC]
[mpv/vf] Opening video filter: [noformat address=27500992 swdec_deint=None|1|CPU hwdec_deint=None|1|OpenGL]
[mpv/vd] Trying to use hardware decoding.
[mpv/cplayer] Setting vo cmd line to 'lscale=bilinear:cscale=bilinear:dither-depth=auto:dither=no:frame-queue-size=3:frame-drop-mode=clear:fancy-downscaling=no:sigmoid-upscaling=no:custom-shader=%320%const mat4 c_matrix = mat4(vec4(1.000000e+00,0.000000e+00,0.000000e+00,0.000000e+00),vec4(0.000000e+00,1.000000e+00,0.000000e+00,0.000000e+00),vec4(0.000000e+00,0.000000e+00,1.000000e+00,0.000000e+00),vec4(0.000000e+00,0.000000e+00,0.000000e+00,1.000000e+00)); vec4 custom_shader(vec4 color) { return c_matrix * color; }'.
[mpv/cplayer] AO: [alsa] 48000Hz stereo 2ch float
[mpv/ffmpeg/video] h264: decode_slice_header error
[mpv/ffmpeg/video] h264: no frame!
[mpv/vd] Error while decoding frame!
[mpv/vd] Error using hardware decoding, falling back to software decoding.
[mpv/cplayer] VO: [opengl-cb] 1280x720 yuv420p10

Till 0.9.0, the default log-level for stdout was info. For current git version, terminal logging is disabled by default and logging using journald. It can be turned on if you specify --log-level option again. See bomi --help.

sl1pkn07 commented 9 years ago

oh, thanks for the info! i remember can't view that info in older version

then, is easy/hard implement that log in a window? (apart of jpurnalctl and terminal)

greeting and sorry

bylee20 commented 9 years ago

It depends. Simple text logging will be easy but more comprehensive log viewer will take some time. I'm planning to release new version after implementing this feature.

sl1pkn07 commented 9 years ago

oks, thanks

bylee20 commented 9 years ago

Done. Please test it.

sl1pkn07 commented 9 years ago

Hi, i tested today, and work like a charm (include filter). but have a bit trouble

is possible can send (or put when click in the decoration) the log viewer window behind the main window?

i mean, when open the log viewer, this window stay always over the main window, and cannot send (without close) to behind.

is possible make this window independent of main window?

greetings

bylee20 commented 9 years ago

Possible but not desirable from the point of view of usual application design. If I do that, the dialog log will appear as separated item in task bar. Why don't you just close and reopen it?

sl1pkn07 commented 9 years ago
If I do that, the dialog log will appear as separated item in task bar.

for me, this is not problem (I playback the videos in FS mode)

Why don't you just close and reopen it?

you can call it laziness :P

ok. then forget the idependent window, but, is possible add a hotkey?

greetings

bylee20 commented 9 years ago

You can specify shortcut for every menu item. By default, shorcut for log viewer is 'ALT+L'.

sl1pkn07 commented 9 years ago

oh. thanks