JANUS-PP-REC(1)

πŸ“¦
version 1.4.3 Β· 3 versions
, in alpine 3.24, fedora 43, fedora 44, nixpkgs unstable, ubuntu stonking

πŸ’– JANUS-PP-REC πŸ’–

okay so this is janus-pp-rec(1), and it lives in the General Commands Manual section, bestie. it's the Janus recordings post-processing utility. let's get into it ✨


✨ NAME ✨

janus-pp-rec β€” the Janus recordings post-processing utility. that's it. that's the name. πŸ’…


🌸 SYNOPSIS 🌸

janus-pp-rec [options] source.mjr
[destination.[opus|ogg|mka|wav|webm|mkv|h264|srt]]

πŸ¦‹ DESCRIPTION πŸ¦‹

so janus-pp-rec is this little utility that post-processes recordings made by Janus plugins (think VideoRoom or literally whatever else). here's the tea: Janus recordings are .mjr files, and a .mjr file is basically a structured dump of RTP packets. so what this tool does is reorder all of them, extract the frames, and stick everything together into a playable media file. πŸŽ€

no cap: no transcoding is done. it just rearranges and repackages. that's the whole vibe.

the target file you can make depends on the codec in the recording. like, VP8 and VP9 frames can go to either a .webm or a .mkv file, but H.264 frames can only go to a .mp4 or .mkv file instead. right now the tea is:

  • VP8/VP9 recordings β†’ .webm/.mkv
  • H.264/H.265/AV1 recordings β†’ .mp4/.mkv
  • G.711/G.722 recordings β†’ .wav
  • Opus recordings β†’ .opus/.ogg/.mka
  • Data Channel text recordings β†’ .srt
  • Binary Data Channel recordings β†’ can be dumped to files of any extension 🫢

🌈 OPTIONS 🌈

  • -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 the .mjr header (default=off)
  • -p, --parse β€” only parse and re-order packets (default=off)
  • -e, --extended-json β€” only print extended JSON report (this 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)
  • -t, --ignore-rtp-ts β€” ignore RTP timestamps, and use packet arrival timestamps for timing (default=off)
⚠️ heads up bestie, -t shows up twice in there: once for --faststart and once for --ignore-rtp-ts. yes fr fr. that's literally what the page says, so i'm not touching it. πŸ’€

πŸ“ EXAMPLES πŸ“

parse the recording's header (shows metadata info):

janus-pp-rec --header rec1234.mjr

parse the recording's packets without processing them:

janus-pp-rec --parse rec1234.mjr

convert a VP8 .mjr recording to a .webm file:

janus-pp-rec rec1234.mjr rec1234.webm

convert an audio .mjr recording to .opus while RTP correcting timestamps based on moving average latency:

janus-pp-rec --restamp=1500 rec1234.mjr rec1234.opus

πŸ™ˆ BUGS πŸ™ˆ

if you think you found a bug or want to contribute a feature, you can issue or a pull request on https://github.com/meetecho/janus-gateway/issues.

anyway, before doing that, make sure you read the documentation at https://janus.conf.meetecho.com/docs/ and that it has not been discussed already at https://janus.discourse.group/. we only use Github for code issues, and NOT for configuration or usage issues: use the group for that. 🫢


πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’œ AUTHORS πŸ’œ

Lorenzo Miniero (lorenzo@meetecho.com)


and that's the whole page bestie, main character energy from start to finish πŸ’…βœ¨ it's janus-pp-rec(1) out of the General Commands Manual β€” the exact same page title it opens with and the exact same one it signs off with at the very bottom. slay, go convert some .mjr files πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from