Script for processing video files
It is necessary to develop a script (possibly in Python) that automatically cuts clips from a video based on similarity to clips from another video. The script should take into account possible frame transformations (e.g. crop, scaling, stretching) when comparing.
How it should work: Two video files A and B are input, A - a large file with a long video, B - a short video file consisting of clips cut from file A. The script should find similar video segments in the long video that are in the short one, cut them out, and compile them into a new video C.
In the ideal result, video C should resemble video B but the content is taken from file A.
The quality of video B may differ from the quality of video A, it may contain a logo or the like and be slightly transformed (cropped or stretched), so it is necessary to provide the ability to adjust the similarity threshold to determine similar scenes.
How I envision the process (you can suggest your own):
1. Extracting frames from both videos
Input data: two video files, Output data: Saved frames in image formats (JPEG/PNG) in separate directories.
2. Comparing frames.
(Input data: Directories with extracted frames from both videos.
- Process: Comparing frames using alignment and keypoint algorithms (e.g. ORB) or your own variation.
- Considering transformations: The script should take into account possible crops, scaling, and stretching of frames or your own variation.
- Similarity threshold: Ability to adjust the similarity threshold to determine similar scenes.
- Output data: List of pairs of similar frames with their timestamps.)
3. Video cutting
- Input data: Original video and list of pairs of similar frames with timestamps.
- Process: Using FFmpeg (or equivalent) to cut the output video based on the timestamps of similar frames.
- Output data: Saved video clips.
Requirements:
The saved video clip may differ from video B but not by more than 80%, for testing I will provide 3-4 examples.
Technology requirements: whatever is convenient for you, but it seems that you can use:
- Python
- Libraries: OpenCV, NumPy, FFmpeg
- Preferably make the script cross-platform (Windows, MacOS)
-
8753 60 0 1 Good day!
Ready to develop a script that will automatically cut clips from a video based on similarity to clips from another video.
We write in Python. We are ranked 9th on the platform in this language.
Looking forward to collaborating!
Current freelance projects in the category Desktop Apps
Account reconciliation tool with the bank, cards, and accountantTechnical Assignment: Tool for Reconciling Accounts with Bank, Cards, and AccountantGeneral Goal A local tool (script/small application in Python) is needed, which is manually run once every 1-2 months on my computer and performs reconciliation between: Invoices I issued to… Python, Desktop Apps ∙ 15 hours 14 minutes back ∙ 31 proposals |
Add pauses of 10-30 seconds between sending emails.Hello! I am looking for an experienced 1C / BAS (BAF) programmer to promptly resolve a technical issue with email distribution.Problem essence: We use the accounting program BAF (Business Automation Framework), version 2.0. Once a month, there is a need to send about 300 emails… Web Programming, Desktop Apps ∙ 6 days 7 hours back ∙ 10 proposals |
Reverse engineering of console utilities for querying SSD controllers (Flash ID)1. Purpose of the work Extraction of the application programming interface (API) for interaction with SSD/NVMe controllers from the provided set of console utilities (Phison, Silicon Motion, Realtek, Maxiotek, Marvell, JMicron, etc.). The result should be working code in C/C++… C & C++, Desktop Apps ∙ 6 days 18 hours back ∙ 6 proposals |