Answer for struggling with HLS
Written by Don on . Posted in
Hi,
For createHLSStream, the targetFolder should be set to a subdirectory in your webserver. For example:
createHLSStream localstreamnames=stream1 targetFolder=/var/www/hls groupName=group playlistType=rolling
assuming your webserver root directory is /var/www.
You can then use your iOS browser to playback the created HLS files by opening the link:
http://1.2.3.4/hls/group/playlist.m3u8
where 1.2.3.4 is replaced by your webserver IP address.
To playback on your desktop, you can install FFMPEG and run the command line:
ffplay http://localhost/hls/group/playlist.m3u8
FFMPEG can be downloaded from http://www.ffmpeg.org/download.html.
You can also playback a specific stream:
ffplay http://localhost/hls/group/stream1/playlist.m3u8
where stream1 is the localStreamName used for createHLSStream.
Cheers,
Don