How to merge INVDIVIDUAL recorded streams into one file?

Hi!

While recording sessions in COMPOSED mode is pretty expensive CPU process, perhaps it is a good idea to record streams in INDIVIDUAL MODE and later, after recording is finished, compile them to one file as COMPOSED mode does.

Is there any good solution how to process video from ZIP to COMPOSED mp4 file?

Thank you.

1 Like

Try with ffmpeg: https://ffmpeg.org/

Just to contribute: We use ffmpeg with hstack and amerge filters to combine 1:1 session into one file (can provide the full command example if anyone interested).

1 Like

Thank you @ameotoko, if you share your file other can use it.

Check out this gist: https://gist.github.com/ameotoko/69ba54a78ceba1c728ac3e58a1234138

To make it happen, I had to research a lot of stuff I didn’t even think was possible with a single-line command :slight_smile: There’s still one last problem though, it seems that amerge breaks up the synchronization of audio, when converting long files to .mp4, I can’t figure out how to solve it…

2 Likes

Ameotoko, thank you a lot!
Very helpful!
Will your script handle more then two videos? In case if one of users reloaded page (it will divide his stream record).

I suppose it’s possible, it’s just a matter of implementing the proper logic, based on the data in json file. The script in its current form doesn’t handle it.

1 Like

Hi Ameotoko!
Seems
[0s][1s]scale2ref=‘ohmdar’:‘if(lt(main_h,ih),ih,main_h)’[1s][0s];
should be
[1s][0s]scale2ref='oh
mdar’:‘if(lt(main_h,ih),ih,main_h)’[1s][0s];