top of page
90s theme grid background
Writer's pictureGunashree RS

Unlock Streamable Videos with Streamable-Download PHP Class

Introduction


Have you ever wanted to save a cool video you found on Streamable.com, but couldn't figure out how? Well, you're in luck! There's a handy PHP class that makes downloading Streamable videos a breeze. It's called the "streamable-download" class, and it was created by a developer named cp6 on GitHub.


This nifty little tool lets you quickly download Streamable videos to your computer, so you can watch them anytime, even when you're offline. It's super easy to use, and it works like magic. Let's dive in and see how it all works!


What is the Streamable-Download PHP Class?

The streamable-download PHP class is a special computer program that helps you download videos from the popular website Streamable.com. Instead of trying to figure out all the technical stuff yourself, this class does the hard work for you.


All you need to do is give it the URL of the Streamable video you want to save, and it will handle the rest. It will automatically download the video and save it to your computer, so you can watch it whenever you want.


This class is really handy if you often find cool videos on Streamable that you want to keep, but don't want to have to manually download them every time. With the streamable-download class, it's as easy as a few clicks!


streamable-download class


How to Install the Streamable-Download Class

Installing the streamable-download class is a piece of cake. The easiest way to do it is by using a tool called Composer, which is a popular way for developers to install and manage different software packages.


First, make sure you have Composer installed on your computer. If you don't, you can download it for free from the Composer website (getcomposer.org).


Once you have Composer set up, open up your computer's terminal or command prompt and type in this command:


composer requires corbpie/streamable-dl

This will automatically install the streamable download class on your computer, and you'll be ready to start using it.


How to Use the Streamable-Download Class

Using the streamable-download class is really straightforward. Here's a quick step-by-step guide:


1. Find the Streamable video you want to download and copy the URL.

2. Create a new PHP file in your code editor and add this code:


php

$url = "https://streamable.com/8mr65";
$save_as = "test.mp4";
$sdl = new StreamableDL($url, $save_as);
echo json_encode($sdl->downloadVideo());

3. Replace the `$url` variable with the Streamable video URL you copied earlier.

4. Set the `$save_as` variable to the name you want to give the downloaded video file.

5. Run the code, and the streamable download class will take care of the rest!


The class will download the video from Streamable and save it to the location you specified. It will also give you a detailed JSON response with information about the download process, including timestamps, tasks performed, and HTTP status codes.


Key Features of the Streamable-Download Class

The streamable-download class has a few really cool features that make it super useful:


1. Download Video: The main feature is the ability to download videos from Streamable.com. You simply provide the video URL and the save location, and the class handles the rest.


2. Handling Responses: The class returns a detailed JSON response with information about the download process, including timestamps, tasks performed, and HTTP status codes. This can be really helpful for troubleshooting or monitoring the download.


3. Dependencies: To get additional information about the downloaded video file, like its duration or file size, you'll need to have FFmpeg (FFprobe) installed on your system. This is a common video processing tool that the streamable-download class can integrate with.


So in summary, the streamable-download class makes it easy to grab videos from Streamable and save them to your computer, while also providing you with helpful information about the download process.


Example Usage

Let's take a look at a quick example of how you can use the streamable-download class:


php

$url = "https://streamable.com/8mr65";
$save_as = "test.mp4";
$sdl = new StreamableDL($url, $save_as);
echo json_encode($sdl->downloadVideo());

In this example, we first set the `$url` variable to the URL of the Streamable video we want to download. Then, we set the `$save_as` variable to the name we want to give the downloaded video file (in this case, "test.mp4").


Next, we create a new instance of the `StreamableDL` class, passing in the `$url` and `$save_as` variables. Finally, we call the `downloadVideo()` method, which triggers the download process and returns a JSON response with all the details.


By running this code, the streamable-download class will automatically download the video from Streamable and save it to the specified location on your computer. You can then check the JSON response to see how the download went.


This is just a simple example, but you can easily modify the code to fit your specific needs. For instance, you could save the downloaded video to a different location, or even handle the JSON response in different ways (like displaying the download progress or checking for errors).




Frequently Asked Questions

Here are some common questions about the streamable-download class:


1. What is Streamable.com?

   Streamable.com is a popular website where people can upload and share short videos. It's kind of like a smaller, more private version of YouTube.


2. Do I need to install anything else to use the streamable-download class?

   For the most part, no. The class itself is all you need to download videos from Streamable. However, if you want to get additional information about the downloaded video files (like their duration or file size), you'll need to have FFmpeg (FFprobe) installed on your system.


3. Can I use the streamable-download class to download videos from other websites?

   Unfortunately, no. The streamable-download class is specifically designed to work with Streamable.com. It won't work for downloading videos from other sites like YouTube or Vimeo.


4. How do I know if the download was successful?

   The streamable-download class provides a detailed JSON response after each download, which includes information like the download status, timestamps, and any errors that may have occurred. You can check this response to see how the download went.


5. Is there a way to customize the download process?

   Yes, the class has a few different options and settings you can tweak to customize the download process. For example, you can change the download timeout, set a proxy server, or enable debug logging. You can find more information about these settings in the project's GitHub documentation.


Conclusion

The streamable-download PHP class is a super handy tool for anyone who wants to save videos from Streamable.com. It takes all the hassle out of the download process, letting you quickly grab your favorite Streamable videos with just a few lines of code.


Whether you're a developer looking to add Streamable download functionality to your own projects, or just someone who wants an easy way to save Streamable videos, this class is definitely worth checking out. With its simple installation, straightforward usage, and helpful response handling, it makes the whole process a breeze.


So what are you waiting for? Go ahead and give the streamable download class a try – your Streamable video collection is about to get a whole lot bigger!



External Links for the Article:

  1. Streamable.com - Video Sharing PlatformOfficial website where you can upload and share short videos.

  2. Composer - Dependency Manager for PHPDownload and manage PHP dependencies using Composer.

  3. Streamable-Download GitHub RepositoryThe official GitHub repository for the streamable-download PHP class.

  4. FFmpeg - Multimedia FrameworkA powerful tool for handling multimedia data, required for additional video information.

  5. PHP Documentation - Official SiteOfficial PHP documentation, covering installation, usage, and examples.

Comments


bottom of page