# Ffmpeg breaks portability of Slicer folder

**URL:** <https://discourse.slicer.org/t/ffmpeg-breaks-portability-of-slicer-folder/16314>\
**Category:** Support\
**Created:** [March 2, 2021, 7:32pm UTC](https://discourse.slicer.org/t/ffmpeg-breaks-portability-of-slicer-folder/16314 "2021-03-02T19:32:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 2, 2021, 7:32pm UTC](https://discourse.slicer.org/t/ffmpeg-breaks-portability-of-slicer-folder/16314/1 "2021-03-02T19:32:18Z")

</div>

ffmpeg is still installed under appdata/roaming/NA-MIC/ffmpeg in the latest stable, breaking the portability of the Slicer folder.  
Can this be changed to the Slicer folder like the rest of the extensions?

```
Export to video...

Start ffmpeg:

C:\Users\amaga\AppData\Roaming\NA-MIC\ffmpeg\ffmpeg-3.2.4-win64-static\bin\ffmpeg.exe -nostdin -y -r 6.2 -start_number 0 -i C:\Users\amaga\Documents\SlicerCapture\tmp-P7XSU-%05d.png -codec libx264 -preset slower -pix_fmt yuv420p C:\Users\amaga\Documents\SlicerCapture\SlicerCapture.mp4

Video export succeeded to file: C:\Users\amaga\Documents\SlicerCapture\SlicerCapture.mp4
```

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 2, 2021, 7:51pm UTC](https://discourse.slicer.org/t/ffmpeg-breaks-portability-of-slicer-folder/16314/2 "2021-03-02T19:51:06Z")

</div>

ScreenCapture module is fully prepared for both portable and shared Slicer.ini and if it does not find ffmpeg then it downloads it to the proper location (same folder as Slicer.ini).

Make sure that if you don’t want a shared Slicer.ini then copy/create a new one in the same location as the revisionUserSettings ini file is. You can get that folder by calling `qt.QFileInfo(slicer.app.slicerRevisionUserSettingsFilePath).absoluteDir().path()`. If you previously specified ffmpeg path with an absolute path then remove that path (or replace with a relative path).

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 2, 2021, 8:08pm UTC](https://discourse.slicer.org/t/ffmpeg-breaks-portability-of-slicer-folder/16314/3 "2021-03-02T20:08:08Z")

</div>

Here is what I did:

- uninstalled all previous slicers
- Deleted everything in c:\users\murat\appdata\local\na-mic
- Deleted everything in c:\users\murat\appdata\roaming\na-mic (including slicer.ini)  
(I am assuming this equivalent to installed Slicer to a brand new computer. If not, let me know what else I should do).

Installed the new slicer stable **c:\users\murat\desktop**  
went to screen capture and choose video output. Said yes to download ffmpeg, it downloaded and installed at  
**c:\users\murat\appdata\roaming\na-mic** (it also created slicer.ini in that location too).

We have bunch of offline computers that I want to carry slicer in its entirety (including ffmpeg).

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 2, 2021, 8:36pm UTC](https://discourse.slicer.org/t/ffmpeg-breaks-portability-of-slicer-folder/16314/4 "2021-03-02T20:36:31Z")

</div>

Slicer creates a shared Slicer.ini by default. Make sure that if you don’t want a shared Slicer.ini then have a Slicer.ini in the same folder as the revisionUserSettings ini file is.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [March 2, 2021, 8:49pm UTC](https://discourse.slicer.org/t/ffmpeg-breaks-portability-of-slicer-folder/16314/5 "2021-03-02T20:49:06Z")

</div>

This worked, thank you!

It is a bit obscure. Would it be possible to make this as an install time option (if they choose to install for everyone there is a shared Slicer.ini, if not it is saved into the correct place).

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 2, 2021, 9:17pm UTC](https://discourse.slicer.org/t/ffmpeg-breaks-portability-of-slicer-folder/16314/6 "2021-03-02T21:17:03Z")

</div>

Main reason why creating a fully portable application is not made very easy or widely advertised is that it would require a little effort, and most users don’t need it (it is better if Slicer instances use same DICOM database, reuse downloaded ffmpeg, etc.).

I agree that we should have a module that makes it easy to create a portable package. Probably the main use case would be to bundle a portable data viewer with data sets (similarly to viewers supplied with DICOM DVDs), but it could be useful for training courses, and other use cases, too. I’ve submitted a feature request to keep track of this:

> <https://github.com/Slicer/Slicer/issues/5500>
>
> Is your feature request related to a problem? Please describe.
> Recent Slicer versions can be made fully portable by having Slicer.ini file...
