How to manage 360 dual fisheye video directly on kdenlive

Hello everybody.
After discovering i can use the equirectangular to equilinear vr filterer on kdenlive i was trying to speedup and increase teh quality of my 360 footage.

Original clips shooted by my lg360 or gopro360 max or samsung gear 360 are basically captured by 2 square sensors, trough a pair of fisheye lens and stamped on 2x1 frame, side by side.
In this example every sensor captures 1440x1440 and when paired they are 2880x1440.

at the moment i have to “stitch” video outside kdenlive with various tools [every camera has is own solution, and i can list them if someone interested].

So i have to loose some quality in the:
A] “dual fisheye” → “equirectangular” external transcoding
B] use kdenlive filter for “equirectangular” to “rectilinear” the clip (suppose this is lossless)
C] encode the final product.

so the question is … could be possible to integrate in the VR effects section, a filter that makes [A pass] directly (and lossless for what is possible)?

By the way, for gear360 i stich it with a script like that:


# Get the directory of the script
scriptpath=$(realpath $0)
dir=$(dirname $scriptpath)
cd $dir

# Find files matching the pattern "360*[0-9].MP4"
files=$(find . -maxdepth 1 -type f -name "360*[0-9].MP4" | sort)

# Get the first file in the list
firstFile=$(echo "$files" | head -n 1)

# Get the height of the video using ffprobe
height=$(ffprobe -v error -select_streams v:0 -show_entries stream=height -of default=nw=1 "$firstFile" | awk -F'=' '{print $2}')

# Output the height
echo $height

# Set the size based on the height

# Output the size
echo $size

# Run ffmpeg command to process the video
ffmpeg -f lavfi -i nullsrc=size=$size -vf "format=gray8,geq='clip(128-128/6*(180-195/($height/2)*hypot(X-$height/2,Y-$height/2)),0,255)',v360=input=fisheye:output=e:ih_fov=195:iv_fov=195" -frames 1 -y mergeVmap.png


for f in "$files"; do
    out=$(basename "$f")
    ffmpeg -hwaccel auto -i "$f" -i mergeVmap.png -f lavfi -i color=black:s=2x2 -lavfi "[0]format=rgb24,split[L][R];
    [1]format=gbrp[fmt];[L_fov][R_fov][fmt]maskedmerge,overlay=shortest=1" -qp 13 -b:v 30M -b:a 192k -r 24 -y "V.${out}_STITCHED.MP4"

rm -f mergeVmap.png