Zedtube is an online video downloader and converter that you can use to download download videos from most sites like youtube and and convert videos to your selected format.
I wanted to make the site look good and beautiful and i learned of bootstrap which has some amazing content so i thought of searching some themes of bootstrap and found out Startbootstrap which has amazing themes and after scrolling through its catalog i found out this great theme called Freelancer So I chose this and then i removed lot of stuff then made my own css file and modified it to according to my needs. First Off all after removing stuff from the theme i used Python-Flask to make a layout with all the navbar and its buttons so that it stays in every page of my site and the i made a templates for Download, Convert, Waiting, and Error. In Convert I Used DropZoneJS Which Is A Beautiful JS Plugin To Upload Videos And It Also Shows The File Size And Progress. In both Download and Convert i have made a progress bar by using SocketIO which receives progress from backend and then i manipulate it by js to change all the value for progress.
For Backend I Used Python And Flask Web Framework For The Website As It Was Thought In CS50 And Python Is Easy And I Also Copied Some Of Code From The Finance Pset To Get Started.
First Off To Download The Video From Sites I Used Youtube-Dl API Which Is Very Easy To Use And Is Able To Dowload Videos From Most Sites You Can Find The Supported Sites Here. I Couldn't Find A Way To Show Progress Bar Of Downloading Video So I Searched On Google And I Found This Stackoverflow Question And The Marked Answer Worked So I Copied That And Modified It A Little. But Sending Progress In Real Time Was Tricky So I Found Out SocketIO With Which You Can Send And Receive Messages Instantly So I Used Flask-SocketIO On The Server Side To Send Progress And On The Client Side I Used SocketIO As JS Script And Changed Progress Variables.
To Convert Video To Other Formats I Used FFMPEG And I Couldnt Find A Good API As Of Them Were Complicated So I Directly Used Subprocess To Run Shell Commands Of FFMPEG To Turn Video In Other Formats. For Progress Bar In This I Again Searched And I Found This Stackoverflow Question Which Uses Threading Which I Also Learned From This And As Before I Used Flask-SocketIO And SocketIO To Send And Receive Progress And Finally Used SendFromDirectory
To Send Files To The User In Both Download And Convert.
- Copy The Link Of The Video Like In Youtube Copy The URL or Share The Video And Copy Its Link
- Paste That Link In Input Field
- Choose The Extension You Want From The Extension Dropdown
- Click The Download Button Then It Will Start Donwloading A Video Showing A Progress Bar With Percentage And Then It Will Convert It To Your Selected Format.
- Press The Upload Box Or Drag A Video File Here And It Will Be Selected And It Will Show Its Name And Size
- Choose A Format From The Dropdown Extension
- Click On Upload And Once You Click It Will Be Start Uploading And Will Show You A Progress Bar And A Tick Mark Once Completed Then It Will Redirect You To Show The Progress
- After The Progress Completed It Will Show You A Download Button Once Clicked Will Start Downloading Your Video With The Changed Format
- I Want To Add Music Support Where If You Give It A Video Link Or Video File It Will Extract The Audio And You Will Be Able To Download The Audio With Format Of Your Liking