我目前正在嘗試使用VLC在單獨的計算機上播放opus流。從ffmpeg接收其他計算機上的rtp(Opus)流與VLC
目前的設置如下:
Odroid-U2運行ffmpeg的捕獲音頻和發送作爲RTP OPUS流至遠程計算機.... 命令中使用:ffmpeg的-f ALSA -ac 1 -i HW :0 -acodec libopus -ab 32K -ac 1 -f RTP RTP://192.168.0.115:2032
在遠程計算機(同一本地網絡上)爲192.168.0.115 的Odroid爲192.168.0.124
如果我在libopus的位置使用libmp3lame,那麼這個流將會在沒有問題的情況下運行,並且不會提示事實t帽子它需要SDP ....
遠程計算機上VLC輸出:
SDP required: A description in SDP format is required to receive the RTP stream. Note that rtp:// URIs cannot work with dynamic RTP payload format (97).
如果我使用,我放到一個VLC * .sdp文件播放它什麼都不做(沒有錯誤流並沒有播放)使用
SDP文件:Odroid
SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 192.168.0.115
t=0 0
a=tool:libavformat 55.2.100
m=audio 2032 RTP/AVP 97
b=AS:32
a=rtpmap:97 opus/48000
ffmpeg的輸出:
[email protected]:~$ ffmpeg -f alsa -ac 1 -i hw:0 -acodec libopus -ab 32k -ac 1 -f rtp rtp://192.168.0.115:2032
ffmpeg version git-2013-04-13-87dd62e Copyright (c) 2000-2013 the FFmpeg developers
built on Apr 13 2013 09:47:34 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-gpl --enable-libmp3lame --enable-libopencore-amrnb --enable- libopencore-amrwb --enable-libspeex --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3 --enable-libopus
libavutil 52. 26.100/52. 26.100
libavcodec 55. 2.100/55. 2.100
libavformat 55. 2.100/55. 2.100
libavdevice 55. 0.100/55. 0.100
libavfilter 3. 53.101/3. 53.101
libswscale 2. 2.100/2. 2.100
libswresample 0. 17.102/0. 17.102
libpostproc 52. 3.100/52. 3.100
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, alsa, from 'hw:0':
Duration: N/A, start: 1365868129.196234, bitrate: 768 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
Output #0, rtp, to 'rtp://192.168.0.115:2032':
Metadata:
encoder : Lavf55.2.100
Stream #0:0: Audio: opus, 48000 Hz, mono, s16, 32 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le -> libopus)
SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 192.168.0.115
t=0 0
a=tool:libavformat 55.2.100
m=audio 2032 RTP/AVP 97
b=AS:32
a=rtpmap:97 opus/48000
個
任何幫助是極大的讚賞....
問候