Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrapping latest versions of ffmpeg #41

Closed
maxruby opened this issue Sep 26, 2014 · 10 comments
Closed

Wrapping latest versions of ffmpeg #41

maxruby opened this issue Sep 26, 2014 · 10 comments

Comments

@maxruby
Copy link
Contributor

maxruby commented Sep 26, 2014

VideoIO v. 0.0.8 uses older versions of the libav/ffmpeg libraries. We need to update the wrapper to the latest versions (FFmpeg 2.4.1 "Fresnel", see http://ffmpeg.org/download.html)

libavutil      54.  7.100
libavcodec     56.  1.100
libavformat    56.  4.101
libavdevice    56.  0.100
libavfilter     5.  1.100
libavresample   2.  1.  0
libswscale      3.  0.100
libswresample   1.  1.100
libpostproc    53.  0.100
@maxruby
Copy link
Contributor Author

maxruby commented Sep 26, 2014

@kmsquire. I created a pull request to start a WIP as you suggested to work on support for AVOptions, but inevitably this may also involve updating wrappers for the new ffmpeg/libav library versions (as of today, libavcodec/libavformat are v56 for both ffmpeg and libav). However, I think that the pull was not on the right branch? Can you suggest where/how I should pull and how to proceed so that I can get feedback from you as I contribute to the code?

@ihnorton
Copy link
Member

@maxruby somehow the pull request was sent to my old repository, which I have now deleted. You will need to resubmit the PR here, I think (I don't see it on this repo).

@kmsquire
Copy link
Collaborator

@maxruby, just to clarify: Isaiah did some early work wrapping libav (and almost all of the heavy lifting in Clang.jl that made it possible). This package is a fork of that early work, and GitHub still thought that his was the main, upstream repo.

Isaiah, thanks for taking care of this. Cheers!

@maxruby
Copy link
Contributor Author

maxruby commented Sep 26, 2014

@kmsquire . Thanks for the explanation! I just forked VideoIO.jl to my repo so that I can work on the changes and later submit a pull request to you. As I looked into both libav and ffmpeg libraries, it looks like we have to update both sets of libraries. As you mentioned, one issue that is confusing (but not a problem) is that the way AVOptions are organized in these different libraries is not quite the same. The other issue is that I also have not updated ffmpeg to the most recent release "Fresnel" FFmpeg 2.4.1, and I dont want to do this unless I can keep both the old and new versions of the libraries. In the case of libav, I downloaded the most recent version which is not included in VideoIO right now.
Do you know if its possible to switch between the Homebrew or MacPorts installations of these libraries from VideoIO? I am just trying to figure out how to test different libraries on the same system.

@kmsquire
Copy link
Collaborator

Do you know if its possible to switch between the Homebrew or MacPorts installations of these libraries from VideoIO? I am just trying to figure out how to test different libraries on the same system.

That's a little challenging. Are you are talking about using Julia's Homebrew.jl (which is self contained), or do you actually have both Homebrew and MacPorts installed on your system?

Assuming the former, I believe the Homebrew.jl version will always take precedence, and that the MacPorts libraries will be used if the Homebrew one isn't installed.

One way to do this (without Homebrew or MacPorts) would be to

  1. compile different versions of the libraries from source
  2. set LD_LIBRARY_PATH (or the OSX equivalent--I forget if it's different there) to point to the compiled libraries
  3. restart Julia, and run Pkg.build("VideoIO")

This might even work with the MacPorts or Homebrew libraries installed (and might allow switching between them), but I don't know if LD_LIBRARY_PATH takes precedence over the other paths in BinDeps. @staticfloat, do you know?

@maxruby
Copy link
Contributor Author

maxruby commented Sep 27, 2014

I am talking about switching between the libraries installed in my Homebrew and MacPorts as you describe in the latter part of your message.

@kmsquire
Copy link
Collaborator

I think I got that. It's just a matter of making BinDeps find and use the right version. On a Mac, you can try setting DYLD_LIBRARY_PATH to the directory of the libraries you wish to use, and then do Pkg.build("VideoIO"). Not sure if that will force those libraries to be used or not.

@staticfloat
Copy link
Contributor

The short answer is that this will be difficult. Your best bet is to just move the files into directories that aren't searched, e.g. via brew unlink ffmpeg to force usage of non-system-homebrew, etc...

@maxruby
Copy link
Contributor Author

maxruby commented Sep 27, 2014

OK, thanks. I will try moving the files into different directories and then compile for each . . .

@maxruby
Copy link
Contributor Author

maxruby commented Nov 16, 2014

FFmpeg libraries (2.4.2) have been wrapped. Closing this issue now.

@maxruby maxruby closed this as completed Nov 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants