The first thing to do is download the STREAMINGTOOLS_BETA173_SIGNED.DMG and install it
Then the terminal, enter the folder to be cut files, enter Mediafilesegmenter-f to save the file name/file name to be cut
After cutting--the file to be saved--there will be a big push file in it. m3u8 is what we're going to load, put the entire cut folder on our local server and then we can use HTML format for real-time playback in HTML format
<title>http Live Streaming example</title>
<body>
<video src= "http://127.0.0.1/stream/hls/prog_index.m3u8"
Width= "height=" controls= "Controls" >
</video>
</body>
/stream/hls/is the folder name prog_index.m3u8 is the entire file to play
We're going to enter this line of code in the project.
-(void) viewdidload
{
[Super Viewdidload];
self.webView.scrollView.scrollEnabled = NO;
NSString *htmlpath = [[NSBundle mainbundle] pathforresource:@ "video" oftype:@ "html"];
Nsurl *bundleurl = [Nsurl fileurlwithpath:[[nsbundle mainbundle] Bundlepath]];
Nserror *error = nil;
NSString *html = [[NSString alloc] Initwithcontentsoffile:htmlpath encoding:nsutf8stringencoding error:&error];
if (Error = = nil) {//Data load without error condition
[Self.webview loadhtmlstring:html Baseurl:bundleurl];
}
}
Streaming media, local video cutting