awslabs / amazon-kinesis-video-streams-webrtc-sdk-c

Amazon Kinesis Video Streams Webrtc SDK is for developers to install and customize realtime communication between devices and enable secure streaming of video, audio to Kinesis Video Streams.
https://awslabs.github.io/amazon-kinesis-video-streams-webrtc-sdk-c/group__PublicMemberFunctions.html
Apache License 2.0
1.02k stars 307 forks source link

[QUESTION] How to playback or add audio file header for the SDK sample OPUS audio frames ?? #1087

Closed ajjiang48 closed 3 years ago

ajjiang48 commented 3 years ago

Hi, Sir,

We've done the webrtc OPUS audio communication (our device as the webrtc viewer using C SDK, and we use the opus-codec.org open OPUS library v1.3.1 as the SW OPUS codec); the OPUS audio communication function is okay. We are now try to analyze the difference between local audio recorded PCM and compressed OPUS quality, and, have some questions:

  1. do you know how to playback the SDK sample OPUS audio frame (or, the compressed OPUS raw frame by the opus-codec org); I can't playback both the SDK sample OPUS audio frame and opus-codec.org opus library enceded opus frames by media players like windows media player or VLC.
  2. I used some on-line OPUS to OGG conversion web site and try to convert the SDK sample OPUS frame to OGG (for the media player playback), but all of them returns conversion failure, do you know the good OPUS-OGG conversion tool or on-line conversion web-site ??

Thanks, A.J.

hassanctech commented 3 years ago

Our OPUS frames in the sample we generated using GStreamer. If you use the master sample application (as master) and use this test page as viewer: https://awslabs.github.io/amazon-kinesis-video-streams-webrtc-sdk-js/examples/index.html it should play back the OPUS audio from the sample master application. Does that work for you?

If that works but your OPUS audio doesn't work then there might be an issue with your OPUS files.

ajjiang48 commented 3 years ago

Our OPUS frames in the sample we generated using GStreamer. If you use the master sample application (as master) and use this test page as viewer: https://awslabs.github.io/amazon-kinesis-video-streams-webrtc-sdk-js/examples/index.html it should play back the OPUS audio from the sample master application. Does that work for you?

If that works but your OPUS audio doesn't work then there might be an issue with your OPUS files.

Thank you for the reply; actually, my opus frame encode/decode is okay and tested, we just want to analysis the audio quality difference between the original PCM and lossy compressed OPUS, so I need to add the OGG header to my encoded opus frame, therefore, I am asking it there's any off-the-shelf tool for it. I do see the opusenc/opusdec from opus-codec org web site and it could convert the PCM/WAV file to OPUS/OGG file (contains the ogg media header).

Thanks, A.J.

disa6302 commented 3 years ago

@ajjiang48 ,

We are not aware of any off the shelf tools for Opus to OGG conversion other than GStreamer and opusenc/opusdec. Closing assuming question is answered. Feel free to reopen if you face any other issue.