11/14/2022 0 Comments Ffmpegx iphone![]() I don't know enough about how the segmentation works to know why this is so difficult to do but I believe it could have something to do with synchronization points in the stream. The only pitfalls I ran into revolve around trying to segment the stream without the segmeter code. A good number of steps but if you have some experience using FFMpeg it isn't too hard to set up. That is all there is to building a single static HTTP stream. #Ffmpegx iphone simulator#Build and run it in the simulator or put it on an actual phone and then type the URL in for the server you uploaded your stream to. #Ffmpegx iphone download#If you want to test the stream out in an application then download the MoviePlayer iPhone demo application from the iPhone developer site. If everything has been done correctly you should see the video. The following is what I needed in the Makefile to get it to build on my system: Don't worry it just takes some extra link flags to make it work. The trouble you may run into is that the Makefile that it comes with won't build the binary correctly. It is only a couple files and it is easy to build. There is an SVN repository set up for the segmenter source. You can download Apple's segmenter (see the overview above for more information on where to find it) or you can download one created by the forum user corp186. What you need is a way to segment the video stream into smaller chunks. Now you have a complete video but you don't want to toss the entire thing up or you wouldn't be reading about HTTP streaming. Use the script that I have created later in the post or just make sure you change the -b, -maxrate, and -bufsize values. Note that I have the bitrate set to 96k in the above example. If you want some more detail on some of these commands check out the X264 encoding guide and in general the FFMpeg documentation to see what all the flags mean. I used the following command to configure FFMpeg:įfmpeg -i -f mpegts -acodec libmp3lame -ar 48000 -ab 64k -s 320×240 -vcodec libx264 -b 96k -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate 96k -bufsize 96k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 2 The FFMpeg download page has instructions on getting the latest version. You may be able to get away with anything after FFMpeg 0.5 but you might as well pull down a more recent version. Step 1: Grab the latest version of FFMpeg If you don't have one handy I found a nice list of downloadable HD clips in various formats for testing. Once you are ready to start grab a decent quality video clip to use. It covers the streaming protocol in complete detail and has examples of the stream file format for reference. If you want even more information after reading the overview you can take a look at the HTTP Live streaming draft proposal that was submitted to the IETF by Apple. This document covers the basics of how the streaming works and has some nice diagrams. Start out with the iPhone streaming media overview. I'm not covering windowed streams in this post but if you are thinking about implementing a windowed stream the following will help you make a step in that direction.īefore getting started it is best to read over the Apple documentation on HTTP live streaming. I've put together a cheat sheet on how I went about building a static stream using FFMpeg and an example segmenter that someone has posted. There are a few types of streaming and each requires a certain encoding and segmentation. #Ffmpegx iphone update#With the release of the iPhone OS 3 update came the ability to do live streaming. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |