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

Build issue of avfilter, ffmpeg 3.3.2, macOS #38

Closed
martinlindhe opened this issue Jun 19, 2017 · 6 comments
Closed

Build issue of avfilter, ffmpeg 3.3.2, macOS #38

martinlindhe opened this issue Jun 19, 2017 · 6 comments

Comments

@martinlindhe
Copy link
Contributor

Got the following errors

$ go get -u github.com/imkira/go-libav/avfilter
# github.com/imkira/go-libav/avfilter
../../imkira/go-libav/avfilter/avfilter.go:234: l.CAVFilterLink.status undefined (type *C.struct_AVFilterLink has no field or method status)
../../imkira/go-libav/avfilter/avfilter.go:242: l.CAVFilterLink.frame_count undefined (type *C.struct_AVFilterLink has no field or method frame_count)

It seems in ffmpeg 3.3, status got repurposed as "ready" in FFmpeg/FFmpeg@02aa070#diff-922654fd0bdecbcd8ccee2c39549c46f

and frame_count turned into frame_count_in and frame_count_out in commit FFmpeg/FFmpeg@183ce55#diff-922654fd0bdecbcd8ccee2c39549c46f

One way to resolve would be to remove these functions:

func (l *Link) Status() int {
	return int(l.CAVFilterLink.status)
}

func (l *Link) FrameCount() int64 {
	return int64(l.CAVFilterLink.frame_count)
}

any idea?

martinlindhe added a commit to martinlindhe/go-libav that referenced this issue Jun 19, 2017
@imkira
Copy link
Owner

imkira commented Jun 20, 2017

Yep sorry, not yet supported due to breaking changes in ffmpeg API.
Currently, only 3.0.x is supported but I'm planning on upgrading.
This is being used internally in my company and I'm not sure if we can have 3.3 support that also works with 3.2 and 3.1 without having to develop 3 different branches.
I cannot give you a specific timeline for this, but if you feel like it I welcome you to work on it if you really need it asap. I will leave this open for now until I have more updates.

@martinlindhe
Copy link
Contributor Author

There is additional warnings about deprecated functions, but I managed to use some parts of this lib with ffmpeg 3.3 to extract media info (#40).
I will continue to push some changes for ffmpeg 3.3 to my branch for now.
I hope we can avoid having multiple branches of this too.

@martinlindhe
Copy link
Contributor Author

martinlindhe commented Jun 20, 2017

I've been looking into this more.

I am currently trying to resolve api change issues using build tags.

This way we can use a avcodec_30.go naming and // +build ffmpeg30 tag in the source, to build certain parts for ffmpeg 3.0, and others for ffmpeg 3.3.
API's that has been removed in ffmpeg 3.3 will simply not be accessible using build tag "ffmpeg33".

How does this sound?

@NikkyAI
Copy link

NikkyAI commented Jun 29, 2017

how do you go get this ? and how would importing from a non master branch work if i want to try this out ?

@martinlindhe
Copy link
Contributor Author

martinlindhe commented Jun 29, 2017

@NikkyAI how you go get go-libav? as you normally would.

go get github.com/imkira/go-libav

to try out the PR, just add my repo as a remote and check it out, something like this: (you would find my branch name in the PR)

cd go/src/github.com/imkira/go-libav
git remote add martins https://github.com/martinlindhe/go-libav
git fetch martins
git checkout martins/ffmpeg33

@imkira
Copy link
Owner

imkira commented Jul 2, 2017

@NikkyAI
You would do it as you would normally do, the problem is when go getting, go will also try to build it.
Try like this

go get -u -tags=ffmpeg33 github.com/imkira/go-libav

This issue was closed.
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

3 participants