Jump to content

MPV problem? No, dumb config change PulseAudio. And other MPV info.


sunrat

Recommended Posts

In another thread I posted a link to recommended MPV conf settings -

 

I just had occasion to look at mpv config again as I did a dumb thing and changed a config option in the Qjackctl command I use to launch the PA-JACK bridge. I found several videos which had 5.1 audio were not playing the dialogue channel in my stereo output. Took me several hours to discover the problem. First I thought is was the new videos so I downmixed their audio to stereo and recoded the videos with ffmpeg. That fixed it but later I noticed some videos which I had watched, with dialogue playing, were now not playing it. Eventually the penny dropped and I remembered removing "channels=2" from the module load option because I thought "don't need that, it's the default". Turns out it is needed to downmix 5.1 to stereo automatically! Time wasted ~3 hours. Lesson learnt = invaluable. 🙃

 

Anyway, the MPV bit was a side quest. I had previously advised after reading to above link to enable hwdec in mpv.conf but turns out that's not advisable according to https://man.archlinux.org/man/mpv.1#hwdec=_api_  Head slap! I had vaapi specified even though my Nvidia GPU doesn't support vaapi. MPV is smart enough to ignore it. It did help a lot for my other system though, a ThinkPad with Intel graphics.

The advised method to enable hardware decoding in MPV is to simply press Ctrl-H which will toggle it on or off.

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

securitybreach

Glad that you fixed it but honestly, I do not think that I have ever even opened the mpv config file. It just works for me.

 

Well it looks like I never even copied the config file from /usr/share/doc/mpv/

 

oMG8YcJ.png

 

Link to comment
Share on other sites

Quote

Always enabling HW decoding by putting it into the config file is discouraged. If you use the Ubuntu package, delete /etc/mpv/mpv.conf, as the package tries to enable HW decoding by default by setting hwdec=vaapi (which is less than ideal, and may even cause sub-optimal wrappers to be used). Or at least change it to hwdec=auto-safe.

 

Ha always knew that the buntus were dodgy.

 

My mpv seemed to work well in the main though VLC seemed to play some files better than mpv. I had " hwdec=auto "  but changed it to "hwdec=nvdec-copy ",  I'll see how that goes.

Meanwhile this is my mpv.config

 

Quote

vo=gpu
profile=gpu-hq
hwdec=nvdec-copy
hwdec-codecs=all
scale=ewa_lanczossharp
cscale=ewa_lanczossharp
video-sync=display-resample
interpolation
tscale=oversample
keepaspect=no
stop-screensaver = "yes"
save-position-on-quit
ao=pulse
sub-bold=yes
audio-device=alsa/iec958:CARD=PCH,DEV=0' 
screenshot-directory=/home/bloodaxe/Screenshots/mpvScreens/

 

It probably is not correct as I tend to fiddle a lot. That mpv manual page requires you to have several university degrees to just start investigating and setting up mpv. It makes my head hurt after a few sentences. 🤕

Link to comment
Share on other sites

4 hours ago, abarbarian said:

My mpv seemed to work well in the main though VLC seemed to play some files better than mpv. I had " hwdec=auto "  but changed it to "hwdec=nvdec-copy ",  I'll see how that goes.

Meanwhile this is my mpv.config

 

 

It probably is not correct as I tend to fiddle a lot. That mpv manual page requires you to have several university degrees to just start investigating and setting up mpv. It makes my head hurt after a few sentences. 🤕

 

I'm pretty sure an mpv.conf is not necessary. I only created one to display cover files for music which doesn't have embedded covers. You should read that Arch man page link I posted above re hwdec.

 

2 hours ago, V.T. Eric Layton said:

MPV? No such thing in Slackware because no SystemD in Slackware. YAY! :)

 

MPV doesn't need or depend on Systemd. I can't imagine why it wouldn't be available in Slackware. It's possibly the most capable media player in Linux but without any graphical bells n' whistles, they are all under the hood. It has extensive keyboard controls and a vast array of options; the man page is over 10,000 lines!

I'm very surprised you don't use it already.

  • Agree 1
Link to comment
Share on other sites

securitybreach

Yup as noted, has absolutely zero to do with systemd. MPV is a fork of the old mplayer. It work on windows, linux, bsd and mac. https://mpv.io/installation/

 

Quote

mpv was forked by Vincent Lang, also known as wm4, in 2012 from mplayer2, which was forked in 2010 from MPlayer.

 

https://en.wikipedia.org/wiki/Mpv_(media_player)

Link to comment
Share on other sites

V.T. Eric Layton
20 hours ago, sunrat said:

MPV doesn't need or depend on Systemd. I can't imagine why it wouldn't be available in Slackware.

 

MPV is a Gnome-based application. There's no Gnome in Slackware. The reason I suspected SystemD in the above post was because the "Qjackctl" command you mention above looked suspiciously like a SystemD command.

Link to comment
Share on other sites

21 hours ago, sunrat said:

You should read that Arch man page link I posted above re hwdec.

 

 

I did but became very confused.

 

Yep mpv does not need a .conf, I have one so I can use some of the lua scripts. 😋

Link to comment
Share on other sites

7 hours ago, V.T. Eric Layton said:

 

MPV is a Gnome-based application. There's no Gnome in Slackware. The reason I suspected SystemD in the above post was because the "Qjackctl" command you mention above looked suspiciously like a SystemD command.

 

Nope. Qjackctl is for controlling the JACK audio system. Nothing to do with systemd.

MPV is not Gnome-based either. It does depend on a couple of wayland libs in Debian, but I don't use Wayland so that's moot as well.

Link to comment
Share on other sites

V.T. Eric Layton

Hmm... no Wayland on my Slackware (14.2).

 

I have not upgraded to Slackware 15 primarily because I don't like the UGLY client-side modifications that have been made to Xfce's latest version.

Link to comment
Share on other sites

securitybreach

See, no mention of wayland or gnome:

#!/usr/bin/env bash

set -e

TMP=${TMP:-/tmp}
PKG="$TMP/package-mpv"
BUILD=${BUILD:-2}
TAG=${TAG:-dc}
SBO="${SBO:-https://raw.githubusercontent.com/Ponce/slackbuilds/master/multimedia/mpv}"

if [[ -z $ARCH ]]; then
  case $( uname -m ) in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
    *) ARCH=$( uname -m ) ;;
  esac
fi

if [ "$ARCH" = "i586" ]; then
  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

cd "$TMP"
rm -rf mpv-build package-mpv
git clone https://github.com/mpv-player/mpv-build
cd mpv-build
./use-mpv-release
cat << EOF > mpv_options
--prefix=/usr
--confdir=/etc/mpv
--mandir=/usr/man
--docdir=/usr/doc/mpv
--enable-libmpv-shared
--libdir=/usr/lib$LIBDIRSUFFIX
EOF
./rebuild -j"$(( $(nproc) + 1))"
cd mpv
VERSION="$(git describe --tags | cut -c 2-)"
./waf --destdir="$PKG" install

find "$PKG" -print0 | xargs -0 file | grep -e "executable" -e "shared object" \
  | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

gzip -9 "$PKG/usr/man/man1/mpv.1"
ETC="$PKG/etc/mpv"
mv "$ETC/encoding-profiles.conf" "$ETC/encoding-profiles.conf.new"
DOC="$PKG/usr/doc"
DOCDIR="$DOC/mpv-$VERSION"
mv "$DOC/mpv" "$DOCDIR"
cp -a DOCS "$DOCDIR"
INSTALL="$PKG/install"
mkdir "$INSTALL"
wget -O "$INSTALL/doinst.sh" "$SBO/doinst.sh"
wget -O "$INSTALL/slack-desc" "$SBO/slack-desc"
cd "$PKG"
/sbin/makepkg -l y -c n "$TMP/mpv-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}"

 

https://github.com/duganchen/my_slackbuilds/blob/master/mpv.SlackBuild

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...