This projects lets you publish an mp4 file in to a Vonage video session. User can also speak while the video is being played
- Run "pod install" to install opentok dependencies
- Edit ViewController.swift and add the kToken, kSessionId id and kApiKey
- Run the app and join from Vonage Video playground to see the published stream.
- This is a custom capturer implementing the video capture interface provided by video SDK.
- We get the video tracks from mp4 file, then get the video frame and feed to the SDK.
- We use presentation time stamp provided by the decoder to synchronize audio and video
- This is a custom audio device implementing the audio interface provided by video SDK.
- Here we take the audio from microphone and mix with the audio coming from mp4 movie
- The sampling rate for device is set to 48kHz and simulator is 44.1kHz. Refer to: https://tokbox.com/developer/sdks/ios/reference/Classes/OTAudioFormat.html for details.
This sample is tested with two sample mp4 files.
- MP4 with audio at 48KHz and 5.1 audio
- MP4 with audio at 44.1KHz and Stereo