# Record video

**URL:** https://discourse.julialang.org/t/record-video/81289
**Category:** New to Julia
**Tags:** question, video, glmakie
**Created:** [May 18, 2022, 11:20pm UTC](https://discourse.julialang.org/t/record-video/81289 "2022-05-18T23:20:03Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![suavesito](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/suavesito/32/34386_2.png) [@suavesito](https://discourse.julialang.org/u/suavesito)
#### Post date: [May 19, 2022, 1:44am UTC](https://discourse.julialang.org/t/record-video/81289/2 "2022-05-19T01:44:28Z")

</div>

Hi!

Foremost, I will recommend you to read [this PSA on quoting code](https://discourse.julialang.org/t/psa-how-to-quote-code-with-backticks/7530).

Second, what version of Julia and GLMakie are you running? That code looks outdated. You can look at the [documentation for animations](https://makie.juliaplots.org/v0.15.2/documentation/animation/index.html). You probably want something base on `Observable`.

Here is an example of how to use them:

```julia
julia> using GLMakie

julia> range = -2π:0.1:2π
-6.283185307179586:0.1:6.216814692820414

julia> mul = Observable(1.0)
Observable{Float64} with 0 listeners. Value:
1.0

julia> xy = lift(mul) do m
           [cos(m*x)*cos(m*y) for x=range, y=range]
       end
Observable{Matrix{Float64}} with 0 listeners. Value:
[1.0 0.9950041652780258 … 0.9861923022788637 0.9977982791785807; 0.9950041652780258 0.9900332889206209 … 0.9812654485325952 0.9928134438899342; … ; 0.9861923022788637 0.9812654485325952 … 0.9725752570740857 0.9840209821530128; 0.9977982791785807 0.9928134438899342 … 0.9840209821530128 0.9956014059317367]

julia> fig, ax, plot = contour(xy)

julia> framerate = 30
30

julia> multplier_iterator = LinRange(1.0, 10.0, 60)
60-element LinRange{Float64, Int64}:
 1.0,1.15254,1.30508,1.45763,1.61017,1.76271,1.91525,2.0678,2.22034,2.37288,…,8.62712,8.77966,8.9322,9.08475,9.23729,9.38983,9.54237,9.69492,9.84746,10.0

julia> record(fig, "cosx_cosy.mp4", multplier_iterator; framerate=framerate) do m
           mul[] = m # update multiplier and so the figure
       end
"cosx_cosy.mp4"

```

---

_[View the full topic](https://discourse.julialang.org/t/record-video/81289)._
