Audio only stream not working HLS

infinascape

New Member
Hello, I am trying to create a webrtc to HLS audio-only live stream. I'm streaming via browser webrtc and playing it back as HLS using a videojs player. When I set video: false in the constraints, the m3u8 file doesn't seem to get created, causing playback to fail with a file not found error. If I keep video: true and mute the video instead, the m3u8 loads but there is an almost 3 minute delay. If I stream with video active the process works fine.
 

Max

Administrator
Staff member
Good day.
When I set video: false in the constraints, the m3u8 file doesn't seem to get created, causing playback to fail with a file not found error
We've tested on latest WCS build 5.2.928 with the following settings:
Code:
use_java_hls_writer=true
hls_player_width=0
hls_player_height=0
hls_list_size=3
hls_min_list_size=2
hls_time=2
hls_time_min=2000
hls_preloader_enabled=false
and audio only stream published via WebRTC (constraints: {video: false, audio:true}) in Chrome browser is succesfully playing in HLS VideoJS Player Minimal example. Please try with this settings for audio only HLS.
 

infinascape

New Member
Actually, not perfect. Now it doesn't work if I want to include video. I'm giving the user the option of doing a video stream or audio only stream. What are the settings to make it work for both cases?
 

Max

Administrator
Staff member
I commented out the hls_player width and height settings and it's working now.
In this case, transcoding to 480p resolution is enabled for HLS on server. So may be the channel is not enough to play the stream in publishing resolution.
Also, HLS requires an even keyframes in the stream (for example, every 60 frames for 30 FPS) and a smooth FPS. Transcoding equalizes this.
You can also allow periodic keyframe request
Code:
periodic_fir_request=true
if you're publishing WebRTC stream from browser, and publish stream with a lower resolution (for example, 480p instead of 1080p). In this case, transcoding should not be needed to play HLS.
 
Top