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

libfdk-aac.so.1: cannot open shared object file #28

Closed
ssfrr opened this issue Apr 18, 2020 · 5 comments
Closed

libfdk-aac.so.1: cannot open shared object file #28

ssfrr opened this issue Apr 18, 2020 · 5 comments

Comments

@ssfrr
Copy link

ssfrr commented Apr 18, 2020

I'm getting an error trying to run FFMPEG (through Plots.jl) - it seems that FFMPEG isn't finding a library it's looking for.

The error I get in Julia is just

failed process: Process(`/home/sfr/.julia/artifacts/3c41de0860295a9627f2819e7d2e27275796b308/bin/ffmpeg -v 0 -framerate 10 -loop 0 -i /tmp/tmp.9vaJqzM4Lz/jl_eWbBeU/%06d.png -pix_fmt yuv420p -y /home/sfr/Dropbox/projects/papers/Dissertation/plot_gen/slf_anim.mp4`, ProcessExited(1)) [1]

pipeline_error at process.jl:525 [inlined]
#run#565(::Bool, ::typeof(run), ::Cmd) at process.jl:440
run at process.jl:438 [inlined]
(::FFMPEG.var"#4#6"{Cmd})(::String) at FFMPEG.jl:114
(::FFMPEG_jll.var"#11#12"{FFMPEG.var"#4#6"{Cmd}})() at x86_64-linux-gnu.jl:162
withenv(::FFMPEG_jll.var"#11#12"{FFMPEG.var"#4#6"{Cmd}}, ::Pair{String,String}, ::Vararg{Pair{String,String},N} where N) at env.jl:161
#ffmpeg#10(::Bool, ::Bool, ::typeof(FFMPEG_jll.ffmpeg), ::FFMPEG.var"#4#6"{Cmd}) at x86_64-linux-gnu.jl:161
ffmpeg at x86_64-linux-gnu.jl:145 [inlined]
#exe#2 at FFMPEG.jl:113 [inlined]
#exe at none:0 [inlined]
ffmpeg_exe at FFMPEG.jl:125 [inlined]
#buildanimation#269(::Int64, ::Int64, ::Bool, ::Bool, ::typeof(Plots.buildanimation), ::Animation, ::String, ::Bool) at animation.jl:95
#buildanimation at none:0 [inlined]
#mp4#268 at animation.jl:65 [inlined]
(::Plots.var"#kw##mp4")(::NamedTuple{(:fps,),Tuple{Int64}}, ::typeof(mp4), ::Animation, ::String) at none:0
top-level scope at defense.jl:289

Which isn't very informative as to what the actual error is, but if I run the same command from the terminal I get

$ /home/sfr/.julia/artifacts/3c41de0860295a9627f2819e7d2e27275796b308/bin/ffmpeg -v 0 -framerate 10 -loop 0 -i /tmp/tmp.9vaJqzM4Lz/jl_eWbBeU/%06d.png -pix_fmt yuv420p -y /home/sfr/Dropbox/projects/papers/Dissertation/plot_gen/slf_anim.mp4
/home/sfr/.julia/artifacts/3c41de0860295a9627f2819e7d2e27275796b308/bin/ffmpeg: error while loading shared libraries: libfdk-aac.so.1: cannot open shared object file: No such file or directory

I'm not actually sure that the error I'm getting when it's invoked from Julia is the same as the error I get when it's invoked from the shell, but it's not clear how to find out what the error from Julia is.

@giordano
Copy link
Member

giordano commented Apr 20, 2020

How are you running ffmpeg in Julia?

@ssfrr
Copy link
Author

ssfrr commented Apr 20, 2020

Whoops, sorry for the lack of MWE:

using Plots

anim = @animate for i in 1:10
    plot(randn(1000), size=(100,100))
end

mp4(anim, "/tmp/test.mp4")

Which gives:

failed process: Process(`/home/sfr/.julia/artifacts/3c41de0860295a9627f2819e7d2e27275796b308/bin/ffmpeg -v 0 -framerate 20 -loop 0 -i /tmp/tmp.3PASOxlEEw/jl_5eRu3l/%06d.png -pix_fmt yuv420p -y /tmp/test.mp4`, ProcessExited(1)) [1]

pipeline_error at process.jl:525 [inlined]
run(::Cmd; wait::Bool) at process.jl:440
run at process.jl:438 [inlined]
(::FFMPEG.var"#4#6"{Cmd})(::String) at FFMPEG.jl:114
(::FFMPEG_jll.var"#11#12"{FFMPEG.var"#4#6"{Cmd}})() at x86_64-linux-gnu.jl:162
withenv(::FFMPEG_jll.var"#11#12"{FFMPEG.var"#4#6"{Cmd}}, ::Pair{String,String}, ::Vararg{Pair{String,String},N} where N) at env.jl:161
ffmpeg(::FFMPEG.var"#4#6"{Cmd}; adjust_PATH::Bool, adjust_LIBPATH::Bool) at x86_64-linux-gnu.jl:161
ffmpeg at x86_64-linux-gnu.jl:145 [inlined]
#exe#2 at FFMPEG.jl:113 [inlined]
exe at FFMPEG.jl:108 [inlined]
ffmpeg_exe at FFMPEG.jl:125 [inlined]
buildanimation(::Animation, ::String, ::Bool; fps::Int64, loop::Int64, variable_palette::Bool, show_msg::Bool) at animation.jl:95
buildanimation at animation.jl:75 [inlined]
#mp4#266 at animation.jl:65 [inlined]
mp4(::Animation, ::String) at animation.jl:65
top-level scope at defense.jl:418

I think the actual issue here is JuliaPlots/Plots.jl#2158, so maybe the real issue is that ffmpeg is run with -v 0 so it doesn't give useful information when something goes wrong.

@giordano
Copy link
Member

I want to see how the ffmpeg executable is called. The wrapper in FFMPEG_jll must be used, otherwise this kind of errors occurs.

@giordano
Copy link
Member

Looking at the stacktrace it seems the wrapper is used?

@ssfrr
Copy link
Author

ssfrr commented Apr 20, 2020

Sorry, maybe I wasn't clear - when I run it from within Julia I get the ProcessError with the stacktrace above, but don't know what the underlying FFMPEG error is because ffmpeg is run with -v 0, which swallows the error (Also I'm not sure if there'd need to be something else done to display STDOUT).

The libfdk-aac issue was from trying to run the JLL executable from within the shell, but that's probably just because the paths weren't set up correctly due to bypassing the wrapper.

It seems that the arguments are setup within Plots though, so actually the issue is there.

Sorry for the noise, I'll close this.

@ssfrr ssfrr closed this as completed Apr 20, 2020
sje30 added a commit to sje30/catam-julia that referenced this issue Sep 22, 2021
I was getting errors in the generation of animated gif, similar to
what was reported here:

JuliaIO/FFMPEG.jl#28

which eventually I solved by upgradsing all the packages in the Pluto
package.
This was done via the GUI by going to the 'Using Plots' chunk, and
selecting to update packages.  This could be seen to update several
packages and now code is working agin.

https://github.com/fonsp/Pluto.jl/wiki/%F0%9F%8E%81-Package-management#updating-packages
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

2 participants