Search code examples
video.jsred5prored5-hls-plugin

Video js doen't play the sound of the stream from Red5pro server


I was trying to play the video from RED5pro server using the video js player.The video is showing properly but the sound is not coming.

When i contacted with the server support they gave the following reply:

This is a known issue with Flash publishing and HLS playback. You can use OBS instead of our player. You will have to configure it to use aac. We are currently not transcoding speex audio to aac for playback over HLS, so that's why the sound is not coming through. Our next release will have full WebRTC support which you can use instead of Flash.

My code sample is as below:

<video id=red5pro-video width=600 height=300 class="video-js vjs-default-skin" controls></video>

<script src="http://webrtc.github.io/adapter/adapter-latest.js"></script>
<script src="videojs/video.min.js"></script>
<script src="videojs/videojs-media-sources.min.js"></script>
<script src="videojs/videojs.hls.min.js"></script>
<!-- Red5 Pro SDK -->
<script src="red5pro/red5pro-sdk.min.js"></script>
<script src="script/hls-metadata.js"></script>

<script>
(function () {
var player = videojs('red5pro-video');
player.src({
src: "http://52.77.235.152:5080/live/pub130141120161141537.m3u8", 
type: "application/x-mpegURL",
useCueTags: true
});
window.onOrientation(player, 'red5pro-video');
player.play();
})();
</script>

How could i solve this issue?Please give me some idea.


Solution

  • Try to check the backend of the Red5 pro server.I mean the necessary settings on the Red5pro is enabled or not. That will be the only problem. Please go through the R5P blogs: https://www.red5pro.com/docs/server/hlsdocs/