Skip to content
This repository has been archived by the owner on Nov 8, 2019. It is now read-only.

loadVideo throws NullPointerException for m3u8 streaming video #145

Closed
RamIndani opened this issue Jul 6, 2016 · 12 comments
Closed

loadVideo throws NullPointerException for m3u8 streaming video #145

RamIndani opened this issue Jul 6, 2016 · 12 comments

Comments

@RamIndani
Copy link

RamIndani commented Jul 6, 2016

Hi,

I am streaming .m3u8 videos using loadVideo with option FORMAT_HLS, most of the time VrVideoView crashes with NullPointerException. I am using samsung s3 and s6 for my testing and both have similar crash, this crash is intermittent. Below is the logcat for the same.

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.vr.sdk.widgets.video.VideoTexture.getIsTextureSet()' on a null object reference
at com.google.vr.sdk.widgets.video.VrVideoPlayerInternal.prepareFrame(VrVideoPlayerInternal.java:338)
at com.google.vr.sdk.widgets.video.VrVideoRenderer.onDrawFrame(VrVideoRenderer.java:57)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1522)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)

Similar bug is reported on GoogleCodeLab android VrVideoView lab. [https://github.com/googlecodelabs/vr_view_app_101/issues/5]

@dav-cz
Copy link
Contributor

dav-cz commented Jul 7, 2016

Thanks for the report. I was able to reproduce this just now.
Sadly it was too late to figure a fix for today's release, but we hope to release one soon.

@dav-cz
Copy link
Contributor

dav-cz commented Jul 21, 2016

Just a quick update that a fix for this was found, it will be pushed in our next update.

@RamIndani
Copy link
Author

Thanks for the updates.

@dav-cz
Copy link
Contributor

dav-cz commented Aug 5, 2016

@dav-cz dav-cz closed this as completed Aug 5, 2016
@RamIndani
Copy link
Author

RamIndani commented Aug 5, 2016

With the latest version of library I am able to reproduce this bug for Samsung Galaxy S3 with Android version 5.1.1 (Cyanogenmod) but I haven't faced this issue on Samsung Galaxy S6 with Android version 5.1.1, Can anyone please confirm? [I face this issue more often in debug mode] @dav-cz Can you please check this?

@ashwin-sectorqube
Copy link

On Loading .m3u8 file i am getting error like this.... please help

08-06 12:48:06.611 11657-11671/com.google.vr.sdk.samples.simplevideowidget E/ExoPlayerImplInternal: Internal track renderer error.
com.google.android.exoplayer.ExoPlaybackException: com.google.android.exoplayer.extractor.ExtractorSampleSource$UnrecognizedInputFormatException: None of the available extractors (WebmExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor) could read the stream.
at com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:263)
at com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:149)
at com.google.android.exoplayer.ExoPlayerImplInternal.incrementalPrepareInternal(ExoPlayerImplInternal.java:275)
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:205)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:207)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
Caused by: com.google.android.exoplayer.extractor.ExtractorSampleSource$UnrecognizedInputFormatException: None of the available extractors (WebmExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor) could read the stream.
at com.google.android.exoplayer.extractor.ExtractorSampleSource$ExtractorHolder.selectExtractor(ExtractorSampleSource.java:899)
at com.google.android.exoplayer.extractor.ExtractorSampleSource$ExtractingLoadable.load(ExtractorSampleSource.java:829)
at com.google.android.exoplayer.upstream.Loader$LoadTask.run(Loader.java:209)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
08-06 12:48:06.612 11657-11657/com.google.vr.sdk.samples.simplevideowidget E/VrVideoPlayerInternal: 9750259.onPlayerError
com.google.android.exoplayer.ExoPlaybackException: com.google.android.exoplayer.extractor.ExtractorSampleSource$UnrecognizedInputFormatException: None of the available extractors (WebmExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor) could read the stream.
at com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:263)
at com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:149)
at com.google.android.exoplayer.ExoPlayerImplInternal.incrementalPrepareInternal(ExoPlayerImplInternal.java:275)
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:205)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:207)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
Caused by: com.google.android.exoplayer.extractor.ExtractorSampleSource$UnrecognizedInputFormatException: None of the available extractors (WebmExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor) could read the stream.
at com.google.android.exoplayer.extractor.ExtractorSampleSource$ExtractorHolder.selectExtractor(ExtractorSampleSource.java:899)
at com.google.android.exoplayer.extractor.ExtractorSampleSource$ExtractingLoadable.load(ExtractorSampleSource.java:829)
at com.google.android.exoplayer.upstream.Loader$LoadTask.run(Loader.java:209)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
08-06 12:48:06.620 11657-11657/com.google.vr.sdk.samples.simplevideowidget E/SimpleVrVideoActivity: Error loading video: com.google.android.exoplayer.extractor.ExtractorSampleSource$UnrecognizedInputFormatException: None of the available extractors (WebmExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor) could read the stream.

@nathanmartz
Copy link

It looks like you have a file that the device is unable to read. Can you
play this stream on device outside if VR View? If not, you need to dig more
into encoding for HLS, which isn't something can really provide support for
here.

On Sat, Aug 6, 2016, 12:22 AM ashwin-sectorqube notifications@github.com
wrote:

On Loading .m3u8 file i am getting error like this.... please help

08-06 12:48:06.611 11657-11671/com.google.vr.sdk.samples.simplevideowidget
E/ExoPlayerImplInternal: Internal track renderer error.
com.google.android.exoplayer.ExoPlaybackException:
com.google.android.exoplayer.extractor.ExtractorSampleSource$UnrecognizedInputFormatException:
None of the available extractors (WebmExtractor, FragmentedMp4Extractor,
Mp4Extractor, Mp3Extractor, AdtsExtractor, TsExtractor, FlvExtractor,
OggExtractor, PsExtractor, WavExtractor) could read the stream.
at
com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:263)
at
com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:149)
at
com.google.android.exoplayer.ExoPlayerImplInternal.incrementalPrepareInternal(ExoPlayerImplInternal.java:275)
at
com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:205)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:207)
at android.os.HandlerThread.run(HandlerThread.java:61)
at
com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
Caused by:
com.google.android.exoplayer.extractor.ExtractorSampleSource$UnrecognizedInputFormatException:
None of the available extractors (WebmExtractor, FragmentedMp4Extractor,
Mp4Extractor, Mp3Extractor, AdtsExtractor, TsExtractor, FlvExtractor,
OggExtractor, PsExtractor, WavExtractor) could read the stream.
at
com.google.android.exoplayer.extractor.ExtractorSampleSource$ExtractorHolder.selectExtractor(ExtractorSampleSource.java:899)
at
com.google.android.exoplayer.extractor.ExtractorSampleSource$ExtractingLoadable.load(ExtractorSampleSource.java:829)
at
com.google.android.exoplayer.upstream.Loader$LoadTask.run(Loader.java:209)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
08-06 12:48:06.612 11657-11657/com.google.vr.sdk.samples.simplevideowidget
E/VrVideoPlayerInternal: 9750259.onPlayerError
com.google.android.exoplayer.ExoPlaybackException:
com.google.android.exoplayer.extractor.ExtractorSampleSource$UnrecognizedInputFormatException:
None of the available extractors (WebmExtractor, FragmentedMp4Extractor,
Mp4Extractor, Mp3Extractor, AdtsExtractor, TsExtractor, FlvExtractor,
OggExtractor, PsExtractor, WavExtractor) could read the stream.
at
com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:263)
at
com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:149)
at
com.google.android.exoplayer.ExoPlayerImplInternal.incrementalPrepareInternal(ExoPlayerImplInternal.java:275)
at
com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:205)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:207)
at android.os.HandlerThread.run(HandlerThread.java:61)
at
com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
Caused by:
com.google.android.exoplayer.extractor.ExtractorSampleSource$UnrecognizedInputFormatException:
None of the available extractors (WebmExtractor, FragmentedMp4Extractor,
Mp4Extractor, Mp3Extractor, AdtsExtractor, TsExtractor, FlvExtractor,
OggExtractor, PsExtractor, WavExtractor) could read the stream.
at
com.google.android.exoplayer.extractor.ExtractorSampleSource$ExtractorHolder.selectExtractor(ExtractorSampleSource.java:899)
at
com.google.android.exoplayer.extractor.ExtractorSampleSource$ExtractingLoadable.load(ExtractorSampleSource.java:829)
at
com.google.android.exoplayer.upstream.Loader$LoadTask.run(Loader.java:209)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
08-06 12:48:06.620 11657-11657/com.google.vr.sdk.samples.simplevideowidget
E/SimpleVrVideoActivity: Error loading video:
com.google.android.exoplayer.extractor.ExtractorSampleSource$UnrecognizedInputFormatException:
None of the available extractors (WebmExtractor, FragmentedMp4Extractor,
Mp4Extractor, Mp3Extractor, AdtsExtractor, TsExtractor, FlvExtractor,
OggExtractor, PsExtractor, WavExtractor) could read the stream.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#145 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANamfiDcx4hIvFOVUX3JQwk4BCxC293hks5qdDY2gaJpZM4JGVkf
.

@ashwin-sectorqube
Copy link

@dav-cz
Copy link
Contributor

dav-cz commented Aug 8, 2016

@ashwin-sectorqube -- please don't change the topic of this thread. This is a different issue, most likely because you didn't specify inputType = FORMAT_HLS, which is necessary to play m3u8 files as explained in the [reference documentation](https://developers.google.com/vr/android/reference/com/google/vr/sdk/widgets/video/VrVideoView.html#loadVideo%28Uri, com.google.vr.sdk.widgets.video.VrVideoView.Options%29).

@ashwin-sectorqube
Copy link

ok sorry.... ive tried that too....

On Mon, Aug 8, 2016 at 10:05 PM, David Coz notifications@github.com wrote:

@ashwin-sectorqube https://github.com/ashwin-sectorqube -- please don't
change the topic of this thread. This is a different issue, most likely
because you didn't specify inputType = FORMAT_HLS, which is necessary to
play m3u8 files as explained in the reference documentation
https://developers.google.com/vr/android/reference/com/google/vr/sdk/widgets/video/VrVideoView.html#loadVideo(Uri,%20com.google.vr.sdk.widgets.video.VrVideoView.Options)
.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#145 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATpFKsSIup0uZmw8F10rwrV7nKkcwfueks5qd1rkgaJpZM4JGVkf
.

@dav-cz
Copy link
Contributor

dav-cz commented Aug 8, 2016

@ashwin-sectorqube please create a new issue for this with logcat and code snippet used to play the file.

@anurag7141
Copy link

For playing m3u8 all you need to do is change the options input forma to <VrVideoView.Options.FORMAT_HLS> and it will work Uri uri = Uri.parse("https:proper_url.m3u8"); VrVideoView.Options vrVideoView = new VrVideoView.Options(); vrVideoView.inputFormat = VrVideoView.Options.FORMAT_HLS; videoWidgetView.loadVideo(uri, vrVideoView);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants