Skip to content

Commit

Permalink
Use FFMPEG.jl to provide ffmpeg
Browse files Browse the repository at this point in the history
Closes #121
  • Loading branch information
rdeits committed Nov 18, 2019
1 parent 4cb06be commit 6c9710f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
10 changes: 0 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@ branches:
only:
- master

addons:
apt:
sources:
- trusty-media
packages:
- ffmpeg

before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ffmpeg; fi

script:
- julia --color=yes -e "using Pkg; if VERSION >= v\"1.1.0-rc1\"; Pkg.build(verbose=true); else Pkg.build(); end"
- $TESTCMD --check-bounds=yes --color=yes -e 'using Pkg; Pkg.test("MeshCat", coverage=true)'
Expand Down
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Cassette = "7057c7e9-c182-5462-911a-8362d720325c"
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
CoordinateTransformations = "150eb455-5306-5404-9cee-2592286d6298"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
FFMPEG = "c87230d0-a227-11e9-1b43-d7ebe4e7570a"
GeometryTypes = "4d00f742-c7ba-57c2-abde-4428a4b178cb"
JSExpr = "97c1335a-c9c5-57fe-bc5d-ec35cebe8660"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
1 change: 1 addition & 0 deletions src/MeshCat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ using WebIO
import Mux
import AssetRegistry
import Cassette
import FFMPEG
using GeometryTypes, CoordinateTransformations
using Rotations: rotation_between, Rotation, Quat
using Colors: Color, Colorant, RGB, RGBA, alpha, hex
Expand Down
4 changes: 2 additions & 2 deletions src/animations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ function convert_frames_to_video(tar_file_path::AbstractString, output_path::Abs

mktempdir() do tmpdir
run(unpack_cmd(tar_file_path, tmpdir, ".tar", nothing))
cmd = `ffmpeg -r $framerate -i %07d.png -vcodec libx264 -preset slow -crf 18`
cmd = `$(FFMPEG.ffmpeg) -r $framerate -i %07d.png -vcodec libx264 -preset slow -crf 18`
if overwrite
cmd = `$cmd -y`
end
cmd = `$cmd $output_path`

cd(tmpdir) do
try
run(cmd)
FFMPEG.@ffmpeg_env run(cmd)
catch e
println("""
Could not call `ffmpeg` to convert your frames into a video.
Expand Down

0 comments on commit 6c9710f

Please sign in to comment.