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

Animate using Reel: Decoder (codec svg) not found for input stream #134

Open
raunakbh92 opened this issue Apr 8, 2020 · 3 comments
Open

Comments

@raunakbh92
Copy link

I tried to run the animation example provided in the tutorial. However, ran into the following error.

(v1.3) pkg> st
    Status `~/.julia/environments/v1.3/Project.toml`
  [3b7a836e] PGFPlots v3.2.1
  [71555da5] Reel v1.3.0
julia> using PGFPlots
[ Info: Precompiling PGFPlots [3b7a836e-365b-5785-a47d-02c71176b4aa]

julia> using Reel
[ Info: Precompiling Reel [71555da5-176e-5e73-a222-aebc6c6e4f2f]

julia> Reel.extension(m::MIME"image/svg+xml") = "svg"

julia> frames = Frames(MIME("image/svg+xml"), fps=10)
Frames{MIME{Symbol("image/svg+xml")}}("/tmp/jl_t4K0iF", 0x0000000000000000, 10.0, nothing)

julia> for frame in 1:10
           t = frame/5
           ax = Axis(Plots.Linear(x -> sin(x+t*π), (0,6)), xlabel="x", ylabel="y")
           push!(frames, ax)
       end
julia> write("output.gif",frames)
Decoder (codec svg) not found for input stream #0:0
ERROR: failed process: Process(`/home/raunakbh/.julia/packages/FFMPEG/guN1x/deps/usr/bin/ffmpeg -y -r 10.0 -f image2 -i /tmp/jl_t4K0iF/%d.svg yo.gif -loglevel error`, ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error at ./process.jl:525 [inlined]
 [2] #run#565(::Bool, ::typeof(run), ::Cmd) at ./process.jl:440
 [3] run at ./process.jl:438 [inlined]
 [4] #4 at /home/raunakbh/.julia/packages/FFMPEG/guN1x/src/FFMPEG.jl:133 [inlined]
 [5] withenv(::FFMPEG.var"#4#6"{String,Cmd}, ::Pair{String,String}) at ./env.jl:161
 [6] #exe#2 at /home/raunakbh/.julia/packages/FFMPEG/guN1x/src/FFMPEG.jl:132 [inlined]
 [7] #exe at ./none:0 [inlined]
 [8] ffmpeg_exe at /home/raunakbh/.julia/packages/FFMPEG/guN1x/src/FFMPEG.jl:144 [inlined]
 [9] #write#6 at /home/raunakbh/.julia/packages/Reel/Mu9ck/src/Reel.jl:68 [inlined]
 [10] write(::String, ::Frames{MIME{Symbol("image/svg+xml")}}) at /home/raunakbh/.julia/packages/Reel/Mu9ck/src/Reel.jl:66
 [11] top-level scope at REPL[8]:1

I see on the Reel.jl page that some recent changes have taken place in terms of dependency on FFMPEG.jl. Could that be the potential cause here?

@mykelk
Copy link
Member

mykelk commented Apr 8, 2020

I think @MaximeBouton might have some ideas.

@MaximeBouton
Copy link
Member

I think FFMPEG needs a flag when compiled to support svg:
https://stackoverflow.com/questions/48216871/ffmpeg-support-for-svg-rasterization

Here is the build recipe for FFMPEG.jl:
https://github.com/JuliaPackaging/Yggdrasil/blob/master/F/FFMPEG/build_tarballs.jl#L69
the svg flag is not there.

You could:

  • open an issue in FFMPEG.jl to mention it. Maybe it is just a matter of adding the flag + dependency on librsvg in the build recipe, the maintainer will most likely know.
  • use another installation of ffmpeg than the one in FFMPEG.jl that has the svg flag enabled
  • use another format than svg

The example would work with an older version of Reel.jl (v1.1) that is using ImageMagick for gifs instead of ffmpeg.

@raunakbh92
Copy link
Author

Reverted Reel to v1.1.1 and tried rerunning the animation script from the tutorial. While the animation shows up fine, the axes labels don't show up. Wondering what could be causing that?
output

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