Jump to content

How can I combine two video files?


Debbie-Leigh

Recommended Posts

Hi,

 

I would like to add a feature to my site that combines two video files together and makes the result available for download. So I've been trying to find somewhere that describes how to do this with code (I use php), but so far haven't been able to find anything.

 

Can anyone tell me how I can do this (either with code or by installing a program on my server that I can call from code to do the combining of the videos) or point me in the right direction to learn how to do it myself?

 

Debbie

 

Link to comment
https://forums.phpfreaks.com/topic/104186-how-can-i-combine-two-video-files/
Share on other sites

You'd have to run a Linux command to merge the two videos (you can run bash commands in PHP).

 

So the trick here is to find a Linux application that can do the joining.  I know that avimerge can join .avi files (i.e. avimerge - o output.avi input1.avi input2.avi) and it is part of the transcode package (apt-get install transcode).  If you need to merge mpeg, etc you may need to dig deeper.

 

Your best bet is to post a question in a Linux forum about joining videos.  Once you have figured out how to do that via command line the rest is easy.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.