0

我想从RTMP服务器实现流式传输。例如,下面是一个 RTMP 服务器的链接。

http://usher.justin.tv/find/CHANNELNAME.json?type=any

并想做它的流式传输。

我找到了一种方法:它连接到Twitch服务器上的SWF文件(速度太慢)......如何将其转换为 VideoView以避免使用 Twitch API?rtmp://

请求后回答:

[
{“节点”:“video10-2.arn01”,“needed_info”:“”,“play”:“jtv_FO2coLXGNLzCXtvR”,“meta_game”:“暗黑破坏神III:死神”,“video_height”:720,“比特率": 2915.1875, "broadcast_part": 5, "rank": 0, "persistent": "true", "cluster": "arn01", "token": "76b3d8aae0e6eee2bcda8d1acc34103f1a73b595:{\"swfDomains\": [\"justin .tv\"、\"jtvx.com\"、\"xarth.com\"、\"twitchtv.com\"、\"twitch.tv\"、\"newjtv.com\"、\"jtvnw.net \"、\"wdtinc.com\"、\"imapweather.com\"、\"facebook.com\"、\"starcrafting.com\"]、\"streamName\":\"jtv_FO2coLXGNLzCXtvR\", \"expiration\": 1385121067, \"server\": \"video10-2.arn01\"}", "connect": "rtmp://192.16.65.94/app", "broadcast_id": 7587457488, "type": "live", "display": "来源”,“find_type”:“dist”},
{“node”:“video12-1.fra01”,“needed_info”:“”,“play”:“jtv_LuAij7o0_zozQ4jY”,“meta_game”:“暗黑破坏神III:死神”,“video_height”:720,“比特率” :1600,“broadcast_part”:1,“rank”:1,“persistent”:“true”,“cluster”:“fra01”,“token”:“b4db7f59d3b4d723624ee50ed2d69519d1a4cebb:{\”swfDomains\”:[\”justin. tv\"、\"jtvx.com\"、\"xarth.com\"、\"twitchtv.com\"、\"twitch.tv\"、\"newjtv.com\"、\"jtvnw.net\ ", \"wdtinc.com\", \"imapweather.com\", \"facebook.com\", \"starcrafting.com\"], \"streamName\": \"jtv_LuAij7o0_zozQ4jY\",\"expiration\": 1385121067, \"server\": \"video12-1.fra01\"}" "connect": "rtmp://199.9.254.232/app", "broadcast_id": 7587458496, "type": "high", "display": "High", " find_type": "dist"},
{“节点”:“video15-2.arn01”,“needed_info”:“”,“播放”:“jtv_e38UUDs1WLMP9wlc”,“meta_game”:“暗黑破坏神III:死神”,“video_height”:360,“比特率” : 350, "broadcast_part": 1, "rank": 3, "persistent": "true", "cluster": "arn01", "token": "c416673c070354e1a33edcdb535a195463cd9702:{\"swfDomains\": [\"justin. tv\"、\"jtvx.com\"、\"xarth.com\"、\"twitchtv.com\"、\"twitch.tv\"、\"newjtv.com\"、\"jtvnw.net\ ", \"wdtinc.com\", \"imapweather.com\", \"facebook.com\", \"starcrafting.com\"], \"streamName\": \"jtv_e38UUDs1WLMP9wlc\",\"expiration\": 1385121067, \"server\": \"video15-2.arn01\"}" "connect": "rtmp://192.16.65.99/app", "broadcast_id": 7587458512, "type": "low", "display": "Low", " find_type": "dist"},
{“节点”:“video12-1.fra01”,“needed_info”:“”,“play”:“jtv_bRMbL_ROsoHAegM2”,“meta_game”:“暗黑破坏神III:死神”,“video_height”:480,“比特率” :800,“broadcast_part”:1,“rank”:2,“persistent”:“true”,“cluster”:“fra01”,“token”:“bed50de10852dd0f7a24d687f43a10463557b5a3:{\”swfDomains\”:[\”justin. tv\"、\"jtvx.com\"、\"xarth.com\"、\"twitchtv.com\"、\"twitch.tv\"、\"newjtv.com\"、\"jtvnw.net\ ", \"wdtinc.com\", \"imapweather.com\", \"facebook.com\", \"starcrafting.com\"], \"streamName\": \"jtv_bRMbL_ROsoHAegM2\",\"expiration\": 1385121067, \"server\": \"video12-1.fra01\"}" "connect": "rtmp://199.9.254.232/app", "broadcast_id": 7587458528, "type": "medium", "display": "Medium", " find_type": "dist"}]

我找到了在 PC 上获取流的最佳方法:在 VLC 中观看 twitch.tv/justin.tv/own3d.tv 流

它使用这个PHP代码:http ://bog.no-ip.biz/sc2/stream2vlc.php

但我不知道如何在 Android 项目中实现它。

4

2 回答 2

1

您可以使用可在 Android 上运行的Adob​​e AIR SDK。它非常简单,默认可以使用 RTMP。

于 2013-11-22T09:26:52.327 回答
0

由于 WebView 支持 RTSP,也许您可​​以即时将流从 RTMP 转换为 RTSP。

我没有尝试这个,但是一个网络搜索给了我这个例子:RTMP To RTSP re-stream using wowza and xuggler

于 2013-11-22T09:37:56.187 回答