Post processing mjr on separate server

207 views
Skip to first unread message

Anil Wadghule

unread,
Jan 17, 2018, 3:17:54 PM1/17/18
to meetecho-janus
Hi,

Anyone using janus-pp-rec on AWS lambda or separate server to process mjr files to webm/mp4 and store to S3 etc?

Did you optimise this flow?

I am thinking of creating a live pipeline of converting .mjr files to mp4 and save it amazon s3. I will be using ffmpeg for conversion.

Do you know any faster way to do this? Can we directly send .mjr files to aws or any endpoint etc..

Thanks,
Anil

signature.asc

Lorenzo Miniero

unread,
Jan 18, 2018, 4:35:24 AM1/18/18
to meetecho-janus
Copying files is up to you. We provide an option to use a temporary extension until the file is ready, and only use .mjr when it's done, so you can have a script that monitors new .mjr files and moves them wherever they need to be.

L.

Anil Wadghule

unread,
Jan 18, 2018, 8:06:06 AM1/18/18
to Lorenzo Miniero, meetecho-janus
Hi Lorenzo,

I am currently exactly doing the same.

The issue is that with ffmpeg, it takes like 5-10 seconds for converting .mjr audio video files to combined single .mp4 (for 1 minute video recording)

Can Janus's janus-pp-rec provide some option to write mjr's to mp4 relatively quickly? Else could you let me know script which is fast (copys codecs only .. and doesn't process)

Thanks,
Anil

--
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.



--
Best,
Anil

sisnia...@gmail.com

unread,
Jan 18, 2018, 9:13:17 AM1/18/18
to meetecho-janus
Hi Anil,

Can you please share with us your script?

I think 10 seconds is a long time for only 1 minute of recording.

A question for everyone:
Does anyone know if ffmpeg can mix two mp4 files into one? Imagine 2 peers in a videoroom and I want to have only one final video. Maybe I need other program?

Thanks!
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.



--
Best,
Anil

Fabrizio Bertone

unread,
Jan 18, 2018, 11:04:17 AM1/18/18
to sisnia...@gmail.com, meetecho-janus
Hi,

Yes, you can use ffmpeg to join multiple videos, here’s an example:


Fabrizio

Anil Wadghule

unread,
Jan 18, 2018, 11:43:38 AM1/18/18
to sisnia...@gmail.com, meetecho-janus
Hi 

You can find my script here


My major issue is this part

ffmpegParams="-strict -2"
command="ffmpeg -i $videoSource -i $audioSource $ffmpegParams $outputFile"

Anyone know if speed can be improved for above command.. I remember someone in IRC suggested to copy codecs instead actually do ffmpeg processing .. anyone know how to do this?

Thanks,
Anil

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.



--
Best,
Anil

Alessandro Amirante

unread,
Jan 22, 2018, 4:01:43 AM1/22/18
to Anil Wadghule, sisnia...@gmail.com, meetecho-janus
2018-01-18 17:43 GMT+01:00 Anil Wadghule <anild...@gmail.com>:
Hi 

You can find my script here


My major issue is this part

ffmpegParams="-strict -2"
command="ffmpeg -i $videoSource -i $audioSource $ffmpegParams $outputFile"

Anyone know if speed can be improved for above command.. I remember someone in IRC suggested to copy codecs instead actually do ffmpeg processing .. anyone know how to do this?


Just add -codec copy to ffmpegParams, and it won't re-encode media.

A.

Anil Wadghule

unread,
Jan 22, 2018, 12:18:37 PM1/22/18
to Alessandro Amirante, sisnia...@gmail.com, meetecho-janus
There is an issue.. I am doing this

ffmpeg -i 4485.mp4 -i 4485.opus -strict -2 -acodec copy  output_yes.mp4

See opus and mp4 can't be mixed "[mp4 @ 0x170fb80] Could not find tag for codec opus in stream #1, codec not currently supported in container" error.

For now I am using

ffmpeg -i 4485.mp4 -i 4485.opus -c:v copy -c:a aac -b:a 128K output_yes.mp4

Do you know or anyone here.. better and fsater way to convert audio and video to single .mp4?

Thanks,
Anil


--
Best,
Anil

Alessandro Amirante

unread,
Jan 22, 2018, 12:37:14 PM1/22/18
to Anil Wadghule, sisnia...@gmail.com, meetecho-janus
You should be able to merge opus audio and h264 video into a .mkv container. Your command should look like this:

ffmpeg -i 4485.mp4 -i 4485.opus -c:v copy -c:a copy -b:a 128K output_yes.mkv

A.

Anil Wadghule

unread,
Jan 22, 2018, 12:50:15 PM1/22/18
to Alessandro Amirante, sisnia...@gmail.com, meetecho-janus
How is .mkv support to be played in browsers? ffmpeg IRC folks were not with .mkv for browsers.

I think I have to go with most common format used in web browsers..

Is it webm or mp4? or any other?

Thanks,
Anil
--
Best,
Anil

Reply all
Reply to author
Forward
0 new messages