media-center-setup/utilities/video-tools
2023-03-15 11:18:37 +01:00
..
README.md First commit. 2023-03-15 11:18:37 +01:00
video-info.sh First commit. 2023-03-15 11:18:37 +01:00

video-tools

Use case

I bought a machine named Vero 4K+, running OSMC, to read my video library on my TV. It works fine on a number of files, but was struggling on some others, when no hardware decoder was available. I found this thread that gave a first hint. I then decided to made a quick list of all the format of my files, to be able to test them. That's how this little project started.

Set up

  • On a Linux machine with apt: sudo apt install -y ffmpeg mediainfo
  • If you are on Windows, you can:
    • install WSL
    • install Debian/Ubuntu/etc and type in: sudo apt install -y ffmpeg mediainfo
    • If you access a networked drive, you can access it like this for example:
      • sudo mkdir /mnt/multimedia
      • sudo mount -t drvfs //Vero/Multimedia /mnt/multimedia/ (this need to be done at each reboot)

video-info.sh

video-info.sh generates a CSV file with the format, the format profile, and the codec ID. It can be opened with any spreadsheet software. If it is interrupted, an option to resume the operation is available, so that it is possible to launch it multiple time on huge video libraries.

It generates a file named videoinfo-date_hour.csv in the folder where the videos are located.

By default, only the following file extensions are taken into account: mkv, mp4, and avi. You can easily add more by modifying the script. You can know which file extensions you have in your library by typing the following command (more on this thread):
find . -type f | sed -e 's/.*\.//' | sed -e 's/.*\///' | sort | uniq -c | sort -rn