[MPlayer-users] DVD playback issue on older notebook with not so old Linux kernel

Dave Woodfall dave at tty1.uk
Tue May 19 17:34:36 EEST 2020


On 2020-05-19 13:04,
Erik Auerswald <auerswal at unix-ag.uni-kl.de> put forth the proposition:
> Hello David,
>
> thanks for your feedback. :-)
>
> First of all I want to say that I am using MPlayer for DVD playback for
> many years, I still do, and it does work!  Everything I describe in this
> thread concerns sporadic glitches in playback quality only.

snip...

> > MPlayer should play directly what is coming from the drive without
> > caching it.
> I do not see any technical reason for this assertion.  Anyway, MPlayer
> does not do that, instead it reads data from page cache.  It may place
> this data into its own cache, too.  Then it interprets the data as a
> video and plays it.  The data can come from a DVD image on disk as well,
> no DVD drive needed at all for playback ("cat /dev/sr0 > dvd.img" used to
> work well in the past).  To the contrary, a caching layer is required to
> mitigate the difference between DVD drive speed and movie playback speed.
>
> The way MPlayer's dvdnav:// is implemented is not aligned with the way
> MPlayer's cache is implemented, but that does not mean that playing
> "directly from the drive" would be better in general.  Even MPlayer's
> dvdnav:// uses caching via the page cache.

There are the drive's hardware buffers to consider, but if everything worked
fine before upgrading the OS, I agree that it does rather point to a software
problem and perhaps the way that buffers may be handled by the OS and drivers.

The disks are read by libdvdread.  Do you know if the version of libdvdread
changed during the update?  If it did, it may be worth trying the older version
and recompiling MPlayer.

snip...

> I did not specify this.  It is a Lenovo X121 notebook with i3 processor,
> 8 GiB RAM, and a USB DVD writer.  Write and read speeds of the DVD writer
> are far higher than needed for DVD playback (which technically just
> requires single speed).
>
> The important thing is that this setup has been able to play back DVD
> movies using MPlayer without any problems for many years.  Then it
> started to develop problems.
>
> > Knowing those might give more clues.
>
> I am not so sure about that.  If I think back, the first computer I used
> for DVD playback was a single core AMD Duron 700 with a quad speed DVD
> reader and 1 GiB of RAM.  MPlayer could play DVDs back then just fine.

Back in those days many things had two speeds - full speed or dead.

My point is that lately more conservative power settings have been applied to
notebooks and laptops by the kernel, along with a so-called `laptop mode',
which you may want to look into, because it's probably included with Ubuntu.

Nowadays, everything seems to be set to the lowest performance by default in
notebooks and laptops, especially with the new Intel P-States.  I often have to
step up the CPU to `performance' on my T420 i5 (4 cores) to be able to play
large videos without random stutters and freezes.

> An important point is the fact that "sudo swapoff -a" solves the problems.
>
> Additionally, the same problems occur when playing large video files
> from HDD instead of DVD, unless swap is disabled.

I have just remembered something /rather/ embarrassing though :)

I have had vm.swappiness=1 in /etc/sysctl.conf for as long as I can remember
(not for video playback reasons though, but because of large programs that like
to cache everything to disk if you look away for 30 secs.)

But I _still_ need to use the cpufreq performance boost that I mentioned above
when playing large videos.

I named this script `pow' for want of a sensible name:

#!/bin/sh

STATE=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)

if [ "$STATE" = "powersave" ]; then
  echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
else
  echo powersave | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
fi

--
Dave


More information about the MPlayer-users mailing list