Video recording: combine all participants' videos into custom layout (single file)

1,664 views
Skip to first unread message

Igor Khomenko

unread,
Jan 27, 2017, 6:15:21 AM1/27/17
to meetecho-janus
Hi guys,

did anybody combine janus video recorded files (VideoRoom plugin for example) into one single file with custom video layout ?

For example, there are 4 users in video room and recording is ON.
So we will get 8 files (4 video + 4 audio).

What I would like to do is to combine all of them into one single video file. Audio is not a problem, but video layout is something I do not know how to do.
It could be for example a grid with 4 videos/participants.

Can anybody recommend some tools here

Thanks in advance  

Lorenzo Miniero

unread,
Jan 27, 2017, 8:54:09 AM1/27/17
to meetecho-janus
We wrote a customized application based on the mlt framework to do that. You can have a look at this example here to see what the result looks like:


Lorenzo

Horsetopus

unread,
Jan 27, 2017, 10:00:57 AM1/27/17
to meetecho-janus
I am planing to do a replayer that synchronize every streams individually, basically reenacting the session.
That's moslty to have responsive design, but also to allow copy text, or have access to some links. But that is gonna be complicated, I'm not sure I will succeed.

So as a backup, I am also planning to record the sessions as they go by using a special build of Chromium.
You just connect it to the sessions as an invisible bot client, and capture the screen.
You could have more than one connected with different options ( with or without chat, with or without video, etc ).
It could even be fed back to Janus through WebRTC to have it handle the recording.

Mirko Brankovic

unread,
Jan 27, 2017, 10:52:09 AM1/27/17
to meetecho-janus
To me it seems that simplest solution would be to play x (depending how many participants you had) video elements from x video files, so basiclly something like new page woith same layout but simpler, instead of calling WebRTC, Janus ,... just simple video tag from files... Maybe I'm not seeing something, since I was just thinking about this, but not yet at moment to implement it. 

--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janus+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Regards,
Mirko

Mirko Brankovic

unread,
Jan 27, 2017, 10:54:24 AM1/27/17
to meetecho-janus
maybe the downside could be, if you have a lot of participants, the processing power on client, to render all video files .... 
--
Regards,
Mirko

Igor Khomenko

unread,
Jan 27, 2017, 3:24:55 PM1/27/17
to meetecho-janus
X video HTML elements is fine, but not optimal sometimes

I just found this thing https://trac.ffmpeg.org/wiki/Create%20a%20mosaic%20out%20of%20several%20input%20videos
so looks like ffmpeg provides a way to create custom grid

This is an example how it looks like 
http://www.youtube.com/watch?v=ix2HxIfo4WY

I'm going to try it, will let you know
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janu...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Regards,
Mirko



--
Regards,
Mirko

Horsetopus

unread,
Jan 30, 2017, 6:08:16 AM1/30/17
to meetecho-janus
Thank you for sharing.
I'm curious to see how deep this solution is.
Can you move the videos, can the layout be more sophisticated, can you star videos at different times etc etc.
I'll be waiting for your feeback.

Vincenzo Cucumazzo

unread,
Jan 30, 2017, 6:25:46 AM1/30/17
to meetecho-janus
Hi Igor, can you please tell me if you record all the videos from your videoroom only setting configuration file with record=true or you dinamically choose what participant to record through sending requests to the plugin handle?
If you do the latter, can you please show me how you send requests for recording also the remote participants? 

Il giorno venerdì 27 gennaio 2017 12:15:21 UTC+1, Igor Khomenko ha scritto:

Igor Khomenko

unread,
Jan 30, 2017, 6:39:58 AM1/30/17
to meetecho-janus
Hi Vincenzo,

at this stage, I record all users (standard videoroom plugin logic with record=true)

the main thing I'm currently working on is to prepare a python script to post-process all recorded files and merge them into one single file with custom layout.

Vincenzo Cucumazzo

unread,
Jan 30, 2017, 7:00:24 AM1/30/17
to meetecho-janus
Thank you for your quick answer and good luck for your project!

Marnus van Niekerk

unread,
Sep 11, 2017, 4:46:18 AM9/11/17
to meetecho-janus
Hi Igor, I have the barebones to create a shell script that does this, but before I spend more time on it I was wondering if you ever completed your python script and if you would mind sharing it?

Tx
Marnus

Igor Khomenko

unread,
Sep 12, 2017, 3:53:27 AM9/12/17
to meetecho-janus
Hi Marnus, 

Yes, I built some kind of alpha ver of the script, it works, but still, it has some sync issue

The main problem here is that with Janus you actually do not know when a video call is started and when a video call is ended.
Any user can join a video room anytime.

So I have 2 things that are still in my TODO list:
1) Janus server (VideoRoom plugin) - to let us know about start/end of a call.
It could be for example something like this:
- 1st user joined video room - this is the 'START' event
- last user left video call - this is the 'END' event 

2) shifts between videos of different participants.
For example, User1 joined a video room at X timestamp, then User2 joined a video room at X+3 timestamp.
So when combining into a single video file we should take into account this shift and start play the 2nd video not from start, but after 3 seconds.

I need some time to extract current logic from my project, can share a little bit later if that works 

Marnus van Niekerk

unread,
Sep 12, 2017, 3:58:36 AM9/12/17
to Igor Khomenko, meetecho-janus

Hi Igor, tx for the reply.

I have started building a bash script that does this, but I face the same issues.

https://github.com/mvnrsa/janus-combine-video

For now I use the timestamp of the first file as the START and calculate the delay for each video relative to that based on the timestamps in the file names.  This works OK, except that the combined video is restricted to the duration of that first file.

Tx

M

Igor Khomenko

unread,
Sep 12, 2017, 4:15:05 AM9/12/17
to meetecho-janus
I have the same idea in my mind, so we are on the same page here

Probably we can grab the earliest timestamp (1st user joined) and latest (last user left)
and it will be our final file duration 

Marnus van Niekerk

unread,
Sep 12, 2017, 4:19:48 AM9/12/17
to Igor Khomenko, meetecho-janus
Yes, but then we will still need to create a "blank" background video
with that duration to overlay everything onto so that it does not stop
when the first file stops. Currently I use the first file to overlay
onto and the result is it stops when that file stops.
Reply all
Reply to author
Forward
0 new messages