-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e14adb7
commit 02f8936
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
02f8936
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BrennoCaldato
I keep seeing this change go by... avresample is long-deprecated in favor of libswresample, so
FFmpegUtilities.h
configures OpenShot to use that wherever possible, in which case libavresample isn't a dependency. What situations are you encountering where you need libavresample? Linking with any modern FFmpeg, it should be entirely superfluous.02f8936
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ferdnyc
My main desktop machine is still running an older version of ubuntu. Sorry about that, I imagined libavresample was deprecated in the newer ffmpeg versions but I needed to include it as a dependency for now.
I will make sure to remove this once we merge to develop
Still need to find time to upgrade my system though
02f8936
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BrennoCaldato Hmmm. Strange that the fallback logic isn't working, then. If your ffmpeg is old enough that swresample isn't present at all, then avresample should be picked up... unless there's something broken with the CMake find module. What version of ffmpeg, and what ubuntu, out of curiosity? I'll try to play around with it in a VM.
02f8936
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem might be that our version check logic is out-of-whack.
FFmpegUtilities.h
only setsUSE_SW
ifLIBAVFORMAT_VERSION_MAJOR > 57
So, that's probably all wrong. Most likely you're using an FFmpeg where libavformat < 57, which prevents you from using swresample, but CMake tries not to include libavresample because swresample is available.
I think what I want to do is move the check logic out of
FFmpegUtiltiies.h
and into theCMakeLists.txt
file (including the version test, to replace the simple "exists" check), then have CMake defineUSE_SW
appropriately. That way it knows which library the code is going to be using (because it's telling it) and it'll only have to link with whichever one it chooses.02f8936
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ferdnyc
I'm on ubuntu 16.04. These are the ffmpeg and libav versions:
02f8936
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BrennoCaldato Yeah, that's what I figured. You're not getting avresample because swresample exists. But the code isn't using swresample because it's pre-3.0 FFmpeg. Moving the logic to the CMake code will allow it to select the correct resampler target (FFmpeg::avresample) to link with. See #693.
02f8936
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ferdnyc I will test the pull request.
Totally unrelated quick question: I am adding more audio effects to libopenshot but I'll probably need the juce DSP module to use FFT and other methods. This is currently not imported by libopenshot-audio and I tried to add it, but it didn't work very well. Do you have some advice for me when adding new modules to libopenshot-audio? Will try to get more info on the errors
02f8936
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#693 and #694 are merged, so the
develop
branch should now do the right thing WRT avresample/swresample on all ffmpeg versions.Regarding the JUCE module, you'd probably want to do it the same way we generated the existing
JuceAudioLibrary
tree: By running their ProJucer application, and having it generate the necessary files. TheOpenShotLibrary.jucer
file in the root of the-audio
repo is the config file for that application, that'd be the starting point.If the module you need is
juce_dsp
, that should pretty much do it. ProJucer will handle the dependencies required, but at leastjuce_dsp
is a non-gui module.juce_audio_processors
, OTOH, brings in the whole of JUCE's GUI framework, but I don't think we need audio_processors anyway.I'll start a branch in
libopenshot-audio
for enablingjuce_dsp
, we can work it from there.02f8936
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha! According to ProJucer,
juce_dsp
requires a C++ standard greater than the currently-configured C++11.I'd actually really like to move to C++14 or C++17, TBH, since both bring significant feature enhancements to the STL. But we'll have to see how compatible those later standards are with our current build environment(s).
Or we drag them kicking and screaming into the more recent past (never mind "the future"...), which is typically how it goes.
02f8936
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BrennoCaldato Check out OpenShot/libopenshot-audio#129, or the
dsp-module
branch in that repo. Should have what you need.