Windows 10 program that Sorts videos into subfolders based on their frame height and moves associated files to the folder where the video is

Job ID: 32627741

Budget: $30 – $250 USD

I have hundreds/millions of videos for each channel I archive & need all the videos in each channel's folder moved into subfolders named after the resolution (frame height only: 360, 480, 720, 1080 etc) (ignore frame width) If I convert a 1920x1080 video down to 640x360 in the future, when I run the program again it should rescan and find the 640x360 resolution video in the 1080 folder and move it into the 360 folder.

(many of my video files do NOT have meta-data/ID3/meta-tags that contain the frame height or resolution, so it has to be checked by a package like mediainfo or ffprobe)

(1) My video file types are mp4, webm, mkv, avi, mpeg, flv.

(2) All Videos have associated files with the same name, just a different extension.

example of video file and associated files:
Title - xemMs4S54WM.mp4
Title - xemMs4S54WM.description
Title - xemMs4S54WM.html
Title - xemMs4S54WM.txt
Title - xemMs4S54WM.info.json

(3) My root folder is Vids > Channel Name > subfolders/ or mp4,mkv,description,txt,html files

BEFORE:(only ABC News folder expanded)

- Vids
- - ABC News
- - - bla bla - xemMs4S54WM.mkv
- - - bla bla - xemMs4S54WM.description
- - - bla bla - xemMs4S54WM.html
- - - bla bla - xemMs4S54WM.info.jason
- - Bloomberg
- - PBS

AFTER:(only ABC News > 480 folder expanded)

- Vids
- - ABC News
- - - 480
- - - - bla bla - xemMs4S54WM.mkv
- - - - bla bla - xemMs4S54WM.description
- - - - bla bla - xemMs4S54WM.html
- - - - bla bla - xemMs4S54WM.info.jason
- - - 1080
- - Bloomberg
- - - 360
- - - 720
- - PBS
- - - 480
- - - 720

These two main features below should be able to be turned on/off in settings.ini file to save time scanning.:
#1 scan video files for resolution & only move videos to their resolution folder (if resolution has changed move the video into the correct resolution folder)
#2 don't scan video files, just crawl file names & only move the associated files to the same folder the matching video file is in.

Example:
MoveVideosIntoFolders=1
MoveAssociatedFiles=1

(4) I only want some of the channel folders crawled, not all of them, so the program needs a settings.ini option like this:
LookOnlyInTheseChannelFolders="ABC News","Bloomberg"

(5) For scanning each video & finding the resolution to create the folder names i found some packages that can find frame height (mediainfo, ffprobe, etc)
https://www.reddit.com/r/ffmpeg/comments/dhroa5/how_to_extract_resolution_info_from_ffmpeg_not/
https://superuser.com/questions/841235/how-do-i-use-ffmpeg-to-get-the-video-resolution

(6) Over time I convert videos to lower resolutions, so If a 1080 video is now 360 & still in the 1080 folder it needs to be moved to the

correct 360 folder.

And the associated files (.html .description .html .txt info.jason) need to be moved along with it, if the "MoveAssociatedFiles=1" is true

and turned on.

(7) Make a setting in settings.ini to NOT remove videos from special subfolders that I create. But still move associated files into those

folders if I put the video file in there.

Example:
DoNotMoveVideosOutOfFolders="Star", "Keep", "Special"

- Vids
- - ABC News
- - - 480
- - - Star <- *
- - Bloomberg
- - - 360
- - - Keep <- *
- - PBS
- - - 360
- - - 480
- - - Special <- *

* If i put a video in this special subfolder in ANY channel folder, & add the folder name to "DoNotMoveVideosOutOfFolders" in settings.ini

then NEVER scan the video for resolution, NEVER move the video from here. If MoveAssociatedFiles=1 (true) the program should still scan

this folder for file names, & if it finds associated files (description, txt, html, json) in other folders (channel name root, 360, 480,

1080, etc) it should move them INTO these special folders. Just remember not to move anything OUT.

I have 6+ million files, I don't think a flatfile would work. You might have to use sqlite. Maybe scan the channel folder first, list file names in sqlite database, & sort/search/match associated files in the database then move them into the right folders maybe?