.. _full_installation: Full Installation ================= Python and FFmpeg Support ------------------------- CutCutCodec supports these versions. .. csv-table:: Python versions :file: supported-python-versions.csv :header-rows: 1 .. csv-table:: FFmpeg versions :file: supported-ffmpeg-versions.csv :header-rows: 1 .. _Debian Ubuntu Mint: .. _RHEL CentOS Fedora: .. _Arch Manjaro: .. _OpenSUSE: .. _Linux Installation: .. _FreeBSD Installation: .. _macOS Installation: .. _Windows Installation: .. _virtual_environement: Virtual Environement -------------------- It is preferable to install CutCutCodec in a virtual environment. Please refer to the `pyenv main page `_. It is possible to use ``python3-venv`` or ``conda`` as well. Install pyenv ^^^^^^^^^^^^^ First install the `python dependencies `_ then install pyenv. .. tab:: Linux .. tab:: Debian Ubuntu Mint .. code:: shell sudo apt install libedit-dev libncurses5-dev sudo apt install build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl git libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev .. tab:: RHEL CentOS Fedora .. code:: shell sudo dnf install openssl11-devel --allowerasing sudo dnf install gcc make patch zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel xz-devel .. tab:: Arch Manjaro .. code:: shell yay -S ncurses5-compat-libs .. code:: shell curl https://pyenv.run | bash CONTENT=$'export PYENV_ROOT="$HOME/.pyenv"\ncommand -v pyenv > /dev/null || export PATH="$PYENV_ROOT/bin:$PATH"\neval "$(pyenv init -)"\neval "$(pyenv virtualenv-init -)"' grep -q "$CONTENT" ~/.bashrc || echo "$CONTENT" >> ~/.bashrc source ~/.bashrc .. tab:: macOS You could install dependencies by using `Homebrew `_. .. code-block:: shell brew install ncurses brew install openssl readline sqlite3 xz zlib tcl-tk brew install pyenv .. tab:: Windows .. warning:: Windows is crap, so be prepared for a tedious and buggy installation! You should forget Microchiotte-Windaube and go straight to Linux before you pull out all your hair! Good luck with the `official guide `_. If it fails, `this debug link `_ may help you. Configure pyenv ^^^^^^^^^^^^^^^ Create the virtual environement. .. code-block:: shell pyenv update env PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations --with-lto" PYTHON_CFLAGS='-march=native -mtune=native' \ pyenv install -v 3.14 pyenv virtualenv 3.14 cutcutcodec pyenv activate cutcutcodec pip install uv .. _dependencies: Dependencies ------------ gcc ^^^ As part of CutCutCodec is written in C, **gcc** must be installed. You can test the correct installation of gcc with the ``gcc --version`` command. .. tab:: Linux It is installed by default on many linux systems. .. tab:: Debian Ubuntu Mint .. code-block:: shell sudo apt install build-essential sudo apt-get install manpages-dev .. tab:: RHEL CentOS Fedora .. code-block:: shell sudo dnf group install "Development Tools" sudo dnf install man-pages .. tab:: Arch Manjaro .. code-block:: shell sudo pacman -S base-devel sudo pacman -S gcc-multilib lib32-gcc-libs wget https://ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.gz tar -xzvf gcc-15.2.0.tar.gz cd gcc-15.2.0 mkdir build cd build \../configure make -j4 sudo make install .. tab:: OpenSUSE .. code-block:: shell sudo zypper addrepo http://download.opensuse.org/distribution/leap/15.6/repo/oss/ oss zypper search gcc sudo zypper install gcc sudo zypper install gcc-c++ .. tab:: FreeBSD It is install by default on FreeBSD. .. tab:: macOS You could install gcc by using `Homebrew `_. .. code-block:: shell brew install gcc .. tab:: Windows .. warning:: I see that you insist on using Windows, this step is the most critical, good luck! Without gcc, the installation will fail! It is not too late to listen the voice of reason! You can `install ubuntu `_ for example. ffmpeg ^^^^^^ CutCutCodec has hard dependency on the FFmpeg package. You should install it first, please refer to the `FFmpeg download page `_. .. tab:: Linux .. tab:: Debian Ubuntu Mint .. code:: shell sudo apt install ffmpeg sudo apt install python-dev-is-python3 pkg-config sudo apt install libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev .. tab:: RHEL CentOS Fedora .. code:: shell sudo dnf install ffmpeg .. tab:: Arch Manjaro .. code:: shell sudo pacman -S ffmpeg .. tab:: OpenSUSE .. code:: shell sudo zypper install ffmpeg .. tab:: FreeBSD .. code:: shell sudo pkg install ffmpeg .. tab:: macOS You could install the FFmpeg by using `Homebrew `_. .. code:: shell brew install ffmpeg pkg-config .. tab:: Windows .. warning:: I refuse to believe that you have gone through the previous steps. As you are stubborn and stupid, I must remind you that the game is not yet won! It is still not too late to listen to the voice of wisdom, which is telling you to get rid of this massive piece of Windows shit for ever. It is important to configure your environement variable to hook ffmpeg to CutCutCodec. You can try to follow `this guide `_ for example. pyav (optional) ^^^^^^^^^^^^^^^ Although it is installed automatically, it is better to install **av** manually to avoid redundancy with ffmpeg. Please refer to the `PyAv installation guide `_. .. tab:: Linux .. code:: shell uv pip -v install av --no-binary av .. tab:: FreeBSD .. code:: shell uv pip -v install av --no-binary av .. tab:: macOS On **MacOS** you may have issues with regards to Python expecting gcc but finding clang. Try to export the following before installation: .. code:: shell export ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future uv pip -v install av --no-binary av .. tab:: Windows .. warning:: I see that you insist on using Windows, this step is the most critical, good luck! On **Windows** you must build from source in order to indicate the location of ffmpeg, pleas follow the `PyAv windows installation guide `_ and good luck! cuda (optional) ^^^^^^^^^^^^^^^ If you have a GPU, please install CUDA or ROC then follow the `PyTorch installation guide `_. Without CUDA or ROC, the software is not able to use the GPU (CPU only). .. tab:: Linux Follow the official `NVIDIA CUDA Installation Guide for Linux `_. .. tab:: FreeBSD It is not well supproted, you can try to follow `this bsd link `_. .. tab:: macOS Follow the `NVIDIA CUDA Installation Guide for Mac OS X `_. .. tab:: Windows .. warning:: Windows is crap, so be prepared for a tedious and buggy installation! You should forget Microchiotte-Windaube and go straight to Linux before you pull out all your hair! It is important to configure your environement variable to hook cuda to PyTorch. Good luck with the `official guide `_. pandoc (optional) ^^^^^^^^^^^^^^^^^ Pandoc is required to compile documentation locally. .. tab:: Linux .. tab:: Debian Ubuntu Mint .. code:: shell sudo apt install pandoc .. tab:: macOS brew install pandoc Installation ------------ Basic Installation ^^^^^^^^^^^^^^^^^^ .. note:: The following instructions will install a minimal version of CutCutCodec. See :ref:`building_from_source` for a complete installation including the documentation and the tests. To install the lastest development version, use ``uv pip``: .. code:: shell uv pip install git+https://framagit.org/robinechuca/cutcutcodec.git .. _building_from_source: Building From Source (For devellopers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ To install the lastest development version from `Framagit `_ source, clone cutcutcodec using ``git`` and install it using ``uv pip``: .. code:: shell git clone https://framagit.org/robinechuca/cutcutcodec.git ~/cutcutcodec_git cd ~/cutcutcodec_git pyenv activate cutcutcodec # to be sure to be in a virtual env uv pip install -e .[doc,test] cutcutcodec test # to test if the installation is ok .. pip uninstall typing_extensions to debug attribute '__default__' of 'typing.ParamSpec' objects is not writable You can now also compile documentation locally :ref:`documentation` and run the benchmark :ref:`testing` (after the previous step). .. _documentation: Build Documentation ------------------- You can compile the documentation yourself after :ref:`full_installation` by simply typing ``cutcutcodec doc`` or: .. code:: shell cd docs/ && make clean && make html && cd - firefox docs/build/html/index.html Platform Support ---------------- The tests were successful for theses configurations. .. note:: Contributors please test CutCutCodec on your platform then update this document and send a pull request. +----------------------------------+------------------------+------------------------+-------------------------+ | Operating system | Tested Python versions | Tested FFmpeg versions | Tested architecture | +==================================+========================+========================+=========================+ | Linux Mint 21.3 | 3.9, 3.10, 3.11 | 4.4.2 | x86-64 2 cpu t6600 | +----------------------------------+------------------------+------------------------+-------------------------+ | Ubuntu 24.10 | 3.13 | 7.0.2 | x86-64 22 cpu core i7 | +----------------------------------+------------------------+------------------------+-------------------------+