| 88 | | TODO: ''add some popular streaming examples, like:'' |
| 89 | | - h264+aac in flv/ts |
| 90 | | - theora/vorbis in ogg |
| 91 | | - etc. |
| | 88 | === Streaming H.264 video with AAC audio in FLV format === |
| | 89 | |
| | 90 | {{{ |
| | 91 | Port 8090 |
| | 92 | BindAddress 0.0.0.0 |
| | 93 | MaxHTTPConnections 2000 |
| | 94 | MaxClients 1000 |
| | 95 | MaxBandwidth 1000 |
| | 96 | CustomLog - |
| | 97 | #NoDaemon |
| | 98 | |
| | 99 | <Feed feed1.ffm> |
| | 100 | File /tmp/feed1.ffm |
| | 101 | FileMaxSize 200K |
| | 102 | ACL allow 127.0.0.1 |
| | 103 | </Feed> |
| | 104 | |
| | 105 | # if you want to use mpegts format instead of flv |
| | 106 | # then change "live.flv" to "live.ts" |
| | 107 | # and also change "Format flv" to "Format mpegts" |
| | 108 | <Stream live.flv> |
| | 109 | Format flv |
| | 110 | Feed feed1.ffm |
| | 111 | |
| | 112 | VideoCodec libx264 |
| | 113 | VideoFrameRate 30 |
| | 114 | VideoBitRate 512 |
| | 115 | VideoSize 320x240 |
| | 116 | AVOptionVideo crf 23 |
| | 117 | AVOptionVideo preset medium |
| | 118 | # for more info on crf/preset options, type: x264 --help |
| | 119 | AVOptionVideo flags +global_header |
| | 120 | |
| | 121 | AudioCodec aac |
| | 122 | Strict -2 |
| | 123 | AudioBitRate 128 |
| | 124 | AudioChannels 2 |
| | 125 | AudioSampleRate 44100 |
| | 126 | AVOptionAudio flags +global_header |
| | 127 | </Stream> |
| | 128 | |
| | 129 | ################################################################## |
| | 130 | # Special streams |
| | 131 | ################################################################## |
| | 132 | <Stream stat.html> |
| | 133 | Format status |
| | 134 | # Only allow local people to get the status |
| | 135 | ACL allow localhost |
| | 136 | ACL allow 192.168.0.0 192.168.255.255 |
| | 137 | </Stream> |
| | 138 | |
| | 139 | # Redirect index.html to the appropriate site |
| | 140 | <Redirect index.html> |
| | 141 | URL http://www.ffmpeg.org/ |
| | 142 | </Redirect> |
| | 143 | ################################################################## |
| | 144 | }}} |
| | 145 | |
| | 146 | === Streaming Theora video with Orbis audio in Ogg format === |
| | 147 | |
| | 148 | {{{ |
| | 149 | Port 8090 |
| | 150 | BindAddress 0.0.0.0 |
| | 151 | MaxHTTPConnections 2000 |
| | 152 | MaxClients 1000 |
| | 153 | MaxBandwidth 1000 |
| | 154 | CustomLog - |
| | 155 | #NoDaemon |
| | 156 | |
| | 157 | <Feed feed1.ffm> |
| | 158 | File /tmp/feed1.ffm |
| | 159 | FileMaxSize 200K |
| | 160 | ACL allow 127.0.0.1 |
| | 161 | </Feed> |
| | 162 | |
| | 163 | <Stream live.ogg> |
| | 164 | Format ogg |
| | 165 | Feed feed1.ffm |
| | 166 | |
| | 167 | VideoCodec libtheora |
| | 168 | VideoFrameRate 24 |
| | 169 | VideoBitRate 512 |
| | 170 | VideoSize 320x240 |
| | 171 | VideoQMin 1 |
| | 172 | VideoQMax 31 |
| | 173 | VideoGopSize 12 |
| | 174 | Preroll 0 |
| | 175 | AVOptionVideo flags +global_header |
| | 176 | |
| | 177 | AudioCodec libvorbis |
| | 178 | AudioBitRate 64 |
| | 179 | AudioChannels 2 |
| | 180 | AudioSampleRate 44100 |
| | 181 | AVOptionAudio flags +global_header |
| | 182 | </Stream> |
| | 183 | |
| | 184 | ################################################################## |
| | 185 | # Special streams |
| | 186 | ################################################################## |
| | 187 | <Stream stat.html> |
| | 188 | Format status |
| | 189 | # Only allow local people to get the status |
| | 190 | ACL allow localhost |
| | 191 | ACL allow 192.168.0.0 192.168.255.255 |
| | 192 | </Stream> |
| | 193 | |
| | 194 | # Redirect index.html to the appropriate site |
| | 195 | <Redirect index.html> |
| | 196 | URL http://www.ffmpeg.org/ |
| | 197 | </Redirect> |
| | 198 | ################################################################## |
| | 199 | }}} |