Fork me on GitHub
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
janus-pp-rec.c File Reference

Simple utility to post-process .mjr files saved by Janus. More...

#include <arpa/inet.h>
#include <endian.h>
#include <inttypes.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include "../debug.h"
#include "pp-rtp.h"
#include "pp-webm.h"
#include "pp-opus.h"
Include dependency graph for janus-pp-rec.c:

Functions

void janus_pp_handle_signal (int signum)
int main (int argc, char *argv[])

Variables

int janus_log_level = 4
gboolean janus_log_timestamps = FALSE
gboolean janus_log_colors = TRUE
int working = 0

Detailed Description

Simple utility to post-process .mjr files saved by Janus.

Author
Lorenzo Miniero loren.nosp@m.zo@m.nosp@m.eetec.nosp@m.ho.c.nosp@m.om

Our Janus WebRTC gateway provides a simple helper (janus_recorder) to allow plugins to record audio and video frames sent by users. At the time of writing, this helper has been already integrated in the Video MCU plugin in Janus, thus allowing video conferences and webinars to be recorded. To keep things simple on the Janus side, though, no processing at all is done in the recording step: this means that the recorder actually only dumps the RTP frames it receives to a file in a structured way, so that they can be post-processed later on to extract playable media files. This utility allows you to process those files, in order to get a working .webm (if the recording includes VP8 frames) or .opus (if the recording includes Opus frames) file.

Using the utility is quite simple. Just pass, as arguments to the tool, the path to the .mjr source file you want to post-process, and the path to the destination file (a .webm if it's a video recording, .opus otherwise), e.g.:

./janus-pp-rec /path/to/source.mjr /path/to/destination.[opus|webm] 
Note
This utility does not do any form of transcoding. It just depacketizes the RTP frames in order to get the payload, and saves the frames in a valid container. Any further post-processing (e.g., muxing audio and video belonging to the same media session in a single .webm file) is up to third-party applications.

Recordings post-processing utility

Function Documentation

void janus_pp_handle_signal ( int  signum)
int main ( int  argc,
char *  argv[] 
)

Variable Documentation

gboolean janus_log_colors = TRUE
int janus_log_level = 4
gboolean janus_log_timestamps = FALSE
int working = 0