Development Tools

  • tools
  • linux
  • ffmpeg
  • ESP-IDF
  • Python
  • pyenv

How can I check whether an .avi video is encoded as mjpeg?

On Linux, you can run the following command:

ffprobe -v error -show_entries stream=codec_name -of default=noprint_wrappers=1 your.avi

If the output is codec_name=mjpeg, the .avi file is encoded with mjpeg.

ffmpeg_mjpeg

How can the Python 3.10 requirement be resolved when installing ESP-IDF v6.0 on Ubuntu 20.04?

ESP-IDF v6.0 requires Python 3.10 or newer, while Ubuntu 20.04 provides Python 3.8.10 by default. Running install.sh may therefore report:

RuntimeError: ESP-IDF supports Python 3.10 or newer but you are using Python 3.8.10. Please upgrade your installation as described in the documentation.

Use pyenv to install Python 3.10 and enable it only in the ESP-IDF v6.0 directory, without changing Python for other system directories.

  1. Install the dependencies:
sudo apt-get install git wget curl software-properties-common

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev \
libxmlsec1-dev libffi-dev liblzma-dev
  1. Install pyenv:
curl https://pyenv.run | bash
  1. Configure ~/.bashrc:
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
source ~/.bashrc
  1. Install Python 3.10:
pyenv install 3.10
  1. Select Python 3.10 in the ESP-IDF v6.0 directory:
cd ~/esp/idf6.0
pyenv local 3.10
python3 --version

The version should be Python 3.10.x. Then run the installer again:

./install.sh