[opus] mjr to opus audio conversion - corrupted results
mateusz.koslacz at 4vod.tv
Wed Jul 8 06:23:38 PDT 2015
In our project we use janus-gateway (http://janus.conf.meetecho.com/) 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.
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.
Janus uses libogg for converting *.mjr audio to *.opus. You can check how
it's done in this file
There are two kinds of problems regarding converted audio:
In in some cases media lengths differ much (ie 30s difference between audio
and video duration in 30 min recording) and can't be synchronized,
stretching audio does not helps.
In other cases audio is exactly 1s shorter than video, but shifting media
by 1s not always fixes delay - sometimes it's 0.5s, sometimes it's 0.75s -
you have to do some attempts, so it can't be automated, what is also a big
problem for us.
Is this because of improper use of api, or maybe it is some bug? How could
we possibly overcome this problems?
For more details you can read our whole conversation with janus author here:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the opus