2016-06-22 6 views
2

現在、VLC for Androidを使用してネットワークストリームを再生しようとすると、問題が発生しています。libvlc Android:HTTPネットワークストリームを再生できません

基本的にこのガイドhttps://wiki.videolan.org/AndroidCompile/に従っています。リポジトリをクローンして構築しました。すべて正常に動作し、アプリケーションを実行して(ローカルまたはネットワークから)ビデオを再生できます。

私はlibvlc AARをとり、最初から新しいAndroidプロジェクトを作成しました。ローカルビデオを再生できますが、URLを渡すとストリームは開かれません。

関連するコード:mediaは、URLのStringある

// Create LibVLC 
ArrayList<String> options = new ArrayList<String>(); 
options.add("--aout=opensles"); 
options.add("--audio-time-stretch"); // time stretching 
options.add("-vvv"); // verbosity 
libvlc = new LibVLC(options); 
holder.setKeepScreenOn(true); 

// Create media player 
mMediaPlayer = new MediaPlayer(libvlc); 
mMediaPlayer.setEventListener(mPlayerListener); 

// Set up video output 
final IVLCVout vout = mMediaPlayer.getVLCVout(); 
vout.setVideoView(mSurface); 
vout.addCallback(this); 
vout.attachViews(); 

Media m = new Media(libvlc, Uri.parse(media)); 
mMediaPlayer.setMedia(m); 
mMediaPlayer.play(); 

設定(モジュール)には何かがありませんか?

は、ここに私が取得ログです:

D/LibVLCAndroidSample: Playing back http://jell.yfish.us/media/jellyfish-3-mbps-hd-h264.mkv 
D/Activity: performCreate Call Injection manager 
I/InjectionManager: dispatchOnViewCreated > Target : com.compdigitec.libvlcandroidsample.VideoActivity isFragment :false 
D/VLC: [ede46778/0] core libvlc: VLC media player - 3.0.0-git Vetinari 
D/VLC: [ede46778/5f726f74] core libvlc: Copyright © 1996-2016 the VideoLAN team 
D/VLC: [ede46778/190019] core libvlc: revision 2.2.0-git-7900-g640a891 
D/VLC: [ede46778/190019] core libvlc: configured with ../configure '--host=arm-linux-androideabi' '--build=x86_64-unknown-linux' '--enable-neon' '--disable-nls' '--enable-live555' '--enable-realrtsp' '--enable-avformat' '--enable-swscale' '--enable-avcodec' '--enable-opus' '--enable-opensles' '--enable-mkv' '--enable-taglib' '--enable-dvbpsi' '--disable-vlc' '--disable-shared' '--disable-update-check' '--disable-vlm' '--disable-dbus' '--enable-lua' '--disable-vcd' '--disable-v4l2' '--disable-gnomevfs' '--enable-dvdread' '--enable-dvdnav' '--disable-bluray' '--disable-linsys' '--disable-decklink' '--disable-libva' '--disable-dv1394' '--enable-mod' '--disable-sid' '--disable-gme' '--disable-tremor' '--enable-mad' '--disable-dca' '--disable-sdl-image' '--enable-zvbi' '--disable-fluidsynth' '--disable-jack' '--disable-pulse' '--disable-alsa' '--disable-samplerate' '--disable-sdl' '--disable-xcb' '--disable-atmo' '--disable-qt' '--disable-skins2' '--disable-mtp' '--disable-notify' '--enable-libass' '--disable-svg' '--d 
D/VLC: [ede46778/eb81c760] core libvlc: plug-ins loaded: 275 modules 
D/VLC: [ee93d168/eb81c760] core logger: looking for logger module matching "any": 4 candidates 
D/VLC: [ee93d168/10001] core logger: using logger module "android_logger" 
D/VLC: [ede46778/2a98] core libvlc: translation test: code is "C" 
D/VLC: [ee93d1c8/2a98] core keystore: looking for keystore module matching "memory": 3 candidates 
D/VLC: [ee93d1c8/2a98] core keystore: using keystore module "memory" 
D/VLC: [ede46778/2a98] core libvlc: CPU has capabilities ARM_NEON FPU 
D/VLC: [ede472d8/2a98] core generic: creating audio output 
D/VLC: [f4e4bda8/2a98] core audio output: looking for audio output module matching "opensles": 4 candidates 
W/libOpenSLES: class OutputMix interface 0 requested but unavailable MPH=43 
D/VLC: [f4e4bda8/2a98] core audio output: using audio output module "opensles_android" 
D/VLC: [ede472d8/2a98] core generic: keeping audio output 
D/SecWifiDisplayUtil: Metadata value : SecSettings2 
D/ViewRootImpl: #1 mView = com.android.internal.policy.PhoneWindow$DecorView{22a16c1 I.E...... R.....ID 0,0-0,0} 
D/mali_winsys: new_window_surface returns 0x3000, [1440x2560]-format:1 
D/VLC: [ee923df8/2a98] core input: Creating an input for 'jellyfish-3-mbps-hd-h264.mkv' 
D/VLC: [ee923df8/2dbb] core input: using timeshift granularity of 50 MiB 
D/VLC: [ee923df8/2dbb] core input: using default timeshift path 
D/VLC: [ee923df8/2dbb] core input: `http://jell.yfish.us/media/jellyfish-3-mbps-hd-h264.mkv' gives access `http' demux `' path `jell.yfish.us/media/jellyfish-3-mbps-hd-h264.mkv' 
D/VLC: [f4ebbbc8/2dbb] core input source: specified demux: any 
D/VLC: [f4ebbbc8/2dbb] core input source: creating demux: access='http' demux='any' location='jell.yfish.us/media/jellyfish-3-mbps-hd-h264.mkv' file='(null)' 
D/VLC: [ee93be28/2dbb] core demux: looking for access_demux module matching "http": 6 candidates 
D/VLC: [ee93be28/2dbb] core demux: no access_demux modules matched 
D/VLC: [ee93bea8/2dbb] core access: creating access: http://jell.yfish.us/media/jellyfish-3-mbps-hd-h264.mkv 
D/VLC: [ee93bea8/2dbb] core access: looking for access module matching "http": 22 candidates 
D/VLC: [ee93bea8/2dbc] transport access: resolving jell.yfish.us ... 
E/VLC: [ee93bea8/2dbc] transport access: cannot resolve jell.yfish.us port 80: No address associated with hostname 
E/VLC: [ee93bea8/2dbb] access access: HTTP connection failure 
D/VLC: [ee93bea8/2dbb] http access: querying proxy for http://jell.yfish.us/media/jellyfish-3-mbps-hd-h264.mkv 
D/VLC: [ee93bea8/2dbb] http access: no proxy 
D/VLC: [ee93bea8/2dbb] http access: http: server='jell.yfish.us' port=80 file='/media/jellyfish-3-mbps-hd-h264.mkv' 
D/VLC: [ee93bea8/2dbb] core access: net: connecting to jell.yfish.us port 80 
E/VLC: [ee93bea8/2dbb] core access: cannot resolve jell.yfish.us port 80 : No address associated with hostname 
E/VLC: [ee93bea8/2dbb] http access: cannot connect to jell.yfish.us:80 
D/VLC: [ee93bea8/2dbb] core access: no access modules matched 
E/VLC: [f4ebbbc8/2dbb] core input source: cannot access http://jell.yfish.us/media/jellyfish-3-mbps-hd-h264.mkv 
E/VLC: [ee923df8/2dbb] core input: Your input can't be opened 
E/VLC: [ee923df8/2dbb] core input: VLC is unable to open the MRL 'http://jell.yfish.us/media/jellyfish-3-mbps-hd-h264.mkv'. Check the log for details. 

答えて

2

libvlcコードのビットを掘り後、私は、問題の原因は本当に簡単だった実現し、私は実際に私が考えていなかったことに満足していませんよそれ以前。

とにかく、同じ問題に直面している人の回答を投稿し、最も明白なものを確認する前にlibvlcに掘り下げます。

基本的に私は、マニフェストにINTERNET権限がありませんでした:あなたはドンよう

<uses-permission android:name="android.permission.INTERNET" /> 

ログは、レンダリングはUIスレッドで実行されていないためか、特別にAndroidの側で、非常に明確ではありません」通常はNetworkOnMainThreadExceptionになります。

関連する問題