This repository contains both frontend and backend code of the video script editing tool Pub2Vid.
The frontend application was built in Vue.js and can be run locally using the following commands:
cd Client
npm install
npm run serve
In production, the application is hosted on Google Firebase and can be accessed at pub2vid.web.app.
The backend code is located in the "Server" directory and was built using python and Flask. It provides two endpoints: /slides
and /matchingVideos
.
The /matchingVideos
endpoint is responsible for loading all suggestions and recommendations based on the user's settings. This includes:
- video recommendations and the recommended videos' outlines
- generated outlines based on the selected video style
- recommendations for audio and visual elements
The matching videos returned as video recommendations are determined by computing the weighted sum of average ratings for all videos with a duration of
The function defines a set of predefined outlines based on the video analysis results: https://twominutepapersanalysis.web.app/#/sections/orders. There are three predefined outlines for each of the dimensions as well as a list of three outlines for a "generic" input that does not focus on either on one dimension in particular. If the weight for one of the dimensions is larger than the sum of the two others, the corresponding list of outlines is scaled to the given duration and returned to the user. If none of the dimensions clearly outweights the others, the generic list of outlines is returned instead.
The two functions for determining the list of visual and audio recommendations receive the list of matching videos and determine the visual or audio elements that are present withing these videos and meet a threshhold of frac. With frac=0.6, the given element needs to be present in at least 60% of the recommended videos.
The /slides
endpoints is used for generating a presentation template based on the user's video outline and script. It uses the pptx module for composing a presentation based on the selected sections and corresponding slide templated. Moreover, it sets the slide durations according to the selected section durations and sets the slides' speaker notes to the user-written script. The presentdation is then sent to the client application as an Office Open XML document.