天天看點

Spydroid還是大牛直播内置RTSP服務SDK

廢話不多說,先列二者功能:

1. Spydroid:

The stream can be directly read by VLC which is great because VLC is a very powerful tool, for example you can really easily record the stream in a file. [FAQ See the FAQ to find out how].

You can enable/disable sound or video streaming

The resolution, the bitrate and the framerate of the stream can be configured... Two video encoders are available for the video streaming: H.263 and H.264. For sound streaming AMR and AAC are available.

The flash can be controlled remotly !

You can choose between the back facing camera and the front facing camera (if your phone has one)

Funny sounds can be played on the phone from the HTTP interface ! 

You can make the phone vibrate remotely

You can see the battery level of the phone

Advanced Use of Spydroid

RTSP Server

Since v3.2, you can pass sophisticated URIs to the RTSP server to remotly configure Spydroid. Here are some example of what you can do:

Enable video streaming & with H.264 and turn flash on ! (H.264 is a standard for video compression)

vlc "rtsp://xxx.xxx.xxx.xxx:8086?h264&flash=on"

Enable video streaming of the front facing camera !

vlc "rtsp://xxx.xxx.xxx.xxx:8086?h264&camera=front"

Enable video streaming with H.263 and sound streaming with AMR and turn flash on ! (H.263 is also a standard for video compression and AMR is a standard for audio compression)

vlc "rtsp://xxx.xxx.xxx.xxx:8086?h263&amr&flash=on"

Enable video streaming and set bitrate to 200kb/s

vlc "rtsp://xxx.xxx.xxx.xxx:8086?h264=200"

Enable video streaming and set bitrate to 500kb/s and framerate to 20fps

vlc "rtsp://xxx.xxx.xxx.xxx:8086?h264=500-20"

Enable video streaming and set bitrate to 500kb/s / framerate to 20fps / resolution to 320x240px

vlc "rtsp://xxx.xxx.xxx.xxx:8086?h264=500-20-320-240"

Enable aac streaming (introduced in v3.3): this is very experimental and it requieres ICS

vlc "rtsp://xxx.xxx.xxx.xxx:8086?aac"

You can of course still use the following basic URI. Spydroid will then use a default configuration, that you can modify in the option menu !

vlc "rtsp://xxx.xxx.xxx.xxx:8086/"

HTTP Server

If you don't want to use the RTSP protocol, you can also start/stop streams using only the HTTP server You can use any of the options presented for the RTSP server ! The HTTP server will respond with a Session Descriptor.

vlc "http://xxx.xxx.xxx.xxx:8080/spydroid.sdp"

Because you're not using the RTSP protocol, streaming won't stop when you quit VLC. You have to GET the following URL:

curl "http://xxx.xxx.xxx.xxx:8080/spydroid.sdp?stop"

You can start up to two streams with the HTTP server. You can specify a stream id to distinguish the streams. For example:

vlc "http://xxx.xxx.xxx.xxx:8080/spydroid.sdp?id=0&h264&flash=on"

vlc "http://xxx.xxx.xxx.xxx:8080/spydroid.sdp?id=1&amr"

curl "http://xxx.xxx.xxx.xxx:8080/spydroid.sdp?id=1&stop"

2. 大牛直播輕量級RTSP服務SDK:

為滿足内網無紙化/電子教室等内網超低延遲需求,避免讓使用者配置單獨的伺服器,大牛直播SDK在推送端釋出了輕量級RTSP服務SDK:

簡單來說,之前推送端SDK支援的功能,内置輕量級RTSP服務SDK後,功能繼續支援。

Windows/Android/iOS内置輕量級RTSP服務SDK功能說明

 支援Windows/Android/iOS平台RTMP直播SDK除推送RTMP外的所有正常功能;

 音頻編碼:AAC;

 視訊編碼:H.264;

 内置服務協定:RTSP;

 支援RTSP端口設定;

 支援RTSP鑒權使用者名、密碼設定;

 支援擷取目前RTSP服務會話連接配接數;

 支援同時建立多個内置RTSP服務。

對應Demo:

 Windows測試程式:SmartPublisherDemo.exe;

 Windows C++工程:WIN-PublisherSDK-CPP-Demo;

 Windows C#工程:WIN-PublisherSDK-CSharp-Demo;

 Android工程:SmartPublisherV2;

 iOS工程:SmartiOSPublisherV2。

技術對比:

  1. Spydroid最新的代碼,更新于5年前,目前支援android平台,可采集安卓攝像頭和音頻,對外提供http server和rtsp server,延遲和丢包處理有待優化,優勢在于,代碼邏輯簡單,便于初學者根據協定規範,快速疊代産品初步模型,video編碼支援H.263和H.264,audio支援AMR和AAC編碼。
  2. 大牛直播内置RTSP服務SDK系商業化SDK,技術成熟,有專人維護、疊代,覆寫windows、android、iOS平台,支援采集螢幕、攝像頭,支援實時靜音、快照、擴充錄像、外部編碼前後資料對接等,功能更強大,video編碼支援H.264和H.265,audio支援AAC編碼,亦可擴充拉取外部rtsp或rtmp流,擴充RTSP網關伺服器,支援RTSP鑒權和多個RTSP service啟動。

如有更多問題歡迎交流:   QQ群1: 294891451  QQ群2: 499687479

更多資料,可參考:

https://github.com/daniulive/SmarterStreaming

繼續閱讀