WebRTC recording with AAC encoding - google-chrome-extension

I'm recording screens and webcam video in a Chrome extension using WebRTC but it appears the audio streams in my .mp4 videos are encoded with Opus which causes QuickTime to display an Error -2048: Couldn't open the file video.mp4 because it is not a file that QuickTime understands.
Is it possible to use a different audio encoding option supported by Quicktime?

I don't believe mp4 supports any audio codecs supported by WebRTC.
If possible I would use Matroska, that supports VP8/VP9/H264 and Opus/PCM which will cover pretty much all WebRTC calls.

Related

How to play a RTP stream in HTML5?

The Janus server is able to replay the RTP stream.
Is there a way to play a RTP stream directly into a video html5 element ?
(I don't really get the difference between RTP and RTSP)
And how can I play the RTP stream: should I transcode it to some HLS ?
You don't, it's not supported in HTML5. I'd recommend transcoding it to DASH and/or HLS, using either open source tools like ffmpeg or commercial solutions like bitmovin.
Webrtc is supported in HTML5, so you can view the video on the browser.
Janus Server supports different plugin for RTSP/RTP, which will receive data in RTSP/RTP and then send that data to the web browser client using webrtc.
https://janus.conf.meetecho.com/docs/streaming.html

Is WebM for audio too, or just video?

I've seen mentions of WebM being used for audio, but reading the WebM Project site and googling convert mp3 to webm has led me to believe that WebM is just for video. I definitely see lots of WebM to mp3 conversion utilities, but not the reverse.
I can see it's definitely used for video, but how about audio? If it is intended for audio files too, how do I generate a WebM file?
WebM is just a container format and can contain both video and audio:
WebM is a digital multimedia container file format promoted by the
open-source WebM Project. It comprises a subset of the Matroska
multimedia container format.
It can be used for audio-only purposes as well as long as the audio is encoded as Vorbis or Opus. Just specify correct mime-type (ibid.):
Audio-only files SHOULD have a mime of “audio/webm”
To generate such a file a suitable software that support the webm container and its supported codecs has to be used. Unfortunately, support for it can be hard to come by. Typically the OGG container is used when you want to encode audio using the Opus codec as it has much broader support, which may explain the lack of support of webm for audio (as of this being written).
Update: One route to WebM is to use FFMpeg (see this answer), just ignore the video options (-vn).

RTSP is the only stream working from my WOWZA streaming engine

I have every stream type enabled on my wowza server.
a week ago i had it working in the wowza test players
now the only one that works is the RTSP in VLC
now every stream just shows a black screen.
If i try to access the m3u8 via Safari browser i can hear the audio but no visual
Any assistance on this would be a major help.
this is due to incompatible video, audio codec. you need to user right encoder or you can use wowza transcoder to transcode your stream (h.264 , AAC) . it will resolve your playback problem. if you are using flash media live encoder you can select h.264 encoding method, and audio codec should be aac or mp3.
Some quick troubleshooting steps:
What source encoder are you using? Can you playback the source URL on VLC as well? What codec info is displayed in VLC for the source stream? It should be one of the supported codecs for Wowza.
What codec info is displayed in VLC for the RTSP playback link generated by your Wowza server?
Do you see any errors/warnings in the access log when you publish and playback your HLS (m3u8) stream?
Usually, this kind of error is due to an incorrect video codec, or an encoding setting, or network saturation where the video packets are not coming through correctly. You can check what error or warning messages are being generated by tailing the access log found in logs/ folder of your Wowza installation directory.
Hope this helps.

What is the technology behind streaming pages like earthcam.com?

There are some webpages that stream the live video to the browser, let's take an example of www.earthcam.com - does anyone know how exactly does it work?
Do they have the stream sent through some node.js server with some protocols (what kind of?), etc. As I understand there are only few formats supported on each platform:
Safari:
HLS (iOS and mac only)
h.264
MP4
Firefox
DASH (via MSE but no h.264)
h.264 via Flash only!
VP9
MP4
OGG
Webm
IE
Flash
DASH (via MSE IE 11+ only)
h.264
MP4
Chrome
Flash
DASH (via MSE)
h.264
VP9
MP4
webm
ogg
And earth cam works everywhere. Do they use flash in case of windows and some other technology in case of Mac OS?
Yes, they detect what browser you are using (User-Agent), and choose a technology that works for that platform.

Video downloaded from OpenTok server has no sound

I've successfully implemented the OpenTok. In group discussion (Three people, including moderator) video and audio transmission works well, but problem starts when moderator record stream. Video clip downloaded from OpenTok server has no sound.
Does anyone have any idea what can be wrong?
Thanks to Ankur (OpenTok Forum):
The audio stream in the downloaded videos is in the SPEEX codec. Many
desktop audio players don't recognize the codec. You may need to use
ffmpeg to transcode the audio before it is playable in programs like
VLC.

Resources