# Include ffmpeg as a dependency

**URL:** <https://discourse.julialang.org/t/include-ffmpeg-as-a-dependency/5710>\
**Category:** General Usage\
**Tags:** question\
**Created:** [September 4, 2017, 10:13am UTC](https://discourse.julialang.org/t/include-ffmpeg-as-a-dependency/5710 "2017-09-04T10:13:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [September 4, 2017, 10:13am UTC](https://discourse.julialang.org/t/include-ffmpeg-as-a-dependency/5710/1 "2017-09-04T10:13:01Z")

</div>

I’m writing a packages that needs to be able to

```julia
run(`ffmpeg ...`)

```

on all three architectures. I looked into [VideoIO’s deps/build.jl](https://github.com/kmsquire/VideoIO.jl/blob/master/deps/build.jl) file and cowered in fear.

Is there any simple way to include a build-dependency on `ffmpeg` so that my package could simply run `ffmpeg`?

Thanks!

---

<div class="post-metadata">

**Author:** ![lobingera](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lobingera/32/211_2.png) [@lobingera](https://discourse.julialang.org/u/lobingera)\
**Post date:** [September 4, 2017, 5:52pm UTC](https://discourse.julialang.org/t/include-ffmpeg-as-a-dependency/5710/2 "2017-09-04T17:52:53Z")

</div>

what are you trying to do?, according to the ffmpeg self-description it’s

> A complete, cross-platform solution to record, convert and stream audio and video.

and VideoIO seems to be an adaptation of the ffmpeg lib

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [September 4, 2017, 7:16pm UTC](https://discourse.julialang.org/t/include-ffmpeg-as-a-dependency/5710/3 "2017-09-04T19:16:33Z")

</div>

I need to extract a section from a video file (`.MTS`, `.avi`, `mpeg`, etc), so something along the lines of:

```bash
ffmpeg -i $in -c copy -ss $start -to $stop $out

```

and extract and concatenate parts into one file, so something like this:

```bash
ffmpeg -f concat -safe 0 -i $list_with_video_files -c copy -ss $start -to $stop $out

```

---

<div class="post-metadata">

**Author:** ![lobingera](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lobingera/32/211_2.png) [@lobingera](https://discourse.julialang.org/u/lobingera)\
**Post date:** [September 5, 2017, 8:42am UTC](https://discourse.julialang.org/t/include-ffmpeg-as-a-dependency/5710/4 "2017-09-05T08:42:28Z")

</div>

in any case you need to spend some effort:

1. Invent a method for command-line command dependencies OR
2. Learn to do your job with library calls to libavXXX (maybe in a c program) and contribute this to VideoIO.jl

---

<div class="post-metadata">

**Author:** ![yakir12](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yakir12/32/297_2.png) [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Post date:** [September 5, 2017, 10:24am UTC](https://discourse.julialang.org/t/include-ffmpeg-as-a-dependency/5710/5 "2017-09-05T10:24:40Z")

</div>

OK, I see. Boo.

So number 2 maybe…

Thanks for the info!
