【问题标题】:Playing Rtmp stream in Android Application在 Android 应用程序中播放 Rtmp 流
【发布时间】:2014-07-11 19:54:14
【问题描述】:

您好,我已按照this 链接上的信息播放 rtmp 流,如“rtmp://178.33.241.201:1935/teledunet/spacetoon”配置后我没有收到任何构建错误或语法错误,但是当它启动后在模拟器或实际设备上运行,弹出一条消息说“不幸的是应用程序已停止工作”请帮助我,一件事请仅提供有关 rtmp 协议的解决方案,因为我对 rtsp 或 http 不感兴趣 提前谢谢你!

【问题讨论】:

    标签: android stream rtmp


    【解决方案1】:

    查看此代码,它可能会对您有所帮助!

    $cc->headers[] = "Host: www.teledunet.com";
    $cc->headers[] = "Referer: http://www.teledunet.com/";
    $html = $cc->get("http://www.teledunet.com/mobile/?con");
    preg_match("/var aut='\?id0=(.*?)'/", $html, $timex);
    $swf = "http://www.teledunet.com/mobile/player.swf?id0=".$timex[1]."&channel=".$tmp[1];
    $tmxx = $tmp[1];
    preg_match("|rtmp://(.*?)/$tmxx|", $html, $r);
    if (empty($r[0])){
      $r[0] = "rtmp://5.135.134.110:1935/live";
    }
    echo "\r\nStart of ".$tmp[0]." in progress...\r\n";
    $cmd = 'rtmpdump -q -v -r "'.$r[0].'" -W "'.$swf.'" -p     "http://www.teledunet.com/mobile/?con" -y "'.$tmp[1].'" | "'.$vlc.'" --meta- title="'.$tmp[0].' (Teledunet by Darby_Crash)" - '.$out.'';
    shell_exec($cmd);
    

    【讨论】:

    • 虽然此代码可能有助于解决问题,但仅代码的答案质量不高。更好的答案是描述代码的作用,显示插入位置,说明采用该方法的原因,并链接到相关文档。
    猜你喜欢
    • 1970-01-01
    • 2023-04-02
    • 2012-07-04
    • 2012-07-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-20
    • 1970-01-01
    • 2021-05-09
    相关资源
    最近更新 更多