janus-pp-rec - Janus recordings post-processing utility.
janus-pp-rec [options] source.mjr
[destination.[opus|ogg|mka|wav|webm|mkv|h264|srt]]
janus-pp-rec is a simple utility that allows you to
post-process recordings generated by Janus plugins (e.g., VideoRoom or
others). More specifically, since Janus recordings (.mjr files) are
basically a structured dump of RTP packets, this utility reorders them all
and extracts the frames in order to stick them together and save them to a
playable media file. No transcoding is done.
- The target file depends on the
codec used in the recording: for instance, VP8 and VP9 frames can be
converted to a either a .webm or .mkv file, while H.264 frames can only be
converted to a .mp4 or .mkv file instead. Right now, you can convert VP8/VP9
recordings to .webm/.mkv, H.264/H.265/AV1 recordings to .mp4/.mkv,
G.711/G.722 recordings to .wav, Opus recordings to .opus/.ogg/.mka, and Data
Channel text recordings to .srt. Binary Data Channel recordings can be
dumped to files of any extension.
- -h, --help
- Print help and exit
- -V, --version
- Print version and exit
- -F,
--file-extensions
- Only print the supported target file extensions per codec
(default=off)
- -j, --json
- Only print JSON header (default=off)
- -H, --header
- Only parse .mjr header (default=off)
- -p, --parse
- Only parse and re-order packets (default=off)
- -e,
--extended-json
- Only print extended JSON report (automatically enables --json)
(default=off)
- -m,
--metadata=metadata
- Save this metadata string in the target file
- -i,
--ignore-first=count
- Number of first packets to ignore when processing, e.g., in case they're
cause of issues (default=0)
- -P,
--payload-type=pt
- Ignore all RTP packets that don't match the specified payload type
(default=none)
- -a,
--audiolevel-ext=id
- ID of the audio-levels RTP extension (default=none)
- -v,
--videoorient-ext=id
- ID of the video-orientation RTP extension (default=none)
- -d,
--debug-level=1-7
- Debug/logging level (0=disable debugging, 7=maximum debug level;
default=4)
- -D,
--debug-timestamps
- Enable debug/logging timestamps (default=off)
- -o,
--disable-colors
- Disable color in the logging (default=off)
- -f,
--format=STRING
- Specifies the output format (overrides the format from the destination)
(possible values="opus", "ogg", "mka",
"wav", "webm", "mkv", "mp4",
"srt")
- -t,
--faststart
- For mp4 files write the MOOV atom at the head of the file
(default=off)
- -S,
--audioskew=milliseconds
- Time threshold to trigger an audio skew compensation, disabled if 0
(default=0)
- -C,
--silence-distance=count
- RTP packets distance used to detect RTP silence suppression, disabled if 0
(default=0)
- -r,
--restamp=count
- If the latency of a packet is bigger than the `moving_average_latency *
(<restamp>/1000)` the timestamps will be corrected, disabled if 0
(default=0)
- -c,
--restamp-packets=count
- Number of packets used for calculating moving average latency for
timestamp correction. (default=10)
- -n,
--restamp-min-th=milliseconds
- Minimum latency of moving average to reach before starting to correct
timestamps. If the current latency is below this threshold the timestamps
will not be changed. Below the threshold we ignore the moving average.
(default=500)
Lorenzo Miniero (lorenzo@meetecho.com)