<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi all,<br>
<br>
I want to stream a live source to three different outputs using VLC: 1
stream should be 100kbit, another one 300, and the last one 500. These
result streams are later segmented using an application on every
I-frame after 10 seconds (ie. the new TS segment file should start on
the first Iframe after 10 seconds have passed). Now, comes a huge
problem: in these three streams the I-frames are not placed at a
regular interval, and even their number is not the same (although I
thought that if I set up the keyint, min-keyint and fps parameters in a
proper way I should get the same number of I-frames regardless the
quality). I have streamed the setup below for one hour and for the
100kbit channel I've got 807 I-frames, for the 300 I've got 961
I-frames, and for the 500kbit I've got 1071 I-frames. Another weird
thing is that if I modify the audio parameters, the number of I-frames
in the video stream is changing. <br>
<br>
I would like your help to hint me a set-up for the x264 encoder which
produces a constant number of I-frames for all three outputs,
preserving the bitrate difference and audio quality (and if this is not
possible, then please let me know, I'll look for other ways solving
this issue). I thought that if the relation between keyint, min-keyint
and fps is the same for all streams then the generated keyframe number
will be the same too, but obviously I was wrong :( )<br>
<br>
setup 4_zebra output
#duplicate{dst="transcode{vcodec=h264,threads=4,venc=x264{aud,level=13,profile=baseline,merange=16,chroma-me,me=umh,subme=7,ipratio=1.4,bframes=0,ref=3,mixed-refs,no-cabac,direct=auto,deblock=0:0,nf,qpmin=16,qpmax=51,qcomp=0.6,partitions=slow,ratetol=0.05,scenecut=40,keyint=45,min-keyint=45,no-fast-pskip,vbv-init=0.9,vbv-maxrate=768,vbv-bufsize=2000},width=320,height=240,vb=275000,fps=15,acodec=mp4a,samplerate=22050,ab=24000,channels=1}:duplicate{dst=std{access=udp,mux=ts,dst=127.0.0.1:20002}}",dst="transcode{vcodec=h264,threads=4,venc=x264{aud,level=13,profile=baseline,merange=16,chroma-me,me=umh,subme=7,ipratio=1.4,bframes=0,ref=3,mixed-refs,no-cabac,direct=auto,deblock=0:0,nf,qpmin=16,qpmax=51,qcomp=0.6,partitions=slow,ratetol=0.05,scenecut=40,keyint=75,min-keyint=75,no-fast-pskip,vbv-init=0.9,vbv-maxrate=768,vbv-bufsize=2000},width=320,height=240,vb=440000,fps=25,acodec=mp4a,samplerate=32000,ab=64000,channels=2}:duplicate{dst=std{access=udp,mux=ts,dst=127.0.0.1:20001}}",d
st="transcode{vcodec=h264,threads=4,venc=x264{aud,level=13,profile=baseline,merange=16,chroma-me,me=umh,subme=7,ipratio=1.4,bframes=0,ref=3,mixed-refs,no-cabac,direct=auto,deblock=0:0,nf,qpmin=16,qpmax=51,qcomp=0.6,partitions=slow,ratetol=0.05,scenecut=40,keyint=36,min-keyint=36,no-fast-pskip,vbv-init=0.9,vbv-maxrate=768,vbv-bufsize=2000},width=320,height=240,vb=80000,fps=12,acodec=mp4a,samplerate=22050,ab=20000,channels=1}:duplicate{dst=std{access=udp,mux=ts,dst=127.0.0.1:20000}}",dst="transcode{vcodec=mp4v,threads=1,venc=ffmpeg{keyint=100,hq=simple,trellis=1,rc-buffer-size=245760,pre-me=1},width=320,height=240,vb=250000,fps=15,acodec=mp4a,samplerate=44100,ab=96000,channels=2}:rtp{mp4a-latm=1,dst=127.0.0.1,port-audio=20000,port-video=20002,sdp=<a class="moz-txt-link-freetext" href="file:///usr/local/movies/diactus/restricted/preview_4.sdp">file:///usr/local/movies/diactus/restricted/preview_4.sdp</a>}"}<br>
<br>
and a short output of the iframe counter application: <br>
You can see that the 100 kbit stream has the same number of i-frames in
almost two minutes (12:00:01.65 --> 12:01:57.33) then the 300 has in
one minute ten seconds (12:00:01.50 --> 12:01:10.62) and the 500 has
in 1 minute (12:00:00.75 --> 12:01:01.13)<br>
<br>
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=ISO-8859-1">
<title></title>
<meta name="GENERATOR" content="OpenOffice.org 3.1 (Unix)">
<style>
                <!--
                BODY,DIV,TABLE,THEAD,TBODY,TFOOT,TR,TH,TD,P { font-family:"Liberation Sans"; font-size:x-small }
                 -->
        </style>
<table border="0" cellspacing="0" cols="16" frame="VOID" rules="NONE">
<colgroup><col width="39"><col width="121"><col width="73"><col
width="170"><col width="75"><col width="75"><col width="118"><col
width="75"><col width="75"><col width="75"><col width="75"><col
width="75"><col width="118"><col width="75"><col width="75"><col
width="75"></colgroup> <tbody>
<tr>
<td height="15" width="39" align="LEFT">video</td>
<td width="121" align="LEFT"> iframe for 33_100 at </td>
<td sdval="0.500019131944444" sdnum="1033;0;[HH]:MM:SS.00"
width="73" align="RIGHT">12:00:01.65</td>
<td width="170" align="LEFT"> segment_time:59895.0736</td>
<td width="75" align="LEFT"><br>
</td>
<td width="75" align="LEFT">video</td>
<td width="118" align="LEFT"> iframe for 33_300 at </td>
<td sdval="0.500017372685185" sdnum="1033;0;[HH]:MM:SS.00"
width="75" align="RIGHT">12:00:01.50</td>
<td width="75" align="LEFT"> segment_time:59895.0820</td>
<td width="75" align="LEFT"><br>
</td>
<td width="75" align="LEFT"><br>
</td>
<td width="75" align="LEFT">video</td>
<td width="118" align="LEFT"> iframe for 33_500 at </td>
<td sdval="0.500008657407407" sdnum="1033;0;[HH]:MM:SS.00"
width="75" align="RIGHT">12:00:00.75</td>
<td width="75" align="LEFT"> segment_time:59895.0820</td>
<td width="75" align="LEFT"><br>
</td>
</tr>
<tr>
<td height="15" align="LEFT">video</td>
<td align="LEFT"> iframe for 33_100 at </td>
<td sdval="0.500118981481482" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:10.28</td>
<td align="LEFT"> segment_time:59907.0736</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_300 at </td>
<td sdval="0.50005462962963" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:04.72</td>
<td align="LEFT"> segment_time:59901.0820</td>
<td align="LEFT"><br>
</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_500 at </td>
<td sdval="0.500047453703704" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:04.10</td>
<td align="LEFT"> segment_time:59901.0820</td>
<td align="LEFT"><br>
</td>
</tr>
<tr>
<td height="15" align="LEFT">video</td>
<td align="LEFT"> iframe for 33_100 at </td>
<td sdval="0.500256099537037" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:22.13</td>
<td align="LEFT"> segment_time:59919.0736</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_300 at </td>
<td sdval="0.500088541666667" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:07.65</td>
<td align="LEFT"> segment_time:59904.0153</td>
<td align="LEFT"><br>
</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_500 at </td>
<td sdval="0.50008275462963" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:07.15</td>
<td align="LEFT"> segment_time:59904.0820</td>
<td align="LEFT"><br>
</td>
</tr>
<tr>
<td height="15" align="LEFT">video</td>
<td align="LEFT"> iframe for 33_100 at </td>
<td sdval="0.500335416666667" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:28.98</td>
<td align="LEFT"> segment_time:59925.0736</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_300 at </td>
<td sdval="0.500124074074074" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:10.72</td>
<td align="LEFT"> segment_time:59907.0820</td>
<td align="LEFT"><br>
</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_500 at </td>
<td sdval="0.500126157407407" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:10.90</td>
<td align="LEFT"> segment_time:59907.0820</td>
<td align="LEFT"><br>
</td>
</tr>
<tr>
<td height="15" align="LEFT">video</td>
<td align="LEFT"> iframe for 33_100 at </td>
<td sdval="0.500370138888889" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:31.98</td>
<td align="LEFT"> segment_time:59928.0736</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_300 at </td>
<td sdval="0.500191550925926" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:16.55</td>
<td align="LEFT"> segment_time:59913.0820</td>
<td align="LEFT"><br>
</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_500 at </td>
<td sdval="0.500186458333333" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:16.11</td>
<td align="LEFT"> segment_time:59913.0820</td>
<td align="LEFT"><br>
</td>
</tr>
<tr>
<td height="15" align="LEFT">video</td>
<td align="LEFT"> iframe for 33_100 at </td>
<td sdval="0.500394768518518" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:34.11</td>
<td align="LEFT"> segment_time:59931.0736</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_300 at </td>
<td sdval="0.500221122685185" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:19.11</td>
<td align="LEFT"> segment_time:59916.0820</td>
<td align="LEFT"><br>
</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_500 at </td>
<td sdval="0.500221875" sdnum="1033;0;[HH]:MM:SS.00" align="RIGHT">12:00:19.17</td>
<td align="LEFT"> segment_time:59916.0820</td>
<td align="LEFT"><br>
</td>
</tr>
<tr>
<td height="15" align="LEFT">video</td>
<td align="LEFT"> iframe for 33_100 at </td>
<td sdval="0.500473726851852" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:40.93</td>
<td align="LEFT"> segment_time:59937.0736</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_300 at </td>
<td sdval="0.500261921296296" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:22.63</td>
<td align="LEFT"> segment_time:59919.0820</td>
<td align="LEFT"><br>
</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_500 at </td>
<td sdval="0.500256828703704" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:22.19</td>
<td align="LEFT"> segment_time:59919.0820</td>
<td align="LEFT"><br>
</td>
</tr>
<tr>
<td height="15" align="LEFT">video</td>
<td align="LEFT"> iframe for 33_100 at </td>
<td sdval="0.500506828703704" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:43.79</td>
<td align="LEFT"> segment_time:59940.0736</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_300 at </td>
<td sdval="0.500404710648148" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:34.97</td>
<td align="LEFT"> segment_time:59928.0820</td>
<td align="LEFT"><br>
</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_500 at </td>
<td sdval="0.500333333333333" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:28.80</td>
<td align="LEFT"> segment_time:59925.0820</td>
<td align="LEFT"><br>
</td>
</tr>
<tr>
<td height="15" align="LEFT">video</td>
<td align="LEFT"> iframe for 33_100 at </td>
<td sdval="0.500631828703704" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:54.59</td>
<td align="LEFT"> segment_time:59946.0736</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_300 at </td>
<td sdval="0.500435300925926" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:37.61</td>
<td align="LEFT"> segment_time:59934.0153</td>
<td align="LEFT"><br>
</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_500 at </td>
<td sdval="0.500359953703704" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:31.10</td>
<td align="LEFT"> segment_time:59928.0820</td>
<td align="LEFT"><br>
</td>
</tr>
<tr>
<td height="15" align="LEFT">video</td>
<td align="LEFT"> iframe for 33_100 at </td>
<td sdval="0.500637916666667" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:55.12</td>
<td align="LEFT"> segment_time:59952.0736</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_300 at </td>
<td sdval="0.500469791666667" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:40.59</td>
<td align="LEFT"> segment_time:59937.0820</td>
<td align="LEFT"><br>
</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_500 at </td>
<td sdval="0.500394791666667" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:34.11</td>
<td align="LEFT"> segment_time:59931.0820</td>
<td align="LEFT"><br>
</td>
</tr>
<tr>
<td height="15" align="LEFT">video</td>
<td align="LEFT"> iframe for 33_100 at </td>
<td sdval="0.5006728125" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:58.13</td>
<td align="LEFT"> segment_time:59955.0736</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_300 at </td>
<td sdval="0.500504282407407" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:43.57</td>
<td align="LEFT"> segment_time:59940.0820</td>
<td align="LEFT"><br>
</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_500 at </td>
<td sdval="0.500464583333333" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:40.14</td>
<td align="LEFT"> segment_time:59937.0820</td>
<td align="LEFT"><br>
</td>
</tr>
<tr>
<td height="15" align="LEFT">video</td>
<td align="LEFT"> iframe for 33_100 at </td>
<td sdval="0.500752083333333" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:01:04.98</td>
<td align="LEFT"> segment_time:59961.0736</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_300 at </td>
<td sdval="0.500633171296296" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:54.71</td>
<td align="LEFT"> segment_time:59946.0153</td>
<td align="LEFT"><br>
</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_500 at </td>
<td sdval="0.500498958333333" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:43.11</td>
<td align="LEFT"> segment_time:59940.0820</td>
<td align="LEFT"><br>
</td>
</tr>
<tr>
<td height="15" align="LEFT">video</td>
<td align="LEFT"> iframe for 33_100 at </td>
<td sdval="0.500819907407407" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:01:10.84</td>
<td align="LEFT"> segment_time:59967.0736</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_300 at </td>
<td sdval="0.500643402777778" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:55.59</td>
<td align="LEFT"> segment_time:59952.0820</td>
<td align="LEFT"><br>
</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_500 at </td>
<td sdval="0.500534722222222" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:46.20</td>
<td align="LEFT"> segment_time:59943.0820</td>
<td align="LEFT"><br>
</td>
</tr>
<tr>
<td height="15" align="LEFT">video</td>
<td align="LEFT"> iframe for 33_100 at </td>
<td sdval="0.500855324074074" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:01:13.90</td>
<td align="LEFT"> segment_time:59970.0736</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_300 at </td>
<td sdval="0.500678587962963" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:58.63</td>
<td align="LEFT"> segment_time:59955.0820</td>
<td align="LEFT"><br>
</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_500 at </td>
<td sdval="0.500622361111111" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:53.77</td>
<td align="LEFT"> segment_time:59946.0820</td>
<td align="LEFT"><br>
</td>
</tr>
<tr>
<td height="15" align="LEFT">video</td>
<td align="LEFT"> iframe for 33_100 at </td>
<td sdval="0.50088900462963" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:01:16.81</td>
<td align="LEFT"> segment_time:59973.0736</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_300 at </td>
<td sdval="0.500712731481482" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:01:01.58</td>
<td align="LEFT"> segment_time:59958.0820</td>
<td align="LEFT"><br>
</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_500 at </td>
<td sdval="0.500639236111111" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:55.23</td>
<td align="LEFT"> segment_time:59952.0820</td>
<td align="LEFT"><br>
</td>
</tr>
<tr>
<td height="15" align="LEFT">video</td>
<td align="LEFT"> iframe for 33_100 at </td>
<td sdval="0.501357997685185" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:01:57.33</td>
<td align="LEFT"> segment_time:60009.0736</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_300 at </td>
<td sdval="0.500782291666667" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:01:07.59</td>
<td align="LEFT"> segment_time:59964.0820</td>
<td align="LEFT"><br>
</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_500 at </td>
<td sdval="0.500673263888889" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:00:58.17</td>
<td align="LEFT"> segment_time:59955.0820</td>
<td align="LEFT"><br>
</td>
</tr>
<tr>
<td height="15" align="LEFT">video</td>
<td align="LEFT"> iframe for 33_100 at </td>
<td sdval="0.501358009259259" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:01:57.33</td>
<td align="LEFT"> segment_time:60014.0736</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_300 at </td>
<td sdval="0.500817361111111" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:01:10.62</td>
<td align="LEFT"> segment_time:59967.0820</td>
<td align="LEFT"><br>
</td>
<td align="LEFT"><br>
</td>
<td align="LEFT">video</td>
<td align="LEFT"> iframe for 33_500 at </td>
<td sdval="0.500707523148148" sdnum="1033;0;[HH]:MM:SS.00"
align="RIGHT">12:01:01.13</td>
<td align="LEFT"> segment_time:59958.0820</td>
<td align="LEFT"><br>
</td>
</tr>
</tbody>
</table>
<br>
<br>
Thanks a lot,<br>
frc<br>
</body>
</html>