In this microcourse, explore video transformations and optimizations available through Cloudinary. Discover essential techniques for applying these transformations to enhance your video content, from basic adjustments to advanced optimizations.
Gain practical insights and apply your newfound knowledge to elevate your video content strategy to new heights through eager uploading. Whether you're looking to enhance the visual appeal of your videos, optimize them for specific platforms or campaigns, or simply gain a deeper understanding of Cloudinary's capabilities, this course provides valuable insights and practical techniques for leveraging video transformations effectively.
You will need to install Node.js on your machine, version 10 or higher. Important - Installing Node.js will also install npm, the package manager for Node.js.
Using Homebrew:
brew install node
$ node --version
v18.18.1
$ npm --version
9.8.1
- Visual Studio Code - VSCode is our preferred IDE
- WebStorm
- Sublime
- Atom
- iTerm
Introduction to Video Transformations and Optimizations with Cloudinary
- Run code from root directory, like so:
node <file_name.js>
-
If you don't have one already, create a free Cloudinary account at: https://www.cloudinary.com/signup.
-
Navigate to the Dashboard. Copy the
CLOUDINARY_URL
into your clipboard (see yellow arrow).
- Create a
.env
file in the root of the project. Paste the CLOUDINARY_URL environment variable into your.env
file.
There should be one line of code in your .env file, which should look like this:
CLOUDINARY_URL=cloudinary://YOUR_API_KEY:YOUR_API_SECRET@YOUR_CLOUD_NAME
- Key: CLOUDINARY_URL
- Value: cloudinary://API_KEY:API_SECRET@CLOUD_NAME
Doing this step properly is essential, as it will let Cloudinary know who you are and provide access to your cloud.
npm i
(You will be using the cloudinary
and the dotenv
libraries.)
node testCredentials.js
The output should look like this:
your Cloud Name
your API Key
- Your API_SECRET is part of your CLOUDINARY_URL
- Remember to always keep your API_SECRET a secret!
- This is why we programmed testCredentials.js to only output your cloud name and API Key (no need to keep these two credentials private)
In order to upload all of the assets associated with these code examples and assign the correct Public ID to each, run this file:
node uploads.js
Now you're ready to get started!