Bug 187805 - [PATCH] multimedia/x264: Allow LAVF support via ffmpeg and update to 0.142.2455
Summary: [PATCH] multimedia/x264: Allow LAVF support via ffmpeg and update to 0.142.2455
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Some People
Assignee: Kubilay Kocak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-21 07:30 UTC by Andrew Berg
Modified: 2014-11-22 16:47 UTC (History)
2 users (show)

See Also:


Attachments
file.diff (15.72 KB, patch)
2014-03-21 07:30 UTC, Andrew Berg
no flags Details | Diff
Updated patch for r371677 with some fixes and upstream update to 0.142.2455 (27.25 KB, patch)
2014-10-29 18:08 UTC, Andrew Berg
no flags Details | Diff
Updated patch for r371677 with some fixes and upstream update to 0.142.2455 (fixed) (25.88 KB, patch)
2014-10-29 18:16 UTC, Andrew Berg
no flags Details | Diff
Updated patch for r372519 (24.91 KB, patch)
2014-11-13 13:04 UTC, Andrew Berg
no flags Details | Diff
Updated patch for r372519 (fixed x264-patch-Makefile) (25.88 KB, patch)
2014-11-13 14:01 UTC, Andrew Berg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Berg 2014-03-21 07:30:00 UTC
Several ports depend on x264 solely for libx264 and do not need the command-line application itself. This results in a circular dependency with multimedia/ffmpeg since x264 gains an implicit dependency on it if built while ffmpeg installed - x264 detects the presence of the libav* libraries and build against them to provide lavf support.

Fix: This patch unifies the work done to update x264 to core 140 and the work required to build the library and application as separate ports, thereby breaking ffmpeg's dependency on x264, instead making it dependent on the new libx264 port. Other ports dependent on the library have also been updated to use it as a dependency instead of x264. x264 now has an explicit dependency on ffmpeg for lavf support (which is an option and is enabled by default). The X11_SUPPORT option has been removed since it is no longer supported upstream. Finally, the application now supports showing the git revision in its help message.

Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-03-21 07:30:05 UTC
Responsible Changed
From-To: freebsd-ports-bugs->koobs

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2014-08-21 05:15:28 UTC
Ping. Have not forgotten :)
Comment 3 Andrew Berg 2014-08-21 05:41:02 UTC
Pong. You had mentioned you had a version of my patch with your own changes; how does it differ (other than things like PORTREVISION bumps) and what is its status?
Comment 4 Andrew Berg 2014-10-21 18:07:51 UTC
I was unaware of this commit until today:
https://svnweb.freebsd.org/ports?view=revision&revision=354166

However, all that this does is completely prevent x264 from using ffmpeg. ffmpeg provides libavformat, which x264 can use to mux/demux and decode video from convenient formats rather than being restricted to raw video.



I get the feeling that no one but me cares, though. Should I even bother finishing an updated patch that applies to a recent version of the ports tree and updates x264 to 0.142.2455?
Comment 5 Andrew Berg 2014-10-29 18:08:23 UTC
Created attachment 148770 [details]
Updated patch for r371677 with some fixes and upstream update to 0.142.2455

What this patch accomplishes:
- Allows x264 to use lavf and friends from ffmpeg for decoding and demuxing while preventing a circular dependency between the two. This is done by splitting x264 into two ports - the CLI application (x264) and the library (libx264). x264 can depend on ffmpeg, but ffmpeg will depend on libx264 rather than x264.
- Provides a long overdue update to x264 (and includes fixes to local patches so that they can apply to the new upstream files).
- Provides the git revision and other version information to the build environment, allowing the CLI binary to display this information (like the Windows builds).
- Removes unsupported build options (X11_OUTPUT) and ensures that the library and CLI ports each have the appropriate options.
- Adds the LAVF option to the CLI port, making the dependency on ffmpeg optional.
- Adds notes for future contributors who wish to update the ports.
- Bumps PORTREVISION for all dependent ports.

This patch definitely does NOT come from a desire to separate applications and libraries in general.
Thanks to koobs for his help with version.sh and the git info, and with getting some information on splitting the lib, and to the helpful people in #x264dev on freenode for their help with version.sh and the configure script.
Comment 6 Andrew Berg 2014-10-29 18:10:23 UTC
CC'ing multimedia@ since this affects many multimedia ports.
Comment 7 Andrew Berg 2014-10-29 18:16:28 UTC
Created attachment 148773 [details]
Updated patch for r371677 with some fixes and upstream update to 0.142.2455 (fixed)

Other patch had a couple things that didn't belong.
Comment 8 Andrew Berg 2014-11-13 13:04:23 UTC
Created attachment 149375 [details]
Updated patch for r372519
Comment 9 Andrew Berg 2014-11-13 14:01:29 UTC
Created attachment 149378 [details]
Updated patch for r372519 (fixed x264-patch-Makefile)

My changes to the x264 Makefile patch got mangled in the update.
Comment 10 commit-hook freebsd_committer freebsd_triage 2014-11-22 16:24:30 UTC
A commit references this bug:

Author: xmj
Date: Sat Nov 22 16:23:42 UTC 2014
New revision: 373073
URL: https://svnweb.freebsd.org/changeset/ports/373073

Log:
  multimedia/x264: General overhaul

  - Split x264 into two ports: the CLI application (x264), and the library
    (libx264). This will allow x264 to use lavf and friends from ffmpeg for
    decoding and demuxing while preventing a circular dependency between the
    two: x264 can depend on ffmpeg, but ffmpeg will depend on libx264 rather
    than x264.
  - Add the LAVF option to the CLI port, making the dependency on ffmpeg
    optional.
  - Update to 0.142.2455.
  - Amend fixes to local patches so that they can apply to the new upstream
    files.
  - Provide the git revision and other version information to the build
    environment, allowing the CLI binary to display this information (like the
    Windows builds).
  - Remove unsupported build options (X11_OUTPUT).
  - Ensure that the library and CLI ports each have the appropriate options.
  - Add notes for future contributors who wish to update the ports.
  - Bump PORTREVISION for all dependent ports.

  PR:           187805
  Differential Revision:	https://reviews.freebsd.org/D1159
  Submitted by: Andrew Berg <aberg010@my.hennepintech.edu>
  Approved by:  koobs (maintainer, mentor)

Changes:
  head/multimedia/avidemux2/Makefile
  head/multimedia/avidemux2/Makefile.common
  head/multimedia/avidemux26/Makefile
  head/multimedia/avidemux26/Makefile.common
  head/multimedia/ffmpeg/Makefile
  head/multimedia/ffmpeg0/Makefile
  head/multimedia/ffmpeg24/Makefile
  head/multimedia/gstreamer-plugins/Makefile.common
  head/multimedia/gstreamer-plugins-x264/Makefile
  head/multimedia/gstreamer1-plugins/Makefile.common
  head/multimedia/gstreamer1-plugins-x264/Makefile
  head/multimedia/libav/Makefile
  head/multimedia/libquicktime/Makefile
  head/multimedia/libx264/
  head/multimedia/libx264/Makefile
  head/multimedia/libx264/distinfo
  head/multimedia/libx264/files/
  head/multimedia/libx264/files/patch-Makefile
  head/multimedia/libx264/files/patch-common_cpu.c
  head/multimedia/libx264/pkg-descr
  head/multimedia/libx264/pkg-plist
  head/multimedia/mpeg4ip/Makefile
  head/multimedia/mplayer/Makefile.optvars
  head/multimedia/transcode/Makefile
  head/multimedia/vlc/Makefile
  head/multimedia/x264/Makefile
  head/multimedia/x264/distinfo
  head/multimedia/x264/files/patch-Makefile
  head/multimedia/x264/pkg-plist
  head/net/opal/Makefile
  head/x11/xpra/Makefile
Comment 11 Johannes Jost Meixner freebsd_committer freebsd_triage 2014-11-22 16:47:49 UTC
Committed, thanks!