How to transcode PHP uploaded videos into multiple qualities

210

Im making a video streaming site, for users to upload videos, the uploads are processed via PHP. I just bought some code for a videojs player with a quality changer thingy, but looking at the code it seems like the code only changes the source of the video meaning that i would need to host like 4 files for each video, one for each quality. My question being that, how can i have the videos uploaded automatically transcoded into multiple files with different resolutions?

my html reference:

<video id="video_1" class="video-js" controls preload="auto" data-setup='{}'>
    <source src="https://myvideosource.webm.720p.webm" type="video/webm" label="720P">
    <source src="https://myvideosource.webm.480p.webm" type="video/webm" label="480P" selected    <source src="https://myvideosource.webm.360p.webm" type="video/webm" label="360P">
    <source src="https://myvideosource.webm.240p.webm" type="video/webm" label="240P">
</video>

People are also looking for solutions to the problem: Where to store private keys in public/private key encryption in PHP?

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.