<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: iPhone HTTP Streaming with FFMpeg and an Open Source Segmenter</title>
	<atom:link href="http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/</link>
	<description>Thoughts on Software Development and Engineering</description>
	<lastBuildDate>Tue, 16 Mar 2010 00:32:58 +0000</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Scott Kidder</title>
		<link>http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/comment-page-3/#comment-165369</link>
		<dc:creator>Scott Kidder</dc:creator>
		<pubDate>Tue, 16 Mar 2010 00:32:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/?p=452#comment-165369</guid>
		<description>I&#039;ve made some minor changes to the segmenter.c source file to allow audio-only segmenting.  I&#039;ve used it extensively with FFMPEG-encoded AAC audio files.  Here are the patches:

--- segmenter.c	2009-07-29 17:33:15.000000000 -0700
+++ segmenter.c.audio	2010-02-25 09:44:04.462813091 -0800
@@ -280,13 +280,15 @@
 
     dump_format(oc, 0, output_prefix, 1);
 
-    codec = avcodec_find_decoder(video_st-&gt;codec-&gt;codec_id);
-    if (!codec) {
+    if (video_index &gt;=0) {
+      codec = avcodec_find_decoder(video_st-&gt;codec-&gt;codec_id);
+      if (!codec) {
         fprintf(stderr, &quot;Could not find video decoder, key frames will not be honored\n&quot;);
-    }
+      }
 
-    if (avcodec_open(video_st-&gt;codec, codec) codec, codec) codec);
+    if (video_index &gt;= 0) {
+      avcodec_close(video_st-&gt;codec);
+    }
 
     for(i = 0; i nb_streams; i++) {
         av_freep(&amp;oc-&gt;streams[i]-&gt;codec);</description>
		<content:encoded><![CDATA[<p>I&#039;ve made some minor changes to the segmenter.c source file to allow audio-only segmenting.  I&#039;ve used it extensively with FFMPEG-encoded AAC audio files.  Here are the patches:</p>
<p>&#8212; segmenter.c	2009-07-29 17:33:15.000000000 -0700<br />
+++ segmenter.c.audio	2010-02-25 09:44:04.462813091 -0800<br />
@@ -280,13 +280,15 @@</p>
<p>     dump_format(oc, 0, output_prefix, 1);</p>
<p>-    codec = avcodec_find_decoder(video_st-&gt;codec-&gt;codec_id);<br />
-    if (!codec) {<br />
+    if (video_index &gt;=0) {<br />
+      codec = avcodec_find_decoder(video_st-&gt;codec-&gt;codec_id);<br />
+      if (!codec) {<br />
         fprintf(stderr, &#034;Could not find video decoder, key frames will not be honored\n&#034;);<br />
-    }<br />
+      }</p>
<p>-    if (avcodec_open(video_st-&gt;codec, codec) codec, codec) codec);<br />
+    if (video_index &gt;= 0) {<br />
+      avcodec_close(video_st-&gt;codec);<br />
+    }</p>
<p>     for(i = 0; i nb_streams; i++) {<br />
         av_freep(&amp;oc-&gt;streams[i]-&gt;codec);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ram</title>
		<link>http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/comment-page-2/#comment-164901</link>
		<dc:creator>ram</dc:creator>
		<pubDate>Tue, 09 Mar 2010 22:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/?p=452#comment-164901</guid>
		<description>Can I create the mpeg2ts chunks directly without creating a .ts file and the using the segmenter to create chunks.

Thanks,

Ram.</description>
		<content:encoded><![CDATA[<p>Can I create the mpeg2ts chunks directly without creating a .ts file and the using the segmenter to create chunks.</p>
<p>Thanks,</p>
<p>Ram.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wei</title>
		<link>http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/comment-page-2/#comment-164598</link>
		<dc:creator>Wei</dc:creator>
		<pubDate>Fri, 05 Mar 2010 00:08:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/?p=452#comment-164598</guid>
		<description>Hi,
Ignore the last comment. I made a stupid mistake. Some place in the segmenter.c was changed occasionally.
Sorry.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Ignore the last comment. I made a stupid mistake. Some place in the segmenter.c was changed occasionally.<br />
Sorry.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vicky</title>
		<link>http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/comment-page-2/#comment-164596</link>
		<dc:creator>Vicky</dc:creator>
		<pubDate>Fri, 05 Mar 2010 00:05:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/?p=452#comment-164596</guid>
		<description>Hi All, 
Thanks for the wonderful job. It works very well. 
I met a lot of troubles when compiling the FFmpeg. Finnally, I resolved the problems by using a old version - ffmpeg-5.0. People who is struggling with FFmpeg can try it.

I&#039;m just wondering how to get the streaming log. Can anybody tell me?</description>
		<content:encoded><![CDATA[<p>Hi All,<br />
Thanks for the wonderful job. It works very well.<br />
I met a lot of troubles when compiling the FFmpeg. Finnally, I resolved the problems by using a old version &#8211; ffmpeg-5.0. People who is struggling with FFmpeg can try it.</p>
<p>I&#039;m just wondering how to get the streaming log. Can anybody tell me?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wei</title>
		<link>http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/comment-page-2/#comment-164405</link>
		<dc:creator>Wei</dc:creator>
		<pubDate>Wed, 03 Mar 2010 02:01:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/?p=452#comment-164405</guid>
		<description>My segmenter does work, but it works so weird. The command line is like this (I don&#039;t have a server now, so put a local directory here):

 segmenter sample-96k.ts 10 sample_low stream_low.m3u8 ./
[mpegts @ 0xf42180]max_analyze_duration reached
Output #0, mpegts, to &#039;sample_low&#039;:
    Stream #0.0: Video: 0x001b, yuv420p, 320x240, q=2-31, 90k tbn, 90k tbc
    Stream #0.1: Audio: 0x0003, 48000 Hz, 2 channels, 64 kb/s
[mpegts @ 0xf575f0]stream 0, bit rate is not set, this will cause problems

It keep running without stop. And only one ts file is generated (sample_low-1.ts) and it&#039;s getting bigger and bigger. The input file is only 1MB, but the sample_low-1.ts can be more than 5GB (I don&#039;t know how big it can be because I have to stop the program). The generated m3u8 file is as follows:
#EXTM3U
#EXT-X-TARGETDURATION:10

What&#039;s wrong? Can anybody give an answer?</description>
		<content:encoded><![CDATA[<p>My segmenter does work, but it works so weird. The command line is like this (I don&#039;t have a server now, so put a local directory here):</p>
<p> segmenter sample-96k.ts 10 sample_low stream_low.m3u8 ./<br />
[mpegts @ 0xf42180]max_analyze_duration reached<br />
Output #0, mpegts, to &#039;sample_low&#039;:<br />
    Stream #0.0: Video: 0&#215;001b, yuv420p, 320&#215;240, q=2-31, 90k tbn, 90k tbc<br />
    Stream #0.1: Audio: 0&#215;0003, 48000 Hz, 2 channels, 64 kb/s<br />
[mpegts @ 0xf575f0]stream 0, bit rate is not set, this will cause problems</p>
<p>It keep running without stop. And only one ts file is generated (sample_low-1.ts) and it&#039;s getting bigger and bigger. The input file is only 1MB, but the sample_low-1.ts can be more than 5GB (I don&#039;t know how big it can be because I have to stop the program). The generated m3u8 file is as follows:<br />
#EXTM3U<br />
#EXT-X-TARGETDURATION:10</p>
<p>What&#039;s wrong? Can anybody give an answer?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/comment-page-2/#comment-164300</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Mon, 01 Mar 2010 21:55:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/?p=452#comment-164300</guid>
		<description>I&#039;m no longer getting the dts &lt; pcr thing after reinstalling ffmpeg using macports, however, now i&#039;m getting the following... I didn&#039;t see anyone else on here that posted this, any ideas? This is what i&#039;m using to encode...

ffmpeg -i pr.mov -f mpegts -acodec libmp3lame -ar 48000 -ab 64k -s 640x360 -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 &#039;blurCplx^(1-qComp)&#039; -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 640:360 -g 30 -async 2 prOUT.ts

[libx264 @ 0x1808200]VBV underflow (-2928 bits)=33.30 bitrate= 188.8kbits/s    
[libx264 @ 0x1808200]VBV underflow (-4450 bits)
[libx264 @ 0x1808200]VBV underflow (-197 bits)
[libx264 @ 0x1808200]VBV underflow (-60045 bits)
[libx264 @ 0x1808200]VBV underflow (-8034 bits)
[libx264 @ 0x1808200]VBV underflow (-2994 bits)
[libx264 @ 0x1808200]VBV underflow (-12946 bits)
[libx264 @ 0x1808200]VBV underflow (-3898 bits)=33.87 bitrate= 193.9kbits/s    
[libx264 @ 0x1808200]VBV underflow (-13890 bits)
[libx264 @ 0x1808200]VBV underflow (-6498 bits)
[libx264 @ 0x1808200]VBV underflow (-11754 bits)
[libx264 @ 0x1808200]VBV underflow (-5058 bits)
[libx264 @ 0x1808200]VBV underflow (-7650 bits)
[libx264 @ 0x1808200]VBV underflow (-12306 bits)
[libx264 @ 0x1808200]VBV underflow (-7674 bits)
[libx264 @ 0x1808200]VBV underflow (-2990 bits)</description>
		<content:encoded><![CDATA[<p>I&#039;m no longer getting the dts &lt; pcr thing after reinstalling ffmpeg using macports, however, now i&#039;m getting the following&#8230; I didn&#039;t see anyone else on here that posted this, any ideas? This is what i&#039;m using to encode&#8230;</p>
<p>ffmpeg -i pr.mov -f mpegts -acodec libmp3lame -ar 48000 -ab 64k -s 640&#215;360 -vcodec libx264 -b 96k -flags +loop -cmp +chroma -partitions +parti4&#215;4+partp8&#215;8+partb8&#215;8 -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 &#039;blurCplx^(1-qComp)&#039; -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 640:360 -g 30 -async 2 prOUT.ts</p>
<p>[libx264 @ 0x1808200]VBV underflow (-2928 bits)=33.30 bitrate= 188.8kbits/s<br />
[libx264 @ 0x1808200]VBV underflow (-4450 bits)<br />
[libx264 @ 0x1808200]VBV underflow (-197 bits)<br />
[libx264 @ 0x1808200]VBV underflow (-60045 bits)<br />
[libx264 @ 0x1808200]VBV underflow (-8034 bits)<br />
[libx264 @ 0x1808200]VBV underflow (-2994 bits)<br />
[libx264 @ 0x1808200]VBV underflow (-12946 bits)<br />
[libx264 @ 0x1808200]VBV underflow (-3898 bits)=33.87 bitrate= 193.9kbits/s<br />
[libx264 @ 0x1808200]VBV underflow (-13890 bits)<br />
[libx264 @ 0x1808200]VBV underflow (-6498 bits)<br />
[libx264 @ 0x1808200]VBV underflow (-11754 bits)<br />
[libx264 @ 0x1808200]VBV underflow (-5058 bits)<br />
[libx264 @ 0x1808200]VBV underflow (-7650 bits)<br />
[libx264 @ 0x1808200]VBV underflow (-12306 bits)<br />
[libx264 @ 0x1808200]VBV underflow (-7674 bits)<br />
[libx264 @ 0x1808200]VBV underflow (-2990 bits)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TW</title>
		<link>http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/comment-page-2/#comment-163995</link>
		<dc:creator>TW</dc:creator>
		<pubDate>Thu, 25 Feb 2010 14:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/?p=452#comment-163995</guid>
		<description>Hello,

so far encoding works fine with SVN-r18709 ffmpeg build (strange behaviour with certain builds though). I cannot compile the segmenter.c and I&#039;d be happy if someone could share his successful build. Meanwhile I went with TSMuxer workaround in order to test the whole procedure after all, even though it&#039;s a very low standard workaround and involves manual tasks.
As said a build of the segmenter would be highly appreciated. I&#039;m not the best developer around and I really couldn&#039;t get this thing compiled (using mingw and dev-cc from bloodshed).
Greetings and thanks for all the knowledge provided on ioncannon! Great work!
TW</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>so far encoding works fine with SVN-r18709 ffmpeg build (strange behaviour with certain builds though). I cannot compile the segmenter.c and I&#039;d be happy if someone could share his successful build. Meanwhile I went with TSMuxer workaround in order to test the whole procedure after all, even though it&#039;s a very low standard workaround and involves manual tasks.<br />
As said a build of the segmenter would be highly appreciated. I&#039;m not the best developer around and I really couldn&#039;t get this thing compiled (using mingw and dev-cc from bloodshed).<br />
Greetings and thanks for all the knowledge provided on ioncannon! Great work!<br />
TW</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/comment-page-2/#comment-163731</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Tue, 23 Feb 2010 05:05:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/?p=452#comment-163731</guid>
		<description>I had an issue compiling segmenter the error was:

&lt;code&gt;segmenter.c:242: warning: ‘guess_format’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:764)&lt;/code&gt;

So I edited line 242 of segmenter.c and changed guess_format to av_guess_format

Works fine now.</description>
		<content:encoded><![CDATA[<p>I had an issue compiling segmenter the error was:</p>
<div class="codesnip-container" >segmenter.c:242: warning: ‘guess_format’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:764)</div>
<p>So I edited line 242 of segmenter.c and changed guess_format to av_guess_format</p>
<p>Works fine now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paolo</title>
		<link>http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/comment-page-2/#comment-163087</link>
		<dc:creator>Paolo</dc:creator>
		<pubDate>Thu, 11 Feb 2010 22:24:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/?p=452#comment-163087</guid>
		<description>Hi All,
I&#039;m using the segmenter in order to stream my IPcam.
The system is made of . The output is then streamed to a local TCP socket. Then  reads from the tcp://  socket and pipes to the .

The system works, but I experience a delay of about 15s if I use a 3 chuncks window with each chunck of 1s. I&#039;m working on a LAN so no bandwidth problems. It seems that 8/9 seconds delay are added by ffmpeg before starting the transcoding, while the other 4/5 come from the iPhone caching video.Thanks a lot guys,
Paolo</description>
		<content:encoded><![CDATA[<p>Hi All,<br />
I&#039;m using the segmenter in order to stream my IPcam.<br />
The system is made of . The output is then streamed to a local TCP socket. Then  reads from the tcp://  socket and pipes to the .</p>
<p>The system works, but I experience a delay of about 15s if I use a 3 chuncks window with each chunck of 1s. I&#039;m working on a LAN so no bandwidth problems. It seems that 8/9 seconds delay are added by ffmpeg before starting the transcoding, while the other 4/5 come from the iPhone caching video.Thanks a lot guys,<br />
Paolo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter S.</title>
		<link>http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/comment-page-2/#comment-162878</link>
		<dc:creator>Peter S.</dc:creator>
		<pubDate>Mon, 08 Feb 2010 13:30:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/?p=452#comment-162878</guid>
		<description>@ Bryan:

Did you try various videos? And what was your ffmpeg command. I tried the versions you suggested, but it also doenst work for me on Win 7/Mingw.</description>
		<content:encoded><![CDATA[<p>@ Bryan:</p>
<p>Did you try various videos? And what was your ffmpeg command. I tried the versions you suggested, but it also doenst work for me on Win 7/Mingw.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.084 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-19 04:27:27 -->
