Bug 215240 - graphics/amide: switch to modern ffmpeg
Summary: graphics/amide: switch to modern ffmpeg
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: Guido Falsi
URL:
Keywords: patch, patch-ready
Depends on:
Blocks: 215036
  Show dependency treegraph
 
Reported: 2016-12-12 02:12 UTC by Jan Beich
Modified: 2017-01-02 22:43 UTC (History)
1 user (show)

See Also:
madpilot: maintainer-feedback+


Attachments
v0 + commit message (5.66 KB, patch)
2016-12-12 02:12 UTC, Jan Beich
jbeich: maintainer-approval? (madpilot)
Details | Diff
amide.diff (6.81 KB, patch)
2016-12-24 12:23 UTC, Guido Falsi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2016-12-12 02:12:08 UTC
Created attachment 177899 [details]
v0 + commit message

Build log: http://sprunge.us/daRc

Can you check runtime?
Comment 1 Guido Falsi freebsd_committer 2016-12-12 10:01:16 UTC
Thanks for this patch. Please allow me time to give it a test.

I will commit the change as soon as possible.
Comment 2 Guido Falsi freebsd_committer 2016-12-13 08:39:05 UTC
I tested it using an old RM set of mine, while sthe software compiles and runs it's unable to generate mpeg videos from the medical images (it can generate "fly through" videos).

When I try it gives this error:

Total number of movie frames to do: 450	increment 0.180073
[mpeg1video @ 0x81642f300] AVFrame.format is not set
[mpeg1video @ 0x81642f300] AVFrame.width or height is not set


And pops up a window saying frame 0 failed. Do you have any insight?
Comment 3 Guido Falsi freebsd_committer 2016-12-24 12:23:03 UTC
Created attachment 178246 [details]
amide.diff

I have modified your patch slightly, trying to address the problem. I fixed the error message I was getting but generating the video fails anyway.

I'm attaching my modified patch.

I don't know much about the ffmpeg APIs. Are you able to help me make it work again?

Thanks.
Comment 4 Jan Beich freebsd_committer 2016-12-25 06:54:24 UTC
Comment on attachment 178246 [details]
amide.diff

I did a similar change but remembered it didn't fix a regression from bug 207547. Can you try building against ffmpeg 2.8.x (either rollback or use 2016Q4)? If the issue is the same it may be worth to bisect ffmpeg commits.
Comment 5 Guido Falsi freebsd_committer 2016-12-28 08:50:51 UTC
(In reply to Jan Beich (mail not working) from comment #4)
> Comment on attachment 178246 [details]
> amide.diff
> 
> I did a similar change but remembered it didn't fix a regression from bug
> 207547. Can you try building against ffmpeg 2.8.x (either rollback or use
> 2016Q4)? If the issue is the same it may be worth to bisect ffmpeg commits.

I tested using a 2016Q4 ports checkout, but installing dependencies from official packages, in a VirtualBox VM.

It fails with 2.8.x the same as it does with 3.x.

I don't know how the ffmpeg repos are managed, what should I bisect? this will take some time to do.
Comment 6 Guido Falsi freebsd_committer 2017-01-01 10:17:02 UTC
I have found this message on the amide mailing lists archives:

https://sourceforge.net/p/amide/mailman/message/35181902/

so there should be working patches here:

https://anonscm.debian.org/viewvc/debian-med/trunk/

I'll test these and report back.

One question I must answer to though is, what copyright and license (if any) are these patches subject to and if such license is acceptable for importing in the source tree.
Comment 7 Jan Beich freebsd_committer 2017-01-01 10:36:55 UTC
(In reply to Guido Falsi from comment #6)
> One question I must answer to though is, what copyright and license
> (if any) are these patches subject to and if such license is
> acceptable for importing in the source tree.

According to debian/copyright file the patches are under GPLv2+ much like AMIDE itself. So, treat like any other upstream patch: either use PATCH_SITES + PATCHFILES or copy under files/ directory + document origin.
Comment 8 Guido Falsi freebsd_committer 2017-01-02 15:45:51 UTC
Hi,

Dropping a quick note to inform you I have a working patch based on the debian ones.

I'll commit this update in a little while.
Comment 9 commit-hook freebsd_committer 2017-01-02 22:42:14 UTC
A commit references this bug:

Author: madpilot
Date: Mon Jan  2 22:41:15 UTC 2017
New revision: 430414
URL: https://svnweb.freebsd.org/changeset/ports/430414

Log:
  Modify amide port to use  ffmpeg 3.x

  Actual patch is a mix of work from subitter and my modifications
  based on debian patch from [1]

  While here, fix the DCMTK option.

  PR:		215240
  Submitted by:	jbeich
  Obtained From:	https://anonscm.debian.org/viewvc/debian-med/trunk/packages/amide/trunk/debian/patches/libav10.patch?view=markup&pathrev=16327 [1]

Changes:
  head/graphics/amide/Makefile
  head/graphics/amide/files/patch-Makefile.in
  head/graphics/amide/files/patch-configure
  head/graphics/amide/files/patch-src-alignment_mutual_information.c
  head/graphics/amide/files/patch-src_mpeg__encode.c
Comment 10 Guido Falsi freebsd_committer 2017-01-02 22:43:29 UTC
Patch committed.

Thanks for your input!