How to run script AdobeHDS.php on Ubuntu

AdobeHDS is a PHP script that allows to download Adobe HDS videos, by providing for example a F4M manifest file.

To run AdobeHDS.php script on your computer you need to have a PHP server. On this post, we are configuring an Apache server with PHP on Ubuntu, but AdobeHDS.php could be run on any other server and OS compatible with PHP.

Adobe HDS requires, at least, these PHP extensions:

  • bcmath
  • curl
  • SimpleXML

The Ubuntu version used on this tutorial was Ubuntu 21.10.

This post details the step to run AdobeHDS.php on Ubuntu OS, using an Apache server.

Steps to run Adobe HDS on Ubuntu

The summarized steps are:

  1. Install Apache server on Ubuntu OS
  2. Install PHP and integrate on Apache server
  3. Install bcmath PHP extension
  4. Install curl PHP extension
  5. Install SimpleXML extension
  6. Download script

Trick: you can try to summarize all installation steps 1 to 5 in a single line by typing on an Ubuntu terminal:
sudo apt install apache2 php libapache2-mod-php bcmath curl php-simplexml

1. Install Apache server

Open Ubuntu terminal.

sudo apt install apache2

Type ‘Y‘ and enter to confirm you want to continue.

Wait until process is finished.

Open a browser and visit:


If you see the Ubuntu Apache 2 default welcome page, it means it worked.

It is displaying the default html file (index.html) located in folder /var/www/html.


Default folder for Apache files /var/www, but it is only writable to root user by default.

To change owner of /var/www to another user type this sentence, where ‘user’ is your username:

sudo chown user /var/www

For more information about installing Apache in Linux, check this link.

2. Install PHP

Go back to the Ubuntu terminal and type:

sudo apt install php libapache2-mod-php

Type ‘Y‘ and enter to confirm you want to continue.

Restart Apache server by typing:
sudo systemctl restart apache2

You can test that PHP has been installed correctly by typing:
php --version

3. Install bcmath PHP extension

Type this command:
sudo apt install php-bcmath
Type ‘Y‘ and enter to confirm you want to continue.

4. Install curl PHP extension

Type this command:
sudo apt install php-curl

Type ‘Y‘ and enter to confirm you want to continue.

5. Install SimpleXML PHP extension

Type this command:
sudo apt install php-simplexml

6. Download script Adobe HDS

Open a browser and visit this address:

Ontce on the link, follow these steps to¬† download the file, right-click and select “Save page as…” and save it to your desktop.

Then you must move this file into this folder:


Test that everything is working fine by visiting this web address from your browser:


4. Run AdobeHDS.php

You can run AdobeHDS.php from command line, for example by typing:

php AdobeHDS.php --manifest

It copied all video fragments in the same folder where I was running the command.

For any reason, I got permission problems while and I had to run it using “sudo” at the beginning.


External references

Leave a Reply

Your email address will not be published. Required fields are marked *