Page MenuHomePhabricator

Make Movie Maker work on Linux and Mac
Closed, ResolvedPublic

Description

See this discussion on mailing list
http://article.gmane.org/gmane.comp.lib.mitk.user/5072/match=movie

We also need to flip the image upside down in the OpenCV generator.
http://article.gmane.org/gmane.comp.lib.mitk.user/5088/match=movie

Event Timeline

FYI. Im trying to get round to doing this myself. If someone can provide guidance on how they want it done, then I could look at it in the week of 30th June.

Hi there,

I just added an extra commit here:
https://github.com/NifTK/MITK/commits/bug-17864-trac-3560-movie-maker-linux-mac

I dont know if I should do another pull request?

Thanks

Matt

Hi Matt, You shouldn't have to do another pull request. In fact, you can (and even should) interactively rebase your topic branch, squashing micro-commits as you see necessary to get a nice set of logical commits ready to be merged into master. Looking forward to getting this enhancement in MITK master...

Hi there,

I just noticed this got updated to "has patch".

However, caution: its not finished.
Its not clear to me what to do with OpenCV 4 digit video format codes.
Can someone please advise?
This needs code review.

M

Hi Matt, first thanks for your contribution.

I am into testing it under linux ( Ubuntu 14.04.1 LTS, clang-3.4 ). It compiles, however even with OpenCV built with the WITH_FFMPEG option, the

mitk::MovieGeneratorOpenCV::InitGenerator() returns false as a consequence of
the line 126 call to cvCreateVideoWriter returning a null pointer

sorry. im away. Can't look at this right now.

Ok, so currently the opencv fails at opening the writer for initialization

cvCreateVideoWriter_FFMPEG_proxy::open(...)
{

icvInitFFMPEG::Init();  
--> the constructor of icvInitFFMPEGreturns fails, the implementation is empty for my system due to ifdef guards since the HAVE_FFMPEG is not defined

in file: cap_ffmpeg.cpp, lines 148-158


The OpenCV cmake config output is the following:

  • Video I/O:
  • DC1394 1.x: NO
  • DC1394 2.x: NO
  • FFMPEG: NO
  • codec: YES (ver 54.35.0)
  • format: YES (ver 54.20.4)
  • util: YES (ver 52.3.0)
  • swscale: NO
  • gentoo-style: YES
  • GStreamer: NO
  • OpenNI: NO
  • OpenNI PrimeSensor Modules: NO
  • PvAPI: NO
  • GigEVisionSDK: NO
  • UniCap: NO
  • UniCap ucil: NO
  • V4L/V4L2: NO/YES
  • XIMEA: NO
  • Xine: NO

I recognized the missing lib just after posting the previous comment

  • have now installed libswscale-dev pack, the HAVE_FFMPEG guard variable is now defined.

With all dependencies met, it works now fine on linux.

I will extend the error message with the list of required libraries for the movie-maker to work under linux. This could also be done in CMake as a warning message.

User hering has pushed new remote branch:

bug-17864-moviemaker-linux-support

I have tested the 'installer behaviour' - if the ffmpeg libs are not available on the target system, the view is not available ( it is not loaded at all ). After installing the libs, the view is again made available.

I have extended the documentation in the user manual so that this behaviour is explained.

Compared to the current state, we loose the functionality of the movie maker to 'play' (without recording) the selected movement if the libs needed are not available.

User hering has pushed new remote branch:

bug-17864-moviemaker-linux-support-master

Movie Maker is replaced by a new implementation based on using FFmpeg/Libav as external command line tools. See T18250.