<div dir="ltr"><div>Hi,</div><div><br></div><div>In our project we use janus-gateway (<a href="http://janus.conf.meetecho.com/">http://janus.conf.meetecho.com/</a>) as a webRTC gateway and also as a stream recorder. We are on the tests stage of our project, and after very long development time we have ecountered a bug that is a blocker for whole project. After real tests of recording streams using janus we realized that audio and video are out of sync in recordings, despite of fact, that live they are perfectly in sync.</div><div><br></div><div>Janus records two *.mjr files for each recording - one for video, and one for audio. Janus also provides own converter to convert this files to *.webm for video and *.opus for audio. After that, we use ffmpeg to merge this files. By recording stopwatch view on the stream we concluded, that video has correct length and speed, so most probably this is something wrong with audio recording or converting.</div><div><br></div><div>Janus uses libogg for converting *.mjr audio to *.opus. You can check how it&#39;s done in this file <a href="https://github.com/meetecho/janus-gateway/blob/master/postprocessing/pp-opus.c">https://github.com/meetecho/janus-gateway/blob/master/postprocessing/pp-opus.c</a></div><div><br></div><div><div>There are two kinds of problems regarding converted audio:</div><div><br></div><div>In in some cases media lengths differ much (ie 30s difference between audio and video duration in 30 min recording) and can&#39;t be synchronized, stretching audio does not helps.</div><div><br></div><div>In other cases audio is exactly 1s shorter than video, but shifting media by 1s not always fixes delay - sometimes it&#39;s 0.5s, sometimes it&#39;s 0.75s - you have to do some attempts, so it can&#39;t be automated, what is also a big problem for us.</div></div><div><br></div><div><br></div><div>Is this because of improper use of api, or maybe it is some bug? How could we possibly overcome this problems?</div><div><br></div><div>For more details you can read our whole conversation with janus author here:</div><div><a href="https://groups.google.com/forum/#!topic/meetecho-janus/lMCtBm7VbMY">https://groups.google.com/forum/#!topic/meetecho-janus/lMCtBm7VbMY</a></div><div><br></div><div><br></div><div>Regards,</div><div><br></div><div>Mateusz Koślacz</div></div>