Warning, /multimedia/kdenlive-test-suite/README.md is written in an unsupported language. File is not indexed.

0001 # Kdenlive Test Suite
0002 
0003 This repository is a work in progress. It hosts scripts to automatically render project files and compare them with a reference render to test for regressions.
0004 
0005 To make these scripts useful, we refactored the Kdenlive rendering code to make it possible to render a project file from the command line (see [Kdenlive task 1615](https://invent.kde.org/multimedia/kdenlive/-/issues/1615)).
0006 
0007 The repository currently only contains very basic assets and project files to this repository, as well as reference renderings, but you can easily add project files locally and run the scripts on your computer.
0008 
0009 The testing is a 2 steps process:
0010 
0011 - First script will open all the project files in the "projects" folder and render them in the "renders" folder. After all renderings are over, it will call the second script for comparison.
0012 
0013 - Second script will compare the renders in "renders" folder produced in step 1 with "reference" renderings.
0014 
0015 **Before cloning this repository, you must have git-lfs installed (git with large file support) since the reference renders are stored using lfs**
0016 
0017 # Testing with your own project files
0018 1. First, you need to save your project file or a copy of it in the **projects** subfolder
0019 2. You need to render your full project in the **reference** subfolder
0020 3. Call the render script: `start-renders.py`, with an optional path to a specific Kdenlive executable (see below)
0021 4. This will output a web page presenting the results
0022 
0023 # The scripts
0024 **For step 1:**
0025 `start-renders.py` will loop all project files in the `projects` folder and check if a rendered file already exists. In that case it will abort. Otherwise, it will render the project in the `renders` folder. When all renders are done, it will call the `compare-renders.py` script (step 2).
0026 `start-renders.py` takes one optional argument, the path to the kdenlive binary, for example if you want to test rendering with a new Appimage, you can do:
0027 `start-renders.py /path/to/Appimage`
0028 
0029 **For step 2:**
0030 `compare-renders.py` will check all existing renders in the `renders` folder and check if there is a matching name reference render. It will then pass the 2 files to the second script: `pnsr.py`
0031 TODO: currently only video is compared, no check is made on audio
0032 
0033 `pnsr.py` takes 3 arguments:
0034 
0035 The reference render file
0036 The newly rendered file
0037 An incremental integer number describing the count of processed files
0038 
0039 This script will then compare the 2 files using the FFmpeg pnsr filter, and detect inconsistensies. It will then output some html data that is then collected by the `compare-renders.py` script and displayed in an HTML page like below:
0040 
0041 ![Sample test web view](pics/pnsr.jpg "Sample results view")