Streaming media, local video cutting

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.