[Libav-user] mjr to opus audio conversion - corrupted results
Paul B Mahol
onemda at gmail.com
Wed Jul 8 21:35:27 CEST 2015
Dana 8. 7. 2015. 21:17 osoba "Mateusz Koslacz" <mateusz.koslacz at 4vod.tv>
napisala je:
>
> Well, so why list I'm mailing is called "Libav-user -- This list is about
using libavcodec, libavformat, libavutil, libavdevice and libavfilter.", if
you can't help me if I use Libav?
You are using libav* libraries or tools from Libav project and not from
FFmpeg. This is FFmpeg project mailing list.
>
> 2015-07-08 19:26 GMT+02:00 Paul B Mahol <onemda at gmail.com>:
>>
>>
>> Dana 8. 7. 2015. 15:05 osoba "Mateusz Koslacz" <mateusz.koslacz at 4vod.tv>
napisala je:
>>
>>
>> >
>> > Hi,
>> >
>> > 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.
>> >
>> > Firstly, janus was using libogg for converting *.mjr audio to *.opus.
Regarding described issues author decided to switch to libav audio
processing. You can check how it's done in this file
https://github.com/meetecho/janus-gateway/blob/pprec-opus-libav/postprocessing/pp-opus.c
starting
from 90 line.
>> >
>> > Returned data is a lil bit smaller than data obtained using libogg:
>> >
>> >> -rw-r--r-- 1 mateusz mateusz 17987445 lip 8 11:58
rec-2215547545-audio-nolibogg.opus
>> >> -rw-r--r-- 1 mateusz mateusz 221841174 lip 8 11:56
rec-2215547545-video.webm
>> >> -rw-r--r-- 1 mateusz mateusz 18074102 lip 8 11:52
rec-2215547545-audio-libogg.opus
>> >
>> >
>> > Unfortunately, returned data is somehow corrupted - ffprobe results
for libav processing output:
>> >
>> >> [ogg @ 0x4336540] Codec not found
>> >> rec-2215547545-audio-nolibogg.opus: End of file
>> >
>> >
>> > and for compare, for libogg version:
>> >
>> >> Input #0, ogg, from 'rec-2215547545-audio-libogg.opus':
>> >> Duration: 01:20:32.98, start: 0.000000, bitrate: 29 kb/s
>> >> Stream #0:0: Audio: opus, 48000 Hz, stereo, fltp
>> >
>> >
>> > Moreover, no player can play this file - VLC just does nothing, and
Rythmbox says "Can't play file: {null}".
>> >
>> >
>> > Is this because of improper use of libav api, or maybe it is some
libav bug? How could we possibly overcome this problems?
>> >
>> > For more details you can read our whole conversation with janus author
here:
>> > https://groups.google.com/forum/#!topic/meetecho-janus/lMCtBm7VbMY
>> >
>> >
>>
>> From that conversation it is evident you are using Libav and not FFmpeg.
And so we can not help you.
>>
>> > Regards,
>> >
>> > Mateusz Koślacz
>> >
>> > _______________________________________________
>> > Libav-user mailing list
>> > Libav-user at ffmpeg.org
>> > http://ffmpeg.org/mailman/listinfo/libav-user
>> >
>>
>>
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/libav-user
>>
>
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20150708/e8c69642/attachment.html>
More information about the Libav-user
mailing list