# Issue when saving animation in .avi

**URL:** https://discourse.paraview.org/t/issue-when-saving-animation-in-avi/6386
**Category:** ParaView Support
**Created:** [February 3, 2021, 11:59pm UTC](https://discourse.paraview.org/t/issue-when-saving-animation-in-avi/6386 "2021-02-03T23:59:24Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Kihiro\_Bando](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kihiro_bando/32/5178_2.png) [@Kihiro\_Bando](https://discourse.paraview.org/u/Kihiro_Bando)
#### Post date: [February 3, 2021, 11:59pm UTC](https://discourse.paraview.org/t/issue-when-saving-animation-in-avi/6386/1 "2021-02-03T23:59:24Z")

</div>

Hi,

I built Paraview 5.9.0 using the following cmake command line

```bash
cmake \
    -DPARAVIEW_USE_PYTHON=ON \
    -DPARAVIEW_USE_MPI=ON \
    -DPARAVIEW_ENABLE_XDMF2=ON \
    -DPARAVIEW_ENABLE_XDMF3=ON \
    -DPARAVIEW_ENABLE_FFMPEG=ON \
    -DQT5_DIR=$QT5_DIR \
    -DVTK_SMP_IMPLEMENTATION_TYPE=TBB \
    -DCMAKE_BUILD_TYPE=Release \
    ..

```

where `QT5_DIR` points to a Qt installation.

I also installed the following libraries for ffmpeg support viat apt

```auto
libavcodec-dev
libavformat-dev
libswscale-dev
libavdevice-dev
libavfilter-dev
libavresample-dev

```

When I try to save an animation in `.avi` format, I got this error

```auto
Warning: In /home/kihiro/Softwares/paraview/Remoting/Animation/vtkSMSaveAnimationProxy.cxx, line 326
vtkSMSaveAnimationProxy (0x55aa0a0df3e0): The requested resolution '(1517, 792)' has been changed to '(1516, 792)' to match format specification.

Generic Warning: In /home/kihiro/Softwares/paraview/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx, line 114
Could not open the avi media file format.

ERROR: In /home/kihiro/Softwares/paraview/VTK/IO/FFMPEG/vtkFFMPEGWriter.cxx, line 753
vtkFFMPEGWriter (0x55aa053e5a80): Error initializing video stream.

```

Looks like it fails on a call to `av_guess_format`. Any idea why this happens?

Thanks.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 4, 2021, 7:08am UTC](https://discourse.paraview.org/t/issue-when-saving-animation-in-avi/6386/2 "2021-02-04T07:08:10Z")

</div>

Can you try saving png images instead ?

---

<div class="post-metadata">

### Author: ![Kihiro\_Bando](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kihiro_bando/32/5178_2.png) [@Kihiro\_Bando](https://discourse.paraview.org/u/Kihiro_Bando)
#### Post date: [February 4, 2021, 3:38pm UTC](https://discourse.paraview.org/t/issue-when-saving-animation-in-avi/6386/3 "2021-02-04T15:38:41Z")

</div>

Thanks for your response. I can, I was just wondering if something is wrong in my set-up. Or if it is a known issue in this version. I spent some time to figure out how to correcly enable ffmpeg so I am a little bit disappointed it doesn’t work 🙂

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 4, 2021, 3:39pm UTC](https://discourse.paraview.org/t/issue-when-saving-animation-in-avi/6386/4 "2021-02-04T15:39:33Z")

</div>

Well, it si supposed to work. Which os are you using ?

---

<div class="post-metadata">

### Author: ![Kihiro\_Bando](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kihiro_bando/32/5178_2.png) [@Kihiro\_Bando](https://discourse.paraview.org/u/Kihiro_Bando)
#### Post date: [February 4, 2021, 3:43pm UTC](https://discourse.paraview.org/t/issue-when-saving-animation-in-avi/6386/5 "2021-02-04T15:43:14Z")

</div>

popos 18.04 (basically ubuntu)

---

<div class="post-metadata">

### Author: ![Kihiro\_Bando](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kihiro_bando/32/5178_2.png) [@Kihiro\_Bando](https://discourse.paraview.org/u/Kihiro_Bando)
#### Post date: [February 4, 2021, 5:53pm UTC](https://discourse.paraview.org/t/issue-when-saving-animation-in-avi/6386/6 "2021-02-04T17:53:55Z")

</div>

I managed to solve the problem by building the most recent ffmpeg. The ones from apt seemed to be the problem.
