|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
Mpv is lagging when watching movies
Hello,
I have OpenBSD-current amd64. I use softraid for full disc encryption. I use mpv for watching movies. I have them on HDD. The thing is: mpv is lagging. I don't know if I express correctly. The movie is stopping for fraction of a second and then plays well, then after few seconds stops and plays again and again. I think that this happens a lot more frequently since I use full disc encryption. Before it was so rare that it doesn't bothered me. How can I prevent this? |
|
|||
Here is full log from Xorg:
http://paste.opensuse.org/a2a81eeb 1. Code:
[ 144.231] (II) LoadModule: "intel" [ 144.231] (II) Loading /usr/X11R6/lib/modules/drivers/intel_drv.so [ 144.294] (II) Module intel: vendor="X.Org Foundation" [ 144.294] compiled for 1.17.2, module version = 2.99.916 [ 144.294] Module class: X.Org Video Driver [ 144.294] ABI class: X.Org Video Driver, version 19.0 [ 144.294] (II) LoadModule: "vesa" [ 144.295] (II) Loading /usr/X11R6/lib/modules/drivers/vesa_drv.so [ 144.301] (II) Module vesa: vendor="X.Org Foundation" [ 144.301] compiled for 1.17.2, module version = 2.3.3 [ 144.301] Module class: X.Org Video Driver [ 144.508] (II) UnloadModule: "vesa" [ 144.508] (II) Unloading vesa 2. Code:
[ 144.508] (--) intel(0): Output LVDS1 using initial mode 1366x768 on pipe 0 [ 144.508] (==) intel(0): TearFree disabled [ 144.508] (==) intel(0): DPI set to (96, 96) [ 145.067] (II) intel(0): switch to mode 1366x768@60.0 on LVDS1 using pipe 0, position (0, 0), rotation normal, reflection none Code:
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1040, 2059 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default) http://paste.opensuse.org/2bb1f573 Last edited by e1-531g; 4th October 2015 at 05:38 PM. Reason: Added information, and again |
|
||||
Thank you for the details, including the full log. Nothing jumped out at me, other than your video resolution is larger than your display, requiring downsizing of the image. Your video hardware is Intel HD 2000, which may be considered standard performance, rather than high performance, according to this particular specification document I found on the Internet.
Your video bitrate is 2 MB/sec, and while audio may be another half a megabyte or so per second, I'll bet your system can exceed this when reading the video file, even when using softraid. This is easy to test: $ dd if=/path/to/media/file of=/dev/null The output will provide the elapsed time, along with bytes per second. Compare the elapsed time with the media's duration. I/O will only be a problem if reading the file exceeds the media duration. |
|
|||
Code:
1548134234 bytes transferred in 66.871 secs (23150903 bytes/sec) Added: Duration time of video is 5739 seconds. So avarage bitrate of movie is around 0.2572 mebibytes per second. It is around 2.058 mebibits per second. Added2: The only unencrypted partition which I have mounted in OpenBSD is FAT partition. dd tells me this about reading from uncrypted partition: Code:
2496210944 bytes transferred in 33.909 secs (73614305 bytes/sec) Last edited by e1-531g; 25th September 2015 at 02:05 PM. Reason: added to be clear |
|
||||
If you replicate the same performance problem when displaying this video when read from the FAT partition, then I would suspect video HW/SW performance issues.
If you are unable to replicate the performance problem when the video is being read from the FAT partition, then I would suspect an I/O management issue. |
|
|||
I have some hypothesis which I would like to check. I am going to back to this thread in a few days.
|
|
|||
I do not use the mplayer fork mpv but in mplayer the choice of video output and cache size can also impact choppy video play back.
Code:
PooBear$ mplayer -vo help MPlayer SVN-r37322 (C) 2000-2014 MPlayer Team Available video output drivers: xv X11/Xv gl_nosw OpenGL no software rendering x11 X11 ( XImage/Shm ) xover General X11 driver for overlay capable video output drivers sdl SDL YUV/RGB/BGR renderer (SDL v1.1.7+ only!) gl OpenGL gl_tiled X11 (OpenGL) - multiple textures version dga DGA ( Direct Graphic Access V2.0 ) matrixview MatrixView (OpenGL) null Null video output mpegpes MPEG-PES file yuv4mpeg yuv4mpeg output for mjpegtools png PNG file jpeg JPEG file gif89a animated GIF output tga Targa output pnm PPM/PGM/PGMYUV file md5sum md5sum of each frame mng MNG file |
|
|||
I have tried watching on the same system (with softraid FDE) movie from unencrypted partition. It was better. Lags were less apparent/noticeable/visible. But they were still there.
In mpv on OpenBSD I have only five video outputs. I tried OpenGL and OpenGL-hq. On Windows in VLC it doesn't lag but it takes 20-30% of CPU time. In OpenBSD mpv uses about 15%-25% on both cores (lower). CPU in OpenBSD is in from 60% to 85% in idle during watching, but there are some lags. Mpv also wrote something about desynchronization between audio and video, but it (I mean it = desynchronization) wasn't visible. I have recompiled OpenBSD kernel with higher system clock's frequency(from 100 to 1000 HZ and after that also 550 HZ) and... it works well. It doesn't lag, it doesn't write lines about desynchronization between audio and video. This is about Timer Interrupt Frequency in Linux. It seems to apply accidentally/circumstantially to OpenBSD's kernel as well. http://lxr.free-electrons.com/source/kernel/Kconfig.hz On the other hand this kernel is not supported, so I am going to experiment witch other media player and newer Intel's DRM driver. Now I have old DRM driver. The best performance I have gotten when I was using VAAPI backend in Linux. Maybe it will be available in OpenBSD as well with newer driver. I don't know. It is wishfull thinking |
Tags |
encryption, mpv, openbsd, watching videos |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Second Life Solaris Movies not working | whispersGhost | Solaris | 0 | 14th June 2008 02:53 PM |