FFMPEG.jl
FFMPEG.jl copied to clipboard
FFMPEG.ffmpeg_exe failed because of ERROR: failed process
FFMPEG.ffmpeg_exe
failed with ERROR: failed process
. Although the use of ffmpeg through FFMPEG.jl failed, I can use it with appropriate LD_LIBRARY_PATH.
Do you have any advice or workaround?
> uname -srm
Linux 5.11.16-arch1-1 x86_64
> julia
...
(@v1.6) pkg> st
Status `~/.julia/environments/v1.6/Project.toml`
[c87230d0] FFMPEG v0.4.0
[98e50ef6] JuliaFormatter v0.13.10
[2b0e0bc5] LanguageServer v3.2.0
[91a5bcdd] Plots v1.12.0
[295af30f] Revise v3.1.15
[b3cc710f] StaticLint v4.5.0
[cf896787] SymbolServer v5.1.1
...
julia> import FFMPEG
julia> FFMPEG.ffmpeg_exe(`-version`)
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 8.1.0 (GCC)
configuration: --enable-cross-compile --cross-prefix=/opt/x86_64-linux-gnu/bin/x86_64-linux-gnu- --arch=x86_64 --target-os=linux --cc=cc --cxx=c++ --dep-cc=cc --ar=ar --nm=nm --objcc=objc --sysinclude=/workspace/destdir/include --pkg-config=/usr/bin/pkg-config --pkg-config-flags=--static --prefix=/workspace/destdir --sysroot=/opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root --extra-libs=-lpthread --enable-gpl --enable-version3 --enable-nonfree --disable-static --enable-shared --enable-pic --disable-debug --disable-doc --enable-avresample --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libvpx --enable-encoders --enable-decoders --enable-muxers --enable-demuxers --enable-parsers --enable-openssl --disable-schannel --extra-cflags=-I/workspace/destdir/include --extra-ldflags=-L/workspace/destdir/lib --enable-nvenc --enable-cuda-llvm
libavutil 56. 51.100 / 56. 70.100
libavcodec 58. 91.100 / 58.134.100
libavformat 58. 45.100 / 58. 76.100
libavdevice 58. 10.100 / 58. 13.100
libavfilter 7. 85.100 / 7.110.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 9.100
libswresample 3. 7.100 / 3. 9.100
libpostproc 55. 7.100 / 55. 9.100
Process(`/home/akira/.julia/artifacts/7f40eeb66d90d3026ae5fb68761c263b57adb840/bin/ffmpeg -version`, ProcessExited(0))
julia> FFMPEG.ffmpeg_exe(`-v 0 -framerate 15 -i /home/akira/materials-for-FFMPEG/%06d.png -i /home/akira/matrials-for-FFMPEG/palette.bmp -lavfi paletteuse=dither=sierra2_4a -loop 0 -y anim_fps15.gif`)
ERROR: failed process: Process(`/home/akira/.julia/artifacts/7f40eeb66d90d3026ae5fb68761c263b57adb840/bin/ffmpeg -v 0 -framerate 15 -i /home/akira/materials-for-FFMPEG/%06d.png -i /home/akira/matrials-for-FFMPEG/palette.bmp -lavfi paletteuse=dither=sierra2_4a -loop 0 -y anim_fps15.gif`, ProcessSignaled(11)) [0]
Stacktrace:
[1] run
@ ./process.jl:438 [inlined]
[2] (::FFMPEG.var"#4#6"{Cmd})(command_path::String)
@ FFMPEG ~/.julia/packages/FFMPEG/aazvf/src/FFMPEG.jl:114
[3] (::JLLWrappers.var"#2#3"{FFMPEG.var"#4#6"{Cmd}, String})()
@ JLLWrappers ~/.julia/packages/JLLWrappers/bkwIo/src/runtime.jl:49
[4] withenv(::JLLWrappers.var"#2#3"{FFMPEG.var"#4#6"{Cmd}, String}, ::Pair{String, String}, ::Vararg{Pair{String, String}, N} where N)
@ Base ./env.jl:161
[5] withenv_executable_wrapper(f::Function, executable_path::String, PATH::String, LIBPATH::String, adjust_PATH::Bool, adjust_LIBPATH::Bool)
@ JLLWrappers ~/.julia/packages/JLLWrappers/bkwIo/src/runtime.jl:48
[6] ffmpeg(f::Function; adjust_PATH::Bool, adjust_LIBPATH::Bool)
@ FFMPEG_jll ~/.julia/packages/JLLWrappers/bkwIo/src/products/executable_generators.jl:7
[7] ffmpeg(f::Function)
@ FFMPEG_jll ~/.julia/packages/JLLWrappers/bkwIo/src/products/executable_generators.jl:7
[8] #exe#2
@ ~/.julia/packages/FFMPEG/aazvf/src/FFMPEG.jl:113 [inlined]
[9] ffmpeg_exe(args::Cmd)
@ FFMPEG ~/.julia/packages/FFMPEG/aazvf/src/FFMPEG.jl:125
[10] top-level scope
@ REPL[2]:1
julia> exit()
# Use ffmpeg with appropriate LD_LIBRARY_PATH
> LD_LIBRARY_PATH=/home/akira/.julia/artifacts/8a08e0194be328a41baaccd251d9b94e0918be75/lib/:${HOME}/.julia/artifacts/dae09e29891a3b2652c65300c5921ea90d2f3f08/lib:${LD_LIBRARY_PATH} /home/akira/.julia/artifacts/7f40eeb66d90d3026ae5fb68761c263b57adb840/bin/ffmpeg -v 16 -framerate 15 -i /home/akira/materials-for-FFMPEG/%06d.png -i /home/akira/materials-for-FFMPEG/palette.bmp -lavfi paletteuse=dither=sierra2_4a -loop 0 -y anim_fps15.gif
Same issue here, any news?
Can you please try
using FFMPEG.FFMPEG_jll
run(`$(ffmpeg()) -v 0 -framerate 15 -i /home/akira/materials-for-FFMPEG/%06d.png -i /home/akira/matrials-for-FFMPEG/palette.bmp -lavfi paletteuse=dither=sierra2_4a -loop 0 -y anim_fps15.gif`)
Thank you. But it doesn't work for me.
julia> using FFMPEG.FFMPEG_jll
julia> run(`$(ffmpeg()) -v 0 -framerate 15 -i /home/akira/materials-for-FFMPEG/%06d.png -i /home/akira/matrials-for-FFMPEG/palette.bmp -lavfi paletteuse=dither=sierra2_4a -loop 0 -y anim_fps15.gif`)
ERROR: failed process: Process(setenv(`/home/akira/.julia/artifacts/7f40eeb66d90d3026ae5fb68761c263b57adb840/bin/ffmpeg -v 0 -framerate 15 -i /home/akira/materials-for-FFMPEG/%06d.png -i /home/akira/matrials-for-FFMPEG/palette.bmp -lavfi paletteuse=dither=sierra2_4a -loop 0 -y anim_fps15.gif`,["PATH=/home/akira/.julia/artifacts/8b5aa917c93435f8e8dfa8de20c145b04a3056e3/bin:/home/akira/.julia/artifacts/f73f822883915d7ae67651995e7596024a9ed531/bin:/home/akira/.julia/artifacts/b5a0dfeba3b35b629beca780ed0c01067f33c3e1/bin:/home/akira/.julia/artifacts/dae09e29891a3b2652c65300c5921ea90d2f3f08/bin:/home/akira/.julia/artifacts/e6e5f41352118bbeb44677765ebccab8c151c72a/bin:/home/akira/.julia/artifacts/7f40eeb66d90d3026ae5fb68761c263b57adb840/bin:/home/akira/.opam/default/bin:/home/akira/node_modules/.bin:/bin:/home/akira/.gem/ruby/2.7.0/bin:/.bin:/home/akira/.go/bin:/home/akira/.cargo/bin:/home/akira/public-tools:/home/akira/pfn-tools:/home/akira/.local/bin:/home/akira/.cabal/bin:/var/lib/snapd/snap/bin:/home/akira/.cargo/bin:/usr/local/bin:/usr/bin:/var/lib/snapd/snap/bin:/usr/local/sbin:/opt/android-sdk/emulator:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/akira/.cache/dein/repos/github.com/junegunn/fzf/bin", "OPAMKEEPBUILDDIR=1", "KONSOLE_DBUS_SESSION=/Sessions/2", "LD_LIBRARY_PATH=/home/akira/.julia/artifacts/a720905290c81768185376a3ab5842c296b4cef8/lib:/usr/bin/../lib/julia/../../lib:/home/akira/.julia/artifacts/5beb0f80bee903a80fd8c22ef235125b8536f16e/lib:/home/akira/.julia/artifacts/8b5aa917c93435f8e8dfa8de20c145b04a3056e3/lib:/home/akira/.julia/artifacts/9dc820aa11732195fab75ed545a0705dca8ee456/lib:/home/akira/.julia/artifacts/8a08e0194be328a41baaccd251d9b94e0918be75/lib:/home/akira/.julia/artifacts/f73f822883915d7ae67651995e7596024a9ed531/lib:/home/akira/.julia/artifacts/102f816ca06bb09d0c48c880204bbd3dcd223491/lib:/home/akira/.julia/artifacts/2c115da09a12e51cc1763e8ae70196d023426e52/lib:/home/akira/.julia/artifacts/b5a0dfeba3b35b629beca780ed0c01067f33c3e1/lib:/home/akira/.julia/artifacts/dae09e29891a3b2652c65300c5921ea90d2f3f08/lib:/home/akira/.julia/artifacts/e6e5f41352118bbeb44677765ebccab8c151c72a/lib:/home/akira/.julia/artifacts/60094fa9668e77dd28cae5f95f7d3163db63203a/lib:/home/akira/.julia/artifacts/7f40eeb66d90d3026ae5fb68761c263b57adb840/lib:/usr/bin/../lib/julia:/usr/bin/../lib:/home/akira/.local/lib:", "CAML_LD_LIBRARY_PATH=/home/akira/.opam/default/lib/stublibs:/usr/lib/ocaml/stublibs:/usr/lib/ocaml", "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus", "MANPATH=:/home/akira/.opam/default/man", "PYENV_ROOT=/home/akira/.pyenv", "XDG_SESSION_DESKTOP=gnome", "XDG_SESSION_TYPE=x11" … "LANGUAGE=", "ANDROID_HOME=/opt/android-sdk", "KONSOLE_DBUS_SERVICE=:1.100", "MAIL=/var/spool/mail/akira", "WINDOWID=65012107", "JOURNAL_STREAM=8:25695", "GIO_LAUNCHED_DESKTOP_FILE_PID=3094", "SHELL_SESSION_ID=c3f5c484642a441589e026d655601ef8", "WINDOWPATH=2", "OPENBLAS_MAIN_FREE=1"]), ProcessSignaled(11)) [0]
Stacktrace:
[1] run(::Cmd)
@ Base ./process.jl:438
[2] top-level scope
@ REPL[2]:1
There is a workaround here which worked for me: https://github.com/JuliaPlots/Plots.jl/issues/3575
But this is not a solution, only a workaround. The bug has to be fixed somehow.