Skip to content

Latest commit

 

History

History
173 lines (95 loc) · 4.31 KB

readme.md

File metadata and controls

173 lines (95 loc) · 4.31 KB

Video Subtitles Extractor and Search app


Features

  • Seamless Subtitle Integration: Effortlessly extract subtitle streams from videos and hard-code them directly into the video as closed captions.

  • Multilingual Support: Enjoy robust support for multiple languages, making your content accessible to a global audience.

  • Precise Subtitle Search: Locate subtitles with pinpoint accuracy, including exact timestamps where each line is spoken.


Technologies Used:

  • Python3
  • Django Framework
  • Celery
  • Redis
  • Postgres
  • Docker

Prerequisites:

  • Docker => Will be used to spin-up and down the container.

ffmpeg and all other required stuff required to run this webapp will be installed by docker.

Steps to use this webapp

First we Need to build this app using docker


docker-compose up --build

Spin up container


docker-compose up

After use you can spin down this container using this command


docker-compose down


Pro tip: Use **Docker Desktop ** to visualize the containers and check the errors if any occurs. Sometime You may need to reload a particular container. Use Docker Desktop to reload that container instantly.

Sometimes Django will not be able to connect to postgres when you first spin the backend container. Postgres may take a longer time to setup so, just reload /refresh that container after db setup is completed it will work.


Working Demo


Available paths

  • /list-videos/
  • /login/
  • /logout/
  • /register/
  • /search-subtitles/
  • /upload-video/

Excluding admin paths. Login and register is not required to use this app. Run command python3 manage.py show_urls to check all paths.


Video Storage Paths

  • assets/output-videos => Stores all encoded videos.
  • assets/subtitles => Store all subtitle files of each video.
  • assets/videos => location where input video will be stored.

Screenshots of working app

Docker View

Picture

Backend Container

Picture

Celery

Picture

Redis

Picture

Postgres

Picture


Upload Video

pic_1

pic_2

Upload any video you want. Subtitles extraction and video encoding with closed captions task is given to celery.


List Input Video with subtitles

pic_3

  • It will list video with input file along with subtitles.[Refresh the page if subtitles is not available]

  • Input filename may get change if a duplicate file with same name exists in system.It will assign some random string after that name. Check videos folder for that name.


Search Subtitles

pic_1 pic_2 pic_3 pic_4 pic_5

We can use any word to search here. It will provide the timestamp of that word in all videos uploaded to website along with a button to play from that timestamp.


If you want to delete all models data at any moment of time you can't directly use admin panel as there will a lot of data it may take a longer time so you can use shell or dbshell to quickly delete model. Don't directly run delete command on postgres db.

You can use this command on backend container or in vscode


Bugs:

  • Chrome Video Loading Issue :

    Sometimes, when we click on js button it will not forward/back video to that particular timestamp because video is not loaded fully yet.[Issue only for larger Videos]


Upcoming Features:

  • Website Design :

    User Interface work is still in progress.

  • Subtitle Language Selection option

    As of now, logic is to select first subtitle stream and encode it on video as closed captions. Users doesn't have an option to choose an language out of available subtitles tracks.