LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-28-2017, 10:23 AM   #1
1337_powerslacker
Member
 
Registered: Nov 2009
Location: Kansas, USA
Distribution: Slackware64-15.0
Posts: 862
Blog Entries: 9

Rep: Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592
mpv and ffmpeg - Patch for successful build


As of today's update, mpv failed to build with ffmpeg. I Googled for a solution, and found some patches on Arch Linux's site (NOTE: patches are attached to this post. Download into the mpv directory and rename the files to remove .txt extension) which fixed the problem for me. I slightly modified the mpv.SlackBuild to automatically apply the patches before configuring and building.

After the line that says:
Code:
cd $PRGNAM-$VERSION
But before:
Code:
chown -R root:root .
I inserted three blank lines, arrowed up 2, and inserted this line to apply the patches:
Code:
for i in $CWD/*.patch; do patch -p1 < $i; done
mpv built successfully, and I am now watching videos with it, after the slackpkg update.

Hope this helps!

Last edited by 1337_powerslacker; 11-28-2017 at 10:27 AM.
 
Old 11-28-2017, 10:31 AM   #2
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
Its kind of silly to patch software that was intentionally broken out of the developer's personal spite. You're just going to get an unsupported build and a ton of pain when mpv upstream breaks it again.

Edit: Also for those you are missing the ytdl support built into mpv. This can be used with mplayer.

Code:
 mpv() {
 youtube-dl -o - "$1" | mplayer -
 }

Last edited by orbea; 11-28-2017 at 10:44 AM.
 
2 members found this post helpful.
Old 11-28-2017, 12:20 PM   #3
1337_powerslacker
Member
 
Registered: Nov 2009
Location: Kansas, USA
Distribution: Slackware64-15.0
Posts: 862

Original Poster
Blog Entries: 9

Rep: Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592
Quote:
Originally Posted by orbea View Post
Its kind of silly to patch software that was intentionally broken out of the developer's personal spite. You're just going to get an unsupported build and a ton of pain when mpv upstream breaks it again.
I don't use mpv because of politics. I use it because it works well for my needs, and I patched it so I can continue using it. I concern myself mainly with technical issues.
 
Old 11-28-2017, 12:46 PM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,232

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
I was just looking at the github issue this morning. Apparently this is already fixed in mpv's git master, and the next release should be fine.

https://github.com/mpv-player/mpv/issues/5081

Personally, I was just going to rebuild it without libva support.
 
Old 11-28-2017, 12:47 PM   #5
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,100

Rep: Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176
I just tried building it and of those patches just the vaapi-Use-libva2-message-callbacks.patch seems actually needed for the new va stuff on current.
BTW, thanks for reporting this!
 
Old 11-28-2017, 12:49 PM   #6
1337_powerslacker
Member
 
Registered: Nov 2009
Location: Kansas, USA
Distribution: Slackware64-15.0
Posts: 862

Original Poster
Blog Entries: 9

Rep: Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592
Quote:
Originally Posted by ponce View Post
I just tried building it and of those patches just the vaapi-Use-libva2-message-callbacks.patch seems actually needed for the new va stuff on current.
BTW, thanks for reporting this!
You're very welcome! I didn't know if all of them were needed or not; however, it does no harm, and I'm inclined to leave them in for my personal system.

Last edited by 1337_powerslacker; 11-28-2017 at 01:13 PM.
 
Old 11-28-2017, 12:51 PM   #7
1337_powerslacker
Member
 
Registered: Nov 2009
Location: Kansas, USA
Distribution: Slackware64-15.0
Posts: 862

Original Poster
Blog Entries: 9

Rep: Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592
Quote:
Originally Posted by dugan View Post
I was just looking at the github issue this morning. Apparently this is already fixed in mpv's git master, and the next release should be fine.

https://github.com/mpv-player/mpv/issues/5081

Personally, I was just going to rebuild it without libva support.
I don't know when the next release is going to be, and I don't have much experience with building from git; I just used the method I was most familiar with, and it worked. However, I look forward to the next release with anticipation.
 
Old 11-28-2017, 01:11 PM   #8
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
mpv git head already includes the fixes for the new va libraries, but it won't build against ffmpeg 3.4 (something to do with using a libav api that hasn't be ported to ffmpeg yet.). it will build against ffmpeg head (3.5-dev) so when ffmpeg 3.5 is released that issue should resolve itself (unless anything else breaks in the mean time.).

The last official release of mpv, v0.27.0, will build against ffmpeg 3.4 but it doesn't have the fixes for the new va library versions, so it fails to build on current as of today's update.

This is the situation we currently find ourselves in.


An alternative to patching is using "git checkout -f f36d152eb7" to checkout a revision of mpv that has the vaapi changes, but still works with ffmpeg-3.4, and building from that until such time as 3.5 is out and slackware has moved to it. @marrowsuck deserves the credit for finding that.
 
1 members found this post helpful.
Old 11-28-2017, 01:17 PM   #9
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,100

Rep: Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176
Quote:
Originally Posted by GazL View Post
The last official release of mpv, v0.27.0, will build against ffmpeg 3.4 but it doesn't have the fixes for the new va library versions, so it fails to build on current as of today's update.
just to clarify, mpv-0.27.0 builds fine against ffmpeg-3.4 on today's current with just this patch.
 
1 members found this post helpful.
Old 11-28-2017, 01:30 PM   #10
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by ponce View Post
just to clarify, mpv-0.27.0 builds fine against ffmpeg-3.4 on today's current with just this patch.

but v0.28 most likely wont. The revision marrowsuck identified is 302 changesets ahead of v0.27.0 and I think will be as uptodate as you'll be able to get without using ffmpeg 3.5 or the ffmpeg-mpv fork (which I don't like the idea of).

Both approaches appear to be valid. Use either the git revision listed above, or 0.27 and the patch, and you should be fine for now.
 
Old 11-28-2017, 01:38 PM   #11
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
Quote:
Originally Posted by 1337_powerslacker View Post
I don't use mpv because of politics. I use it because it works well for my needs, and I patched it so I can continue using it. I concern myself mainly with technical issues.
This is not politics, a better description is pointless self sabotage that is being imposed on the users. If you want to deal with unfriendly projects go for it. I just want people who come to this thread to better understand why this issue exists.
 
1 members found this post helpful.
Old 11-28-2017, 01:50 PM   #12
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,232

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
I'm not seeing much of a problem. They'll obviously delay the 0.28 release until FFMPEG 3.5 is out.
 
Old 11-28-2017, 10:17 PM   #13
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,232

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by dugan View Post
Personally, I was just going to rebuild it without libva support.
Yah that worked.

Code:
env BUILD_OPTS=" --disable-vaapi " ./mpv.SlackBuild
That's a perfectly good workaround for me, as I'm using the proprietary NVidia drivers.
 
Old 11-30-2017, 08:04 AM   #14
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
Quote:
Originally Posted by dugan View Post
I'm not seeing much of a problem. They'll obviously delay the 0.28 release until FFMPEG 3.5 is out.
Or it may be broken again when ffmpeg-3.5 is out. Mpv developers apparently has no respect for other projects and people shouldn't expect them to support ffmpeg anymore. It would be nice if they did, but I won't hold my breath for wm4 to rectify the damage caused by his tantrum or to not have another one.

In case the point was not clear, mpv works fine with ffmpeg-3.4 except for the fact that wm4 intentionally broke it because of personal issues. If it happened once it could happen again and users have only a few choices.

1. Play along.
2. Go through tedious efforts to undo the damage as its done.
3. Find an alternative.
4. Fork mpv.

Last edited by orbea; 11-30-2017 at 08:09 AM.
 
Old 11-30-2017, 08:50 AM   #15
1337_powerslacker
Member
 
Registered: Nov 2009
Location: Kansas, USA
Distribution: Slackware64-15.0
Posts: 862

Original Poster
Blog Entries: 9

Rep: Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592
Quote:
Originally Posted by orbea View Post
Or it may be broken again when ffmpeg-3.5 is out. Mpv developers apparently has no respect for other projects and people shouldn't expect them to support ffmpeg anymore. It would be nice if they did, but I won't hold my breath for wm4 to rectify the damage caused by his tantrum or to not have another one.
In case my point was not clear, let me restate it. Personal developer issues (Read: politics) are not my concern. I use mpv because it meets my needs. If it breaks again in the future, I will again find a patch to fix it (which is not tedious, IMO) and move on.

Last edited by 1337_powerslacker; 11-30-2017 at 12:38 PM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: FFmpeg's Player to Get Features Inspired from the MPV Media Player LXer Syndicated Linux News 1 09-29-2015 06:18 AM
Another successful LFS build! :-D Lufbery Linux From Scratch 7 06-07-2011 07:26 PM
Mostly Successful Build Report senjak Linux - Hardware 0 07-16-2009 10:32 AM
Successful R 2.4 Build trashbird1240 Linux - Software 2 10-06-2006 09:09 AM
Looking for ggc4 ffmpeg patch FunkyRes Linux - Software 0 04-25-2005 09:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration