Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to provide an FFmpeg/libav alternative for audio postprocessing #272

Closed
wants to merge 3 commits into from

Conversation

lminiero
Copy link
Member

@lminiero lminiero commented Jul 1, 2015

This pull request tries to provide an alternative to libogg in the post processing utility. Specifically, it allows you to make use of FFmpeg/libav for baking the .opus file, pretty much as we already do with video for the .webm file.

To use this, pass the JANUS_PPREC_NOLIBOGG=1 env variable:

JANUS_PPREC_NOLIBOGG=1 /path/to/janus-pp-rec /path/to/file.mjr /path/to/file.opus

It probably doesn't work as expected right now, so feedback is welcome before integrating this in the code base.

@jing3018
Copy link
Contributor

@lminiero I have two issues with the audio postprocessing
1.I cann't get the correct .opus file with the JANUS_PPREC_NOLIBOGG=1

[root@iZ237deuahcZ video_test]# JANUS_PPREC_NOLIBOGG=1 ./janus-pp-rec 1.audio.mjr 1.1.opus
1.audio.mjr --> 1.1.opus
File is 3782910 bytes
Pre-parsing file to generate ordered index...
This is an audio recording, assuming Opus
Counted 28792 RTP packets
Counted 28792 frame packets
Using libogg: false
1.1.opus is 1812126 bytes
Bye!

[root@iZ237deuahcZ video_test]# ffprobe 1.1.opus
[ogg @ 0x17972e0] Codec not found
1.1.opus: End of file

[root@iZ237deuahcZ video_test]# opusdec 1.1.opus 1.1.wav
Decoding complete.
This doesn't look like a Opus file

2.audio postprocessing duration not correct , same issue in master branch

[root@iZ237deuahcZ video_test]# ./janus-pp-rec 1.audio.mjr 1.opus
1.audio.mjr --> 1.opus
File is 3782910 bytes
Pre-parsing file to generate ordered index...
This is an audio recording, assuming Opus
Counted 28792 RTP packets
Counted 28792 frame packets
Using libogg: true
Writing .opus file header
ts begin=[3208303045] ts end=[3298892485]
duration=1887280000
1.opus is 1818830 bytes
Bye!

[root@iZ237deuahcZ video_test]# ffprobe 1.opus
Input #0, ogg, from '1.opus':
  Duration: 00:31:22.68, start: 0.000000, bitrate: 7 kb/s
    Stream #0:0: Audio: opus, 48000 Hz, stereo, fltp

from rtp timestamp, I get the audio duration is 1887.28 seconds
from .opus file , I get the audio duration is 31*60 + 22.68 = 1882.68, it lost 5 seconds 。

@lminiero
Copy link
Member Author

lminiero commented Sep 3, 2015

@jing3018 yes, I know FFmpeg based conversion is broken: it was an attempt (failed) at having an alternative to libogg for Opus processing. I'll close this pull request as it's definitely useless.

About the other problem you found out, please open a new issue, as it may be related to the problem we were trying to fix in the first place (that is, occasionally progressively desynced audio and video).

@lminiero lminiero closed this Sep 3, 2015
@lminiero lminiero deleted the pprec-opus-libav branch September 3, 2015 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants