This is a basic video storage API which has the following functionalities.
Version 1.0
- Upload video files to the server > > POST /v1/files
- Download Video files > > GET /v1/files/{fileid}
- Delete uploaded files. > > DELETE /v1/files/{fileid}
- List uploaded video files. > > GET /v1/files
Note: The application only accepts the following media format.
- video/mpeg
- video/mp4
Additional Notes:
- Uploaded Videos saved on the video-store/ directory
- Maximum File Upload Size : 5gb
- This version of the API is unauthorized
- List API not paginated.
Asynchronous Video Conversion Service
- Convert mp4 to webm
- Convert mpeg to webm
- Convert video files in the server > > POST /v1/file-conversion/{fileid}
- Download Converted Video files > > GET /v1/file-conversion/{fileid}
- Reconvert failed conversion files. > > PUT /v1/files/{fileid}
- List uploaded video files. > > GET /v1/files
- Conversion Adapter built on top of Jave2 library
- Asynchronous Web service using thread executor > Note:- Since the scope of this application is limited(batch jobs are note used for video conversion)
- Configurable thread pool paramters are defined.
- Mongo db for storing all details of the converted and non converted files which are uploaded on the server
- Click v1.0 to view Open API Specification YAML File
- Click v2.0 to view open API Specification YAML File
- After deployment Click swagger-url or open-api for api spec visualization.
Install these on the build machine
- Open JDK15
- gradle 6.7.1 or greater
- Docker 20.10.6 or greater
Build the application with all test cases
sh ./build.sh
Note: build process may take half an hour to download all the dependency for ffmpeg (This is for first time build only. Subsequent build will be faster) Additional build time of nearly 5 minutes for each video conversion tasks.
Run the application
sh ./run.sh
Click here to view the complete documentation of the client application.
- Spring Boot Framework 2.6.3
- MongoDB (Latest will be downloaded from docker repo)
- MongoDB Test container used for running tests
- FFMEG Jave2 Wrapper for all video conversion
Mongo Express(this can be removed from the docker-compose) This is to manage the mongo db. Click here after deployment