2014-01-28 51 views
4

我開發Android設備(Android的電視盒),允許RTMP視頻流使用Adobe Flash Media Server的

authenticatd用戶通過使用Adobe Flash

媒體觀看通過RTMP協議 「數字通道」 的應用程序Server.Do我需要以流來創建一個服務器端應用程序,或可我只是主持

視頻?搜索了很多,但沒有運氣,任何幫助將不勝感激謝謝。

我已經通過使用Web視圖這樣

webView = (WebView) findViewById(R.id.webview); 

    webView.getSettings().setJavaScriptEnabled(true); 
    webView.getSettings().setAllowFileAccess(true); 
    webView.getSettings().setPluginsEnabled(true); 
    webView.getSettings().setSupportZoom(true); 
    webView.getSettings().setAppCacheEnabled(true); 

    refreshButton = 
     (Button) findViewById(R.id.main_bt_refresh); 
    refreshButton.setOnClickListener(this); 

    refreshFileName(); 
} 

@Override 
public void onClick(View v) { 
    refreshFileName(); 
} 

private void refreshFileName() { 
    EditText etRtmpUrl = 
     (EditText) findViewById(R.id.setup_et_host); 
    EditText etFileName = 
     (EditText) findViewById(R.id.setup_et_file); 
    rtmpUrl = etRtmpUrl.getText().toString(); 
    fileName = etFileName.getText().toString(); 
    if (fileName.endsWith(".flv")) { 
     fileName = "flv:" + fileName; 
    } 

    bodyHtml = htmlCode; 
    bodyHtml = bodyHtml.replaceAll("@[email protected]", 
      "\"file=" + fileName 
      + "&streamer=" + rtmpUrl + "\""); 
    webView.loadDataWithBaseURL("http://127.0.0.1", 
      htmlPre + bodyHtml 
      + htmlPost, "text/html", "UTF-8", null); 

,並沒有給性反應試過這種..

回答

0

沒有直接的方法,但你可以嘗試javacv與ffmpeg的。我檢查其他原因,它看起來像有些人都用它使用RTMP傳輸視頻(檢查這個線程,搜索「RTMP」)

https://code.google.com/p/android-rtmp-client/source/browse/trunk/example/com/ryong21/example/recorder/Recorder.java

Convert video Input Stream to RTMP

,或者你可以去通過RTSP使用沒有用的 http://jennifer-androidworld.blogspot.in/2011/07/video-streaming-using-rtsp-in-android.html?spref=bl

+0

我已經嘗試過這些鏈接。我需要用Rtmp Dude來實現。 –