Convert video to .mjr format - stream video file

331 views
Skip to first unread message

Mikael Boman

unread,
Sep 28, 2015, 7:55:25 AM9/28/15
to meetecho-janus
I would like to play some existing video, .webm (vp8+ogg), stored as file at the Janus host. 
How can I convert this to the .mjr format so it easily can be "broadcasted" by Janus?
E.g. can gstreamer do this conversion, do I need to write my own converter, or is there a more obvious way to achieve this?
I now I can use gstreamer to create a rtp stream towards Janus but hope for a more optimized solution. 

 

Lorenzo Miniero

unread,
Sep 28, 2015, 8:26:24 AM9/28/15
to meetecho-janus
Hi Mikael,

there's no tool to convert to MJR as of now. The issue, though, is not the MJR format per se (which is pretty dumb), but the fact that it actually wraps RTP packets, which means packetizing frames, properly set timestamps and sequence numbers and so on. If you were to write a tool, I guess the easiest approach would be to generate RTP with GStreamer or similar, and then save each packet to file with the MJR prefix.

As a side note, not sure if you're aware of this but the Streaming plugin allows you to record a stream you're broadcasting. This means you can prepare a mountpoint, ask for it to be recorded, and then "feed" it with GStreamer/FFmpeg, which will result in the MRJ files being created. Probably a bit awkward as a conversion tool, but it may do the job in the short term.

L.

Mikael Boman

unread,
Sep 30, 2015, 4:02:20 AM9/30/15
to meetecho-janus
Thanks for the reply Lorenzo,
I am not yet familiar with the mountpoint concept. To record to a (.mjr) file using the Streaming plugin, I would need to understand how I shall configure this setup (via .cfg?) or 
how achieve this using the streaming plugin API?
I think I understand how to activate the recording but I do not understand how to setup a mountpoint over the API so it can be recorded to a (.mjr) file. 
Any hints would be appreciated.

Lorenzo Miniero

unread,
Sep 30, 2015, 4:05:15 AM9/30/15
to meetecho-janus
I don't think we have docs for the streaming plugin yet. Anyway, if you look at the plugin code for the "create" method you should see what the plugin expects. There might be snippets in other discussions here, not sure.

L.
Reply all
Reply to author
Forward
0 new messages