Hi, Is it possible to create a single video file from multiple videos? For example, I have vid1.mp4 and vid2.mp4, then put them together side by side, and export it as a single video. So when I play the exported video file it would show vid1 on the left and vid2 on the right.
Hi @theDTD,
As far as I know, FFMPEG allows concatenation, but this feature is not implemented in this library (or I haven't seen it).
I think this may be a feature request. With regards to your description, I think that the concat protocol is the one appropriated to what you want to do, but in order to get library persistent with what FFMPEG offers, I think we should implement both.
I'll work on a Pull Request if I have some time.
I re-read your feature request.
This is slightly different from concatenation since you want to read both videos at the same time.
I'm not sure how to do it. Do you have any idea on how to do it through the command line?
Hello, you can actually do it with overlay filter based from this command line example from https://ffmpeg.org/ffmpeg-filters.html#Examples-68
ffmpeg -i left.avi -i right.avi -filter_complex "
nullsrc=size=200x100 [background];
[0:v] setpts=PTS-STARTPTS, scale=100x100 [left];
[1:v] setpts=PTS-STARTPTS, scale=100x100 [right];
[background][left] overlay=shortest=1 [background+left];
[background+left][right] overlay=shortest=1:x=100 [left+right]
Though, I am not using php now. I will just share this here :)
Thanks @theDTD.
I will try to look at it. I'm currently working on the concatenation feature. This will come afterwards.
Most helpful comment
Hi @theDTD,
As far as I know, FFMPEG allows concatenation, but this feature is not implemented in this library (or I haven't seen it).
I think this may be a feature request. With regards to your description, I think that the concat protocol is the one appropriated to what you want to do, but in order to get library persistent with what FFMPEG offers, I think we should implement both.
I'll work on a Pull Request if I have some time.