📄 fenice-howto.html
字号:
14<br> clock_rate 90000<br> encoding_name MPA<br> pkt_len 26.12<br> stream_end<br> stream<br> file_name video.mpg<br> aggregate movie<br> priority 1<br> media_source stored<br> payload_type 32<br> clock_rate 90000<br> encoding_name MPV<br> coding_type frame<br> frame_rate 25<br> byte_per_pckt 1800<br> stream_end</code> </div> </div> <h1 id="53" name="53" class="book-h2">4.5. GSM-AMR voice streams</h1> <div style="margin-left: 2em"> <p>For a GSM-AMR audio file:<br></p> <div class="codeblock"> <code>stream<br> file_name audio.gsm<br> priority 3<br> payload_type 108<br> clock_rate 8000<br> encoding_name GSM<br> pkt_len 20<br> stream_end</code> </div><br> <strong>Note:</strong> GSM-AMR has not a well know payload type. </div> <h1 id="52" name="52" class="book-h2">4.6. PCM audio streams</h1> <div style="margin-left: 2em"> <p>For a PCM L16 audio file the sd description is as like this:<br></p> <div class="codeblock"> <code>stream<br> file_name audio.L16m8k<br> priority 2<br> payload_type 106<br> clock_rate 8000<br> audio_channels 1<br> encoding_name L16<br> bit_per_sample 16<br> pkt_len 20<br> stream_end</code> </div> </div> <h1 id="37" name="37" class="book-h1">5. How to add a Creative Commons license to the distribution of your contents</h1> <div style="margin-left: 2em"> <p>If you have some multimedia files with Creative Commons licenses you can use the follow key words in th sd description:</p> <ul> <li><tt>license</tt></li> <li><tt>verify</tt></li> <li><tt>title</tt></li> <li><tt>creator</tt></li> </ul> <p>For the meaning of these keywords please refer to the draft at <a href= "http://streaming.polito.it/files/draft-omsp-ccplem-streaming-01.sxw"> http://streaming.polito.it/files/draft-omsp-ccplem-streaming-01.sxw</a></p> <p>This is an example:<br></p> <div class="codeblock"> <code>stream<br> file_name cc.mp3<br> aggregate movie<br> media_source live<br> priority 1<br> license http://creativecommons.org/licenses/by-nc/1.0/<br> verify http://streaming.polito.it/<br> title Building In The Past - Ccc<br> creator OMSP Team<br> payload_type 14<br> clock_rate 90000<br> encoding_name MPA<br> pkt_len 26.12<br> stream_end<br> stream<br> file_name cc.mpg<br> aggregate movie<br> media_source live<br> priority 1<br> license http://creativecommons.org/licenses/by-nc/1.0/<br> verify http://streaming.polito.it/<br> title Building In The Past - Ccc<br> creator OMSP Team<br> payload_type 32<br> clock_rate 90000<br> encoding_name MPV<br> coding_type frame<br> frame_rate 25<br> byte_per_pckt 1000<br> stream_end</code> </div> </div> <h1 id="38" name="38" class="book-h1">6. How to stream live media</h1> <div style="margin-left: 2em"> <p>In case of video from a webcam and audio from a dsp, you must use an application which works to encode its inputs and redirect its outputs on two named pipe, the first one for audio.mp3 and the last one for video.mpg.</p> <p>You can install ffmpeg (compiled with the lame support, see the ffmpeg documentations) and use this script:<br></p> <div class="codeblock"> <code>#!/bin/bash<br> #<br> #------<br> # Note:<br> #------<br> # modprobe pwc fps=25 size=qcif power_save=0 fbufs=5<br> # note: fps>=25 (mpeg 1 or 2)<br> ffmpeg -y -ad /dev/dsp -ar 44100 -ac 2 -vn -ab 128 pipeaudio.mp3 &<br> ffmpeg -y -an -vd /dev/video0 -vcodec mpeg1video -f mpeg1video -r 25 -s qcif -b 128 -bt 1 -g 12 -bf 2 pipevideo.mpg<br> # you can use also fame and sox+lame<br> # fame -d /dev/video -f 25 -p QCIF -c IPPPPP -r 10 -b 128000 pipevideo.mpg<br> # sox -t ossdsp -c2 -w -r44100 /dev/dsp -t raw - | lame -r -x -s 44.1 -m j --preset cbr 128 - - > pipeaudio.mp3<br></code> </div><br> In SD file you must change: <ul> <li><tt>stored</tt> --> <tt>live</tt></li> <li><tt>audio.mp3</tt> --> <tt>pipeaudio.mp3</tt></li> <li><tt>video.mpg</tt> --> <tt>pipevido.mpg</tt></li> </ul> <p>Finally you must create the named pipes:<br></p> <div class="codeblock"> <code>$ mkfifo -m 655 pipeaudio.mp3<br> $ mkfifo -m 655 pipevideo.mpg</code> </div> </div> <h1 id="39" name="39" class="book-h1">7. Utilities used in the scripts</h1> <div style="margin-left: 2em"> <ul> <li>MP3 encoder: <strong>lame</strong> (<a href= "http://lame.sourceforge.net">http://lame.sourceforge.net</a>)</li> <li>MPEG 1 and 2 encoder: <strong>mpeg2enc</strong> (<a href= "http://mjpeg.sourceforge.nett">http://mjpeg.sourceforge.net</a>)</li> <li>Multicodec encoder: <strong>ffmpeg</strong> (<a href= "http://ffmpeg.sourceforge.net">http://ffmpeg.sourceforge.net</a>)</li> <li>Audio utility: <strong>sox</strong> (<a href= "http://sox.sourceforge.net">http://sox.sourceforge.net</a>)</li> <li>Multimedia player: <strong>MPlayer</strong> (<a href= "http://www.mplayerhq.hu">http://www.mplayerhq.hu</a>)</li> </ul> </div> <h1 id="40" name="40" class="book-h1">8. License</h1> <div style="margin-left: 2em"> <p><strong><big>Creative Commons Legal Code</big></strong></p> <p><strong>Attribution-ShareAlike 2.0</strong></p> <ul> <li><a href= "http://creativecommons.org/licenses/by-sa/2.0/legalcode"> Generic Jurisdiction</a></li> <li><a href= "http://creativecommons.org/licenses/by-sa/2.0/it/legalcode"> Italian Jurisdiction</a></li> </ul> </div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -