2013-04-26 32 views
5

让我来举一个例子。这是视频嵌入代码:查找实际的RTMP流URL?

<script type="text/javascript" src="jwplayer/jwplayer.js"></script> 

<div id="container">Loading the player ...</div> 

<script type="text/javascript"> 
    jwplayer("container").setup({ 
     flashplayer: "jwplayer/player.swf", 
     file: "bmw/250413/vod.flv", 
     streamer:'rtmp://216.185.104.75/vod', 
     autoplay:"true", 
     icons:"true", 
     skin:"glow.zip", 
     controlbar:"over", 
     height: 270, 
     width: 480, 
     image: "images/bmw1.jpg" 
    }); 
</script> 

这是实际的页面:http://www.24framesdigital.com/bmw/webcast/250413/vod.html

现在,这将是RTMP流的网址是什么?我试过了:

rtmp://www.24framesdigital.com/bmw/250413/vod.flv 
rtmp://www.24framesdigital.com/bmw/webcast/250413/bmw/250413/vod.flv 
rtmp://216.185.104.75/vod/bmw/250413/vod.flv 
rtmp://216.185.104.75/bmw/250413/vod.flv 

......其他几个人。没有工作。我使用的卷曲流/下载视频:

curl rtmp://.../vod.flv -o vod.flv 

回答

7
curl -o vod.flv 'rtmp://216.185.104.75/vod playpath=bmw/250413/vod' 
 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
100 3341k 0 3341k 0  0 97954  0 --:--:-- 0:00:34 --:--:-- 261k 

更多信息 in the man

+0

另外,只是想知道为什么你编辑了:'$ rtmpdump -r RTMP: //216.185.104.75/vod -y bmw/250413/vod -o a.flv'? (如果它是好的,请保留在答案中 - 这个答案的版本中没有。) – 2013-04-26 10:01:54

+0

好的,最后一件事。为什么'playpath'或'-y'是'bmw/250413/vod'而不是'bmw/250413/vod.flv'(这显然不起作用)如代码中所示?你是怎么推论出来的? – 2013-04-26 13:59:01

+1

@TheoneManis我使用了RtmpDumpHelper。然而,这是一个痛苦,因为它只适用于Windows,不知道Linux解决方案。 – 2013-04-26 14:15:35