Bug 208818 - multimedia/transcode: Fix build with ffmpeg 3.0.x
Summary: multimedia/transcode: Fix build with ffmpeg 3.0.x
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL: https://projects.archlinux.org/svntog...
Keywords:
Depends on:
Blocks: 207547
  Show dependency treegraph
 
Reported: 2016-04-15 15:42 UTC by Ben Woods
Modified: 2016-12-12 18:32 UTC (History)
2 users (show)

See Also:
cyberbotx: maintainer-feedback+


Attachments
Patch to fix build of multimedia/transcode using ffmpeg 3.0.x (24.39 KB, patch)
2016-04-15 15:42 UTC, Ben Woods
cyberbotx: maintainer-approval+
Details | Diff
QA: Successful poudriere testport logs for multimedia/transcode with patch against current ports tree (FFmpeg 2.8.6_2,1) on FreeBSD 11-current amd64 (659.26 KB, text/plain)
2016-04-15 15:44 UTC, Ben Woods
no flags Details
QA: Successful poudriere testport logs for multimedia/transcode with patch against FFmpeg 3.0.1 (from PR 207547) on FreeBSD 11-current amd64 (663.13 KB, text/plain)
2016-04-15 17:01 UTC, Ben Woods
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Woods freebsd_committer 2016-04-15 15:42:06 UTC
Created attachment 169341 [details]
Patch to fix build of multimedia/transcode using ffmpeg 3.0.x

multimedia/transcode: Fix build with ffmpeg 3.0.x

Add patch to allow transcode to build successfully once multimedia/ffmpeg is updated to 3.0.x. Note that multimedia/ffmpeg is currently still on the 2.8.x branch, however this patch is backwards compatible with ffmpeg 2.8.x.

Also fix MASTER_SITES while we are here, as distfile downloads were falling back to the freebsd local servers.
Comment 1 Ben Woods freebsd_committer 2016-04-15 15:44:17 UTC
Created attachment 169342 [details]
QA: Successful poudriere testport logs for multimedia/transcode with patch against current ports tree (FFmpeg 2.8.6_2,1) on FreeBSD 11-current amd64
Comment 2 Ben Woods freebsd_committer 2016-04-15 15:47:30 UTC
These patches were obtained from the Archlinux repository:
https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/transcode
Comment 3 Naram Qashat 2016-04-15 15:55:39 UTC
Patch looks good to me.
Comment 4 Ben Woods freebsd_committer 2016-04-15 17:01:35 UTC
Created attachment 169356 [details]
QA: Successful poudriere testport logs for multimedia/transcode with patch against FFmpeg 3.0.1 (from PR 207547) on FreeBSD 11-current amd64
Comment 5 commit-hook freebsd_committer 2016-04-15 17:40:46 UTC
A commit references this bug:

Author: jbeich
Date: Fri Apr 15 17:39:49 UTC 2016
New revision: 413356
URL: https://svnweb.freebsd.org/changeset/ports/413356

Log:
  multimedia/transcode: unbreak fetch

  fetch: http://cdn.bitbucket.org/france/transcode-tcforge/downloads/transcode-1.1.7.tar.bz2: Forbidden

  PR:		208818
  Submitted by:	Ben Woods <woodsb02@gmail.com>
  Approved by:	Naram Qashat <cyberbotx@cyberbotx.com> (maintainer)

Changes:
  head/multimedia/transcode/Makefile
Comment 6 commit-hook freebsd_committer 2016-04-15 17:40:48 UTC
A commit references this bug:

Author: jbeich
Date: Fri Apr 15 17:40:32 UTC 2016
New revision: 413357
URL: https://svnweb.freebsd.org/changeset/ports/413357

Log:
  multimedia/transcode: unbreak build with ffmpeg 3.0

  aud_aux.c:329:18: error: use of undeclared identifier 'CODEC_ID_MP2'; did you mean 'AV_CODEC_ID_MP2'?
          codeid = CODEC_ID_MP2;
                   ^~~~~~~~~~~~
                   AV_CODEC_ID_MP2
  /usr/local/include/libavcodec/avcodec.h:419:5: note: 'AV_CODEC_ID_MP2' declared here
      AV_CODEC_ID_MP2 = 0x15000,
      ^

  PR:		208818
  Reported by:	antoine (via exp-run)
  Submitted by:	Ben Woods <woodsb02@gmail.com>
  Obtained from:	Arch Linux
  Approved by:	Naram Qashat <cyberbotx@cyberbotx.com> (maintainer)

Changes:
  head/multimedia/transcode/Makefile
  head/multimedia/transcode/files/patch-ffmpeg29
  head/multimedia/transcode/files/patch-ffmpeg3
Comment 7 Jan Beich freebsd_committer 2016-04-15 17:42:24 UTC
Thanks. Committed.
Comment 8 commit-hook freebsd_committer 2016-04-15 17:42:50 UTC
A commit references this bug:

Author: jbeich
Date: Fri Apr 15 17:42:06 UTC 2016
New revision: 413358
URL: https://svnweb.freebsd.org/changeset/ports/413358

Log:
  MFH: r413356

  multimedia/transcode: unbreak fetch

  fetch: http://cdn.bitbucket.org/france/transcode-tcforge/downloads/transcode-1.1.7.tar.bz2: Forbidden

  PR:		208818
  Submitted by:	Ben Woods <woodsb02@gmail.com>
  Approved by:	Naram Qashat <cyberbotx@cyberbotx.com> (maintainer)
  Approved by:	ports-secteam blanket

Changes:
_U  branches/2016Q2/
  branches/2016Q2/multimedia/transcode/Makefile
Comment 9 Jan Beich freebsd_committer 2016-12-12 09:22:39 UTC
Does audio encoding still work after ports r428352? One of the symbols is no longer available.

$ fgrep -lr avcodec_encode_audio /usr/local/lib/transcode
/usr/local/lib/transcode/export_tcaud.so
/usr/local/lib/transcode/export_raw.so
/usr/local/lib/transcode/export_xvid.so
/usr/local/lib/transcode/export_divx5.so
/usr/local/lib/transcode/export_ffmpeg.so
/usr/local/lib/transcode/export_ppm.so
/usr/local/lib/transcode/export_xvid4.so

$ echo CFLAGS+=-Werror=implicit-function-declaration >>Makefile.local
$ make
[...]
aud_aux.c:870:16: error: implicit declaration of function 'avcodec_encode_audio' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
    out_size = avcodec_encode_audio(&mpa_ctx, (unsigned char *)output,
               ^
aud_aux.c:870:16: note: did you mean 'avcodec_encode_audio2'?
/usr/local/include/libavcodec/avcodec.h:5284:5: note: 'avcodec_encode_audio2' declared here
int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,
    ^
1 error generated.
Comment 10 Naram Qashat 2016-12-12 18:32:12 UTC
I don't use transcode myself anymore, so I am not sure what needs to be done to make that work with the newest ffmpeg. On top of that, transcode is no longer under active development, so there is no upstream to consult on this.