JuliaIO / VideoIO.jl

Reading and writing of video files in Julia via ffmpeg
https://juliaio.github.io/VideoIO.jl/stable
Other
128 stars 53 forks source link

Wrapping latest versions of ffmpeg #41

Closed maxruby closed 9 years ago

maxruby commented 10 years ago

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 commented 10 years ago

@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 commented 10 years ago

@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 commented 10 years ago

@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 commented 10 years ago

@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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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

maxruby commented 9 years ago

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