VideoCutTool helps millions of wiki users to trim videos on-the-fly in Wikimedia Commons. Currently, a video in Wikimedia Commons cannot be edited online. They have to be downloaded, changes made and later re-uploaded. As this process tends to take a good amount of time, the VideoCutTool makes authorized users work hopefully up-to 10x faster. This tool is deployed on Wikimedia Toolforge, a hosting environment that provides services for the Wikimedia movement.
VideoCutTool has two different repositories “Front-end” and “Back-end”.
Deployed in Wikimedia toolforge:
VideoCutTool is hosted in the Wikimedia cloud services Toolforge, VideoCutTool is ddeployed in two different apps, front-end and back-end.
- Done Into GSoC and Wikimedia Hackathon 2019.
- Done Bi-Weekly_Report-1
- Done Bi-Weekly_Report-2
- Done Bi-Weekly_Report-3
- Done Bi-Weekly_Report-4
- Done Bi-Weekly_Report-5
Developed a simple and user-friendly interface using React Ant Design library. This tool can perform:
- Visual Cropping without manually entering the values to crop the video.
- Visual Trimming without manually entering the values to trim the video.
- Notify the user about the changes made.
- Validate video URLs with the regular expressions.
VideoCutTool back-end is built with Node.js using express framework. All the video encodings are performed using ffpmeg.
Tools allows users to perform multiple actions at once, i.e abilities to trim, crop, rotate and disable audio from video.
Users can choose any actions based on their requirements, and the workflow of this tool goes as following in fig: 2.1
Fig: 2.1 flow chart of the VideoCutTool
How to Use ViedoCutTool?
Step-1: Video URL
Users has to provideo commons video URL to the VideoCutTool.
VideoCutTool supports webm|ogv video extensions.
Fig: 1.1 Landing page takes Video URLs as input
Step-2: Video Settings
After fetching the video from commons, Users can perform the following features
Fig: 1.2 Video Settings – Users get to select their choice of operations.
1. Trim Video: A longer video can be trimmed into small ones, by clicking on the Trim options in the video settings, user can easily drag the time sliders and set the “Start” and “Stop” times of the video. On clicking the “Add More” button another time slider will be added to perform following sub-operations
- Generate Multiple Videos: On clicking on ‘Multiple Videos’ option, user can trim a video into more than one videos. These multiple trimmed videos can be downloaded or uploaded to the Commons by logging into VideoCutTool.
Eg: A video of 15:25 min can be trimmed to multiple videos like one part of 4 minutes and the other half with the remaining time (or upto the user).
- Prepare a Single Video: On clicking on ‘Single Video’ checkbox, all the trimmed videos from it’s parent video will be concatenated and made as a single video again.
Eg: Trim any 2 minutes from a video of 15 mins, and trim a 3 minute part from the same video. Now you can concatenate both the parts and make it into a single video of 5 mins.
- Crop Video: By clicing on the ‘Crop Video’ from the video settings, user can view the crop layer in the video player, so that users can select the required portion of the video by adjusting its height and width.
Fig: 1.4 Visual Cropping – Users can crop the required area of the video.
- Rotate Video: On clicking the ‘Rotate Video’ from the video settings, the tool pre-viewes the video by instantly rotating 90 degrees to the right.
Fig: 1.5 Rotate Video – Users can Rotate video.
- Disable Audio: On clicking the ‘Disable Audio’ from the settings, the audio will be disabled from the video, so the video is played with out audio.
- Undo: User can turn on/off each feature, and users will also receives notification on the window.
- Preview: After the user is done with editing, they can click on the ‘Preview’ button, the tool will start encoding the output video. This takes a while to process the video computation. As it is more complex to perform video encodings, users will be displayed a loading spinner on the screen and the notification is sent after the video encodings.
Fig: 1.6 Preview of the video according to the users requirements.
Once the video is encoded, user can pick either of the options
- Download video
- Upload video into Wikimedia Commons
To Do :
When the user logins and clicks on “Upload to commons Button” There are few minor errors. when clicks on the “Download Button” the browser is redirecting and playing the video in browser instead of showing the pop-up for the download. Hosted in toolforge, we need to make sure that it works properly.
How is this tool useful?
Many users upload, download, and sometimes edit re-uploaded video/audio files in the Wikimedia Commons, this tool makes the process smoother and much simple, reliable and faster without any conflicts.
Working on real-world problems, writing safe and secure codes for to make it to production, collaborating with teams from any place, proper communication with the mentors and community folks, have been a great learning experience for me. I will keep sharing this knowledge of OSS and my learnings with others to keep them on the same plate and inspire the coming generation.
I learnt a lot working with Hassan Amin, he has been so supportive, always encourages me in all the tough times throughout the GSoC period. Given an opportunity, I would love to work with him again.
My mentors, org admins, and community folks were very helpful all the time, guiding me in the best possible direction. Tons of heartful thanks to Srishti Sethi and Hassan Amin ♥