How RTSP stream can be loaded to an HTML5 player to support multiple OS and browsers? - html5-video

I am trying to play an rtsp format url in browser .i used video js to do it. But i cant play it or the browser is not streaming it.
I tested in IE,Chrome, and Firefox.
Could you please help me to find a solution?

Related

S3 video play in edge and react native but not chrome or firefox

one of the user of the app I work for has an issue, all the video she upload doesn't work in an HTML5 video player, except on Edge and Safari for iOS (and if it works there I assume it could work in other browsers)
The video can be played in our react-native app or after being downloaded, but not directly using the S3 or cloudfront link
Since the vieos from the other users work, I'm assuming it's related to encryption and S3 specifications, does anyone have met this problem and found a solution ?
EDIT: forgot to put a sample link
https://video-reetags.s3.eu-west-3.amazonaws.com/compressed/aed0a512a419334fe5d0c0c6fb4094a21610642052.mp4
Since the videos from the other users are working fine, I'm assuming it's related to encryption and/or S3 specifications...
No, the problem is not encryption or S3 server issues.
Your MP4 container has video in HEVC format (aka H.265), which is not supported in Chrome or Firefox. You should still be able to hear the sound part since AAC audio is supported.
Playing the video is possible with React-Native and other (native) video players because they rely on the O.S running the player App to decode video. If a browser brand didn't buy a license for HEVC then that browser cannot play it.
Solution:
Re-encode such videos to MP4 containing H.264 with AAC audio (...not H.265 with AAC).
Re-encoding takes time but it's the only way for now. Either the user does it before any uploading, or your own app accepts any file and re-encodes the "not supported" ones on server-side (eg: using FFmpeg or GStreamer tool).

mediaRecorder : what mime type to use to make it run on Safari, Chrome and Firefox?

I am trying to use mediaRecorder API and make it run on maximum of browsers
video/webm;codecs=vp8,opus : that works fine on chrome and Firefox.. but not on Safari
video/mp4;codecs:h264 : works on Safari and Chrome.. but not on Firefox
It looks like Safari is now able to play webm.
What would be the mime type to use to make it run on both 3 browsers ?
I've been attempting the same thing and it is painful to say the least.
I'm able to use MediaRecorder to record video across Chrome, Firefox, Edge, and Safari. BUT the resulting videos do not playback on all browsers.
Safari - records in mp4 and mp4 will playback on all browsers
Chrome & Edge - I'm recording with mimeType: "video/webm;codecs=vp9", which will playback on Chrome, Firefox, and Edge, but not Safari.
Firefox - I'm using the default. It will playback on Chrome, Firefox, and Edge, but not Safari.
Supposedly Safari will playback webm with macOS Big Sur 11.3. I need to upgrade to test this.
Unfortunately webm is still not supported by iOS, so I'm looking into the Cloudconvert API to convert webm videos to mp4 before storing in S3.
Other suggestions welcome.
You'll need to use the MediaRecorder.isMediaTypeSupported API to find out what the browser you are using supports. See this open PR for details.
That does not help with playback however.
You've stumbled into an electropolitical food fight.
Sad to say, there's no commonality of codecs between browsers. You won't be able to find a common codec. Apple (Safari) is firmly in the H.264 / AAC world, the world of MP4.
Chrome, but not open-source Chromium, supports H.264 (which carries a patent burden). The fully open source Chromium browser does not. Firefox, via an automatically installed plugin from OpenH264.org, does, but it only supports H.264's constrained baseline version, not the fancier versions. Use MIME type video/webm; codecs="avc1.42E01F" and you'll be fine in Firefox and Chrome.
Microsoft new Edge supports the same stuff as Chrome.
WebRTC is rigged to allow endpoints to negotiate codecs with each other. In my opinion this is a kludgey way to patch this electropolitical squabble.
This is not a good situation. But it's Q1CY2021 reality.
as a simple answer that I found since it's not simply out there. Use a library like below to record in mp3. It's not supported by browser MediaRecorder natively, but libraries make it easy to encode to mp3
and then you have a blob or file that can be played in any browser and even mobile devices like ios
https://github.com/closeio/mic-recorder-to-mp3

Mediarecorder support/pollyfil for Safari

I wanted to record Laptop's webcam video stream on safari browser.
I am accessing the stream on browser by using MediaDevices.getUserMedia().
It seems MediaRecorder interface will do the trick (https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder).
However this isnt supported by Safari.
Any recommendation on how i should record the webcam stream and build a video recorder that runs on Safari.
It seems there is nothing available for Safari at the moment.
MediaRecorder polyfill to record audio in Edge and Safari.

Epson MoverioBT-200 not showing local stream for webrtc getUserMedia API

I am testing SimpleWebRTC on Crosswalk and it works fine on an Android phone.
When I try it on Epson Moverio BT-200 the local stream doesn't show anything.
Moverio glasses do show the video stream when getUserMedia is accessed through a Firefox webpage though.
There is an open bug on the Jira of the Crosswalk project but still no clues on how to resolve it.
Any help would be very much appreciated

Kurento Media WebRTC to RTP

I am using kurento's master git to make a WebRTC to RTP bridge.
MediaPipeline pipeline = kurento.createMediaPipeline();
WebRtcEndpoint webRtcEndpoint = new WebRtcEndpoint.Builder(pipeline).build();
HttpGetEndpoint httpEndpoint=new HttpGetEndpoint.Builder(pipeline).build();
org.kurento.client.Fraction fr= new org.kurento.client.Fraction(1, 30);
VideoCaps vc= new VideoCaps(VideoCodec.H264,fr);
httpEndpoint.setVideoFormat(vc);
AudioCaps ac= new AudioCaps(AudioCodec.PCMU, 65536);
httpEndpoint.setAudioFormat(ac);
webRtcEndpoint.connect(httpEndpoint);
However inspite of this the output video playing is encoded to webm . I have tried various other approaches as well ( using RTP ENdpoint , using Gstream filter , using VLC HTTP to RTP streamer ) . however no method gives me a video playable on safari and IE ie H264 encoded . Requesting media developers and kurento team for help .
Safari and IE do not support RTP/H.264. From you code, I understand that you are trying to create a WebRTC to tag bridge. In that case, the HttpGetEndpoint will provide media through HTTP pseudostreaming. However, Kurento only provides that type of live HTTP pseudostreaming in WebM format. To be best of my knowledge, neither Safari nor IE support WebM, hence what you want to do will not work independenlty on the caps you force to the HttpGetEndpoint. You will be only able to see it working on Chrome, Fireforx or other browsers with WebM support.
The only solution for you could be the HttpGetEndpoint providing media in MP4 format (or any other format supported by IE and Safari), but creating the live stream in that format is very tricky and we (the Kurento team) did not had the time for implementing that and this feature is not in our short term roadmap.
However, we have many users integrating WebRTC with IE and Safari using RTMP. In that case, you need to integrate Kurento with an RTMP capable media server (this can be done in different ways) and later let the RTMP media server to serve media to the browsers.