Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#54480 closed update (fixed)

VLC: upgrade to 2.2.6 and FFmpeg 3

Reported by: RJVB (René Bertin) Owned by: l2dy (Zero King)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch maintainer Cc: mkae (Marko Käning), dbevans (David B. Evans)
Port: VLC

Description

VLC 2.2.6 is out with a few fixes (one of mine, even) and I stumbled across a patch that makes VLC works with FFmpeg >= 3.0 .

I have been using this for a couple of days now and the resulting binaries seem to work just fine, but between my normal day-to-day use and exhaustive testing there's a quite a bit of a gap.

Thus, I'm uploading a patch that disables/hides the ffmpeg-VLC subport but doesn't remove it completely yet, not until this version has seen more real-world usage in the wild.

Attachments (6)

patch-ffmpeg3-compat.diff (8.7 KB) - added by RJVB (René Bertin) 7 years ago.
VLC.diff (8.4 KB) - added by RJVB (René Bertin) 7 years ago.
patch-use-NSGetEnviron.diff (1.3 KB) - added by RJVB (René Bertin) 7 years ago.
VLC-portdir.diff (98.5 KB) - added by RJVB (René Bertin) 7 years ago.
VLC-portdir.2.diff (30.2 KB) - added by RJVB (René Bertin) 7 years ago.
this one looks correct
0001-VLC-upgrade-to-2.2.6-and-FFmpeg-3.patch (31.5 KB) - added by l2dy (Zero King) 7 years ago.

Download all attachments as: .zip

Change History (28)

Changed 7 years ago by RJVB (René Bertin)

Attachment: patch-ffmpeg3-compat.diff added

Changed 7 years ago by RJVB (René Bertin)

Attachment: VLC.diff added

comment:1 Changed 7 years ago by mf2k (Frank Schima)

Keywords: maintainer added

comment:2 Changed 7 years ago by l2dy (Zero King)

There are 3 reinplace warnings in patch phase on OS X 10.11.

--->  Patching configure.ac: s:-lstdc++:-lc++:
Warning: reinplace s:-lstdc++:-lc++: didn't change anything in /opt/local/var/macports/build/_Users_*_ports_multimedia_VLC/VLC/work/vlc-2.2.6/configure.ac
--->  Patching configure.ac: s/Appkit/AppKit/
Warning: reinplace s/Appkit/AppKit/ didn't change anything in /opt/local/var/macports/build/_Users_*_ports_multimedia_VLC/VLC/work/vlc-2.2.6/configure.ac
--->  Patching decomp.c: /argv/s/environ/*_NSGetEnviron()/
Warning: reinplace /argv/s/environ/*_NSGetEnviron()/ didn't change anything in /opt/local/var/macports/build/_Users_*_ports_multimedia_VLC/VLC/work/vlc-2.2.6/modules/stream_filter/decomp.c
Last edited 7 years ago by l2dy (Zero King) (previous) (diff)

comment:3 Changed 7 years ago by RJVB (René Bertin)

Updated, thanks.

(I actually have a king, officially 8-) )

Changed 7 years ago by RJVB (René Bertin)

Attachment: patch-use-NSGetEnviron.diff added

Changed 7 years ago by RJVB (René Bertin)

Attachment: VLC-portdir.diff added

comment:4 in reply to:  3 Changed 7 years ago by l2dy (Zero King)

Replying to RJVB:

Updated, thanks.

Is VLC-portdir.diff ready to be committed?

(I actually have a king, officially 8-) )

What does this mean?

comment:5 Changed 7 years ago by l2dy (Zero King)

In VLC-portdir.diff, should depends_lib-append port:ffmpeg-FFMPEG_VLC_PREFIX be port:ffmpeg-VLC?

comment:6 in reply to:  5 Changed 7 years ago by RJVB (René Bertin)

Replying to l2dy:

In VLC-portdir.diff, should depends_lib-append port:ffmpeg-FFMPEG_VLC_PREFIX be port:ffmpeg-VLC?

Ah, yes, indeed. Overzealous global-search-and-replace I reckon, something I'd evidently have caught the day I tried to go back to depending on the ffmpeg-VLC subport. I don't think that'll happen but we'll see what kind of feedback we get once the port is out in the wild.

I wouldn't have submitted this if I thought it wasn't ready to be committed. With the caveat emptor outlined above, that support for FFmpeg 3 comes from a patch I stumbled upon. I'm using the player daily, but don't have any really exotic content or recent enough hardware+OS to check hardware-accelerated video playback (it works intermittently for me).

PS: the king quip was a pun on your pseudo and my official nationality :)

Last edited 7 years ago by RJVB (René Bertin) (previous) (diff)

comment:7 Changed 7 years ago by l2dy (Zero King)

Why are the patches in files/files/?

comment:8 Changed 7 years ago by RJVB (René Bertin)

Sh, that's a hasty operator error getting the diff out. I noticed that the portdir diff had more patchfiles than I expected but missed the subdirectory. Let me find a moment to prepare a proper diff before committing, lest I made other stupid mistakes :-/

Changed 7 years ago by RJVB (René Bertin)

Attachment: VLC-portdir.2.diff added

this one looks correct

comment:9 Changed 7 years ago by l2dy (Zero King)

$ port lint VLC
--->  Verifying Portfile for VLC
Warning: Line 506 should use the expansion operator instead of the eval procedure. Change
Warning:             eval file delete [glob ${destroot}${prefix}/lib/vlc/plugins/*/*.la]
Warning: to
Warning:             file delete {*}[glob ${destroot}${prefix}/lib/vlc/plugins/*/*.la]
Error: conflicts references unknown port: libVLC-devel
--->  1 errors and 1 warnings found.

Changed 7 years ago by l2dy (Zero King)

comment:10 Changed 7 years ago by l2dy (Zero King)

I uploaded a patch with lint fixes, can you check if it compiles and works fine?

comment:11 Changed 7 years ago by RJVB (René Bertin)

Attaching a diff against the updated Portfile would have been easier...

Anyway, I really dislike that Tcl expansion operator and port:libVLC-devel exists on my end (subport of the unmaintained VLC-devel) but yeah, your modifications should not introduce any behaviour changes.

comment:12 in reply to:  11 Changed 7 years ago by l2dy (Zero King)

Replying to RJVB:

Attaching a diff against the updated Portfile would have been easier...

Anyway, I really dislike that Tcl expansion operator and port:libVLC-devel exists on my end (subport of the unmaintained VLC-devel) but yeah, your modifications should not introduce any behaviour changes.

Can I commit that as is or should I revert to eval file delete?

comment:13 Changed 7 years ago by RJVB (René Bertin)

No, you can commit as is. In this case there's no real difference.

comment:14 Changed 7 years ago by l2dy (Zero King)

Owner: set to l2dy
Resolution: fixed
Status: newclosed

In c0fff8944a6d33e366abc4321e385189a3d9d1d9/macports-ports:

VLC: upgrade to 2.2.6 and FFmpeg 3

Fixes: #54480

comment:15 Changed 7 years ago by l2dy (Zero King)

Did you intentionally leave Portfile.ffmpeg.tcl out?

Last edited 7 years ago by l2dy (Zero King) (previous) (diff)

comment:16 Changed 7 years ago by RJVB (René Bertin)

Yes, that's part of what I meant with "doesn't remove it completely yet" in my original summary. The idea is to provide the file along with instructions if ever someone reports issues that might be related to the ffmpeg 3 patch but I cannot reproduce myself.

comment:17 Changed 7 years ago by l2dy (Zero King)

Builds failed on Buildbot.

checking for libavcodec >= 53.34.0 libavutil >= 51.22.0... no
configure: error: No package 'libavcodec' found
No package 'libavutil' found. Pass --disable-avcodec to ignore this error.
Last edited 7 years ago by l2dy (Zero King) (previous) (diff)

comment:18 Changed 7 years ago by RJVB (René Bertin)

Where does that come from? Did you try to build yourself?

I have ffmpeg 3.2.4 installed, which means libavcodec 57.64.101 and libavutil 55.34.101 :

ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with clang version 4.0.0 (tags/RELEASE_400/final)
  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-indev=jack --disable-outdev=xv --enable-audiotoolbox --enable-sdl2 --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/opt/local/bin/clang-mp-4.0 --enable-vda --enable-videotoolbox --arch=x86_64 --enable-yasm --enable-libx265 --enable-libdc1394 --enable-librtmp --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libsmbclient --enable-nonfree --enable-libfdk-aac
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100

those numbers shouldn't decrease...

comment:19 Changed 7 years ago by RJVB (René Bertin)

Is there currently an issue with port:mesa? I haven't upgraded it yet (huge version bump!).

I've checked the build against ffmpeg 3.3: no issues here. For the mesa thing I've decided to exclude the +x11 variant from the +full variant, making it an independent build choice. That also means a significant reduction of dependencies for the default install. You can find the updated portfile here: https://github.com/macports/macports-ports/blob/master/multimedia/VLC/Portfile

comment:20 in reply to:  18 Changed 7 years ago by l2dy (Zero King)

Replying to RJVB:

Where does that come from? Did you try to build yourself?

Fixed in [3e10a60f51061022e5347a0bcc105d9be3789768/macports-ports]. It was late at night so I couldn't wait for Buildbot results and didn't comment here.

comment:21 Changed 7 years ago by l2dy (Zero King)

@ryandesign made two comments in the mailing list, please open a new ticket and CC him if you'd like to fix the problems.

https://lists.macports.org/pipermail/macports-dev/2017-August/036287.html https://lists.macports.org/pipermail/macports-dev/2017-August/036289.html

comment:22 Changed 7 years ago by RJVB (René Bertin)

Yes, the path:-style depspec should work too, with all the usual caveat emptors about how using a -devel port can break things in unforeseen (and typically unsupported ways). I'll fix that locally so it can go in with a future upgrade.

As to fixing the other "problem", I find it difficult enough to fix my own dislikes already so won't even try fixing someone else's ;)

port:VLC is a necessary evil for me, I'd be using an official build if it weren't for the fact that my KF5 ports require the phonon-vlc backend which means I need a libVLC that can be used from other applications than VLC itself. As long as nobody breaks that I don't really care what other changes are made to the Portfile (and might even merge obvious improvements into my own macstrop copy).

Note: See TracTickets for help on using tickets.