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

FFmpeg binaries are built disabling some avdevices such as x11grab and avfoundation #39

Closed
robertoandrade opened this issue Mar 4, 2015 · 10 comments
Labels

Comments

@robertoandrade
Copy link

From what I could gather ffmpeg builds automatically include x11grab and avfoundation devices (Trying to invoke the libs to replicate the following examples) and I'm wondering what in particular in the presets' build script makes it so those are not included? I noticed you guys build it with --disable-libxcb, is that what causes these components not to be included?

@robertoandrade
Copy link
Author

After building 0.11-SNAPSHOT (with ffmpeg 2.5.4) I was able to call into the ffmpeg functions on my Mac running OSX and pass in format=avfoundation and it worked just fine. So I guess this was only a problem on the stable 0.10 release. Trying to recompile it on linux to confirm x11grab is accessible too.

@saudet
Copy link
Member

saudet commented Mar 5, 2015

Thanks for the feedback! Maybe it's just my build environment that don't have the right files installed... I'll have to check that out. But that might not be that important, because eventually, I'd like to move the builds to Travis CI. Would you have any experience or interest in trying this out?

@robertoandrade
Copy link
Author

Yeah for linux it doesn't get included, I need to remove the --disable-libxcb in order to bake it in and in my tests also included the --enable-x11grab.

@saudet
Copy link
Member

saudet commented Apr 11, 2015

This should all be fixed with the -0.11 release. Let me know if you still have problems! Thanks for reporting.

@saudet saudet closed this as completed Apr 11, 2015
@artpej
Copy link

artpej commented May 24, 2015

It seems that avfoundation input device is not really enabled. I think it is due to this issue : https://trac.ffmpeg.org/ticket/3570 .

@saudet
Copy link
Member

saudet commented May 24, 2015

It still doesn't work with version 0.11??

@artpej
Copy link

artpej commented May 24, 2015

There's no problem on Linux with x11grab, but on my OSX Mavericks avfoundation seems not works:

public class Devices {
  public static void main(String[] args){
    avdevice_register_all();
    avcodec_register_all();
    av_register_all();
    System.err.println(avdevice.avdevice_configuration().getString());
    AVInputFormat fmt = null;
    while ((fmt = av_input_video_device_next(fmt)) != null) {
      System.err.println("format : " + fmt.name().getString() + " (" + fmt.long_name().getString() + ")");
    }
  }
}

I tried multiple ways to find the avfoundation device but nothing works.

For exemple:

AVInputFormat fmt = av_find_input_format("avfoundation");

here fmt is always ǹull.

The version i use is 2.6.1-0.11:

        <dependency>
            <groupId>org.bytedeco.javacpp-presets</groupId>
            <artifactId>ffmpeg</artifactId>
            <version>2.6.1-0.11</version>
            <classifier>macosx-x86_64</classifier>
        </dependency>  
`̀`

@saudet
Copy link
Member

saudet commented May 25, 2015

@artpej Could you try to rebuild the binaries on your machine to see if that changes anything? Thanks!

@artpej
Copy link

artpej commented May 26, 2015

All right, after rebuilding the binaries from the master on my machine everything works well.

I don't do anything special:

  • brew install yasm
  • sh cppbuild.sh -platform macosx-x86_64 install ffmpeg
  • mvn install -projects .,ffmpeg

Hope this will help.
Tks

@saudet
Copy link
Member

saudet commented May 30, 2015

So I guess it's a problem with my build environment...

Incidentally, I would like to, for example, make the build process more automated via a cloud solution. I'm aware of Travis CI, and I believe they support builds for Mac OS X. Is this something you would be interested in helping out to set up? It would help a lot!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants