Track:- Video

Problem Statement

  1. One of the key challenges faced by users in the current video content ecosystem is the lack of trust and transparency in transactions. Users often hesitate to buy or sell videos due to concerns about fraudulent activities, copyright infringement, or unfair pricing. ThetaTube aims to address this problem by leveraging blockchain technology to provide a secure and transparent platform for video content transactions.
  2. Limited Adoption and Accessibility of Blockchain-Based Video Platforms.
  3. Monetization and Fair Compensation for Content Creators: One of the key motivations for content creators is the ability to monetize their work. However, in the current video content landscape, many creators struggle to receive fair compensation for their efforts. ThetaTube aims to provide a platform where creators can sell their videos directly to viewers, eliminating intermediaries and enabling more direct revenue streams

What it does

  1. ThetaTube is a decentralized blockchain-based video content platform that allows users to buy, sell, and watch videos uploaded and transcoded via the Theta Video API.
  2. ThetaTube provides a secure and transparent environment for video content transactions, addressing trust and transparency issues in the current ecosystem.
  3. ThetaTube aims to increase the adoption and accessibility of blockchain-based video platforms by offering a user-friendly interface and removing entry barriers for both content creators and viewers.
  4. ThetaTube enables content creators to monetize their work directly and provide fair compensation for their efforts.
  5. Content creators get their money instantly as users pay for their videos. This is an improvement compared to the approach used by major video sites like Youtube, and Udemy. I achieve this through blockchain transactions via the Theta Network RPC APIs.

How we built it

ThetaTube is built using React (Javascript) on the Frontend, Java on the Backend, and a SQL Database called Supabase.
ThetaTube contains the following features:-

  1. Users can register and log in.
  2. Theta Address is created for the user upon registration which is attached to their profile.
  3. Users can upload videos and set the title of the video and price in Theta while uploading videos.
  4. Users can see and watch their uploaded videos on their profile page.
  5. Users can buy access to videos uploaded by other content creators.
  6. Users can watch purchased videos.
  7. Content creators get funds instantly when users pay.
  8. It charges the content buyer in ThetaWei (i.e. the price of video in Theta times 10^18) as 1 Theta = 10^18 ThetaWei and collects the transaction fee in TFuelWei too. The fund is transferred to the seller's Theta address.

I made use of the following ThetaNetwork and Theta Video APIs to achieve the above functionalities:-

  1. Theta RPC Cli NewKey for creating new theta addresses for our users.
  2. Theta RPC Cli UnlockKey for unlocking addresses so they can transact.
  3. Theta RPC GetAccount for coins balances details in a theta address.
  4. Theta Video APIs (create pre-signed URL, upload the video to pre-signed URL, transcode video using upload, and get Video to check upload progress).
  5. I connected to the main net through InfStone, below are our Theta RPC and ThetaCli RPC URLS
  6. https://api.infstones.com/theta/mainnet/8b9f679741e34b38a0fea270d518d9d3/theta/rpc
  7. https://api.infstones.com/theta/mainnet/8b9f679741e34b38a0fea270d518d9d3/thetacli/rpc
  8. I got our Theta Vide API Key and API Secret from https://www.thetavideoapi.com

Video Upload Process

  1. User enters the video title, and price in theta for the video, and selects the video file to upload.
  2. Upon submitting the form the frontend sends the data to our backend service.
  3. Our backend app calls the theta video API for creating create a pre-signed URL to upload a video.
  4. It calls the Upload a Video using the pre-signed URL, i.e. our backend app makes a PUT request to upload the video to the pre-signed url gotten from step 3.
  5. It calls Transcode a Video using an Upload API with the source_upload_id gotten from Step 3.
  6. At this Step, It continues to call GET your Video to check its transcoding progress. The backend app makes this API call at intervals. Every 10 seconds until the transcode is completed.
  7. It saves the video details to our database.
  8. The Frontend displays the transcoded video in a popup modal iFrame using the player URI from the completed video upload response.

Testing Details

  1. You can access our app through this web URL https://thetatube.netlify.app
  2. You can register or log in with the existing user details below
  3. To register https://thetatube.netlify.app/register
  4. Existing user detail for login Email is [email protected] and the password is test1234
  5. Upon login there is a sidebar for navigating the app (Profile, Buy Content, Purchased Content, and Logout). You can click them to navigate to different pages of the application.
  6. We limited the size of the video per upload to 20mb for testing to prevent us from exceeding our Theta Video API limits.
  7. You can download small-size videos from the URL below for your testing purposes.
  8. https://drive.google.com/drive/folders/13WkctUndugyMpDT8YA5VO5CwSRCvuO0J?usp=sharing

Challenges we ran into

I didn't have many challenges as the documentation of the Theta APIs I needed was good. I faced a little challenge with the Theta Video API at some point, but Mr. Wes helped fixed it but whitelisting our account so our access was restored.

Accomplishments that we're proud of

I am proud of building a decentralized video content platform.
I am proud of building a more accessible platform for users with a great user experience.
I enjoyed integrating into the Theta Network and Theta Video APIs.

What we learned

It has been a learning process for me. I learned how to work with a blockchain network to upload and transcode videos which our application is built on.

What's next for ThetaTube

ThetaTube will add the Theta Video API NFT-based DRM feature to our video upload and display process to improve our user experience and video content security.

Built With

Share this project:

Updates

Submission history