Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExoPlayer does not support FLV #860

Closed
ehoodkatz opened this issue Oct 11, 2015 · 9 comments
Closed

ExoPlayer does not support FLV #860

ehoodkatz opened this issue Oct 11, 2015 · 9 comments

Comments

@ehoodkatz
Copy link

Hello,

I am learning ExoPlayer in order to replace it with the current player in my app. I am using the demo app as the client to play the videos currently being served to my app. However when I try to play these videos the following exception is thrown:

10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: Internal track renderer error.
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: com.google.android.exoplayer.ExoPlaybackException: com.google.android.exoplayer.extractor.ExtractorSampleSource$UnrecognizedInputFormatException: None of the available extractors (WebmExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, TsExtractor) could read the stream.
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: at com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:154)
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: at com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:145)
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: at com.google.android.exoplayer.ExoPlayerImplInternal.incrementalPrepareInternal(ExoPlayerImplInternal.java:283)
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:205)
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: at android.os.Handler.dispatchMessage(Handler.java:95)
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: at android.os.Looper.loop(Looper.java:176)
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: at android.os.HandlerThread.run(HandlerThread.java:61)
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: Caused by: com.google.android.exoplayer.extractor.ExtractorSampleSource$UnrecognizedInputFormatException: None of the available extractors (WebmExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, TsExtractor) could read the stream.
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: at com.google.android.exoplayer.extractor.ExtractorSampleSource$ExtractorHolder.selectExtractor(ExtractorSampleSource.java:807)
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: at com.google.android.exoplayer.extractor.ExtractorSampleSource$ExtractingLoadable.load(ExtractorSampleSource.java:738)
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: at com.google.android.exoplayer.upstream.Loader$LoadTask.run(Loader.java:209)
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: at java.util.concurrent.FutureTask.run(FutureTask.java:234)
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
10-11 12:26:39.634 25447-9657/com.google.android.exoplayer.demo E/ExoPlayerImplInternal: at java.lang.Thread.run(Thread.java:841)

10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: playerFailed [1.63]
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: com.google.android.exoplayer.ExoPlaybackException: com.google.android.exoplayer.extractor.ExtractorSampleSource$UnrecognizedInputFormatException: None of the available extractors (WebmExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, TsExtractor) could read the stream.
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: at com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:154)
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: at com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:145)
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: at com.google.android.exoplayer.ExoPlayerImplInternal.incrementalPrepareInternal(ExoPlayerImplInternal.java:283)
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:205)
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: at android.os.Handler.dispatchMessage(Handler.java:95)
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: at android.os.Looper.loop(Looper.java:176)
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: at android.os.HandlerThread.run(HandlerThread.java:61)
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: Caused by: com.google.android.exoplayer.extractor.ExtractorSampleSource$UnrecognizedInputFormatException: None of the available extractors (WebmExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, TsExtractor) could read the stream.
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: at com.google.android.exoplayer.extractor.ExtractorSampleSource$ExtractorHolder.selectExtractor(ExtractorSampleSource.java:807)
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: at com.google.android.exoplayer.extractor.ExtractorSampleSource$ExtractingLoadable.load(ExtractorSampleSource.java:738)
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: at com.google.android.exoplayer.upstream.Loader$LoadTask.run(Loader.java:209)
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: at java.util.concurrent.FutureTask.run(FutureTask.java:234)
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
10-11 12:26:39.639 25447-25447/com.google.android.exoplayer.demo E/EventLogger: at java.lang.Thread.run(Thread.java:841)

The peculliar thing is that the videos I am trying to play work with other players but not ExoPlayer. I looked at other issues that reported a similar issue but I was not able to use the insights in them to solve the problem.

The version of the demo app that I am using is from the master branch with last commit 0c060f4.

The file I am trying to play can be found in the following link:
http://5c856ba6cc9ed2fe2e9a-6e12211e6bcd3a3454f29c48581571ff.r59.stream.cf5.rackcdn.com/69c0f207-6c65-e511-80cd-fcaa14926e72_c624d65a-1566-e511-80cd-fcaa14926e72_87356fac-4302-e511-afdd-d0509926ddf2_android_28092015103324_986806128.mp4

I would appreciate any help.

Thank you in advance,
Ehood Katz

@ojw28
Copy link
Contributor

ojw28 commented Oct 11, 2015

Despite the mp4 file extension, this is actually an FLV video file. We don't currently support FLV. It does sort of work if you patch in this change, which adds FLV support: #828. We're yet to decide whether we want to support FLV officially. Note that even with this change, you cannot seek and the player gets stuck in the buffering state at the end of the content (see below).

A couple of questions:

  • If you control the media, why are you using FLV? Can you use MP4 instead? I don't think Android officially supports FLV for the built in MediaPlayer. I don't think iOS supports FLV either, although I could be wrong. Anyway, it seems like a strange choice.
  • There seems to be something weird/broken with the server. It claims the media is ~2GB long and then prematurely closes the connection at 84MB. For example if I try and fetch the media with curl, I get:
curl http://5c856ba6cc9ed2fe2e9a-6e12211e6bcd3a3454f29c48581571ff.r59.stream.cf5.rackcdn.com/69c0f207-6c65-e511-80cd-fcaa14926e72_c624d65a-1566-e511-80cd-fcaa14926e72_87356fac-4302-e511-afdd-d0509926ddf2_android_28092015103324_986806128.mp4 > testwhat.mp4
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  4 2047M    4 84.0M    0     0   379k      0  1:32:12  0:03:47  1:28:25  410
kcurl: (18) transfer closed with 2059165544 bytes remaining to read

This is broken and will cause issues. It's most likely why playback gets stuck in the buffering state when you patch in FLV support (not certain about this).

@ehoodkatz
Copy link
Author

Thank you for the quick reply and the useful information. I would also like
to know what you used out that the file is in FLV format and not MP4, if
possible, so in the future I will know first to check the file file format.

Respectfully,
Ehood Katz

On Sun, Oct 11, 2015 at 8:48 PM ojw28 notifications@github.com wrote:

Despite the mp4 file extension, this is actually an FLV video file. We
don't currently support FLV. It does sort of work if you patch in this
change, which adds FLV support: #828
#828. We're yet to decide
whether we want to support FLV officially. Note that even with this change,
you cannot seek and the player gets stuck in the buffering state at the end
of the content (see below).

A couple of questions:

  • If you control the media, why are you using FLV? Can you use MP4
    instead? I don't think Android officially supports FLV for the built in
    MediaPlayer. I don't think iOS supports FLV either, although I could be
    wrong.
  • There seems to be something weird/broken with the server. It claims
    the media is ~2GB long and then prematurely closes the connection at 84MB.
    For example if I try and fetch the media with curl, I get:

curl http://5c856ba6cc9ed2fe2e9a-6e12211e6bcd3a3454f29c48581571ff.r59.stream.cf5.rackcdn.com/69c0f207-6c65-e511-80cd-fcaa14926e72_c624d65a-1566-e511-80cd-fcaa14926e72_87356fac-4302-e511-afdd-d0509926ddf2_android_28092015103324_986806128.mp4 > test.mp4
olly-macbookpro2:exoplayer-aosp olly$ curl http://5c856ba6cc9ed2fe2e9a-6e12211e6bcd3a3454f29c48581571ff.r59.stream.cf5.rackcdn.com/69c0f207-6c65-e511-80cd-fcaa14926e72_c624d65a-1566-e511-80cd-fcaa14926e72_87356fac-4302-e511-afdd-d0509926ddf2_android_28092015103324_986806128.mp4 > testwhat.mp4
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
4 2047M 4 84.0M 0 0 379k 0 1:32:12 0:03:47 1:28:25 410
kcurl: (18) transfer closed with 2059165544 bytes remaining to read

This is broken and will cause issues. It's most likely why playback gets
stuck in the buffering state when you patch in FLV support (not certain
about this).


Reply to this email directly or view it on GitHub
#860 (comment).

@ojw28
Copy link
Contributor

ojw28 commented Oct 11, 2015

I used this tool. This is by no means an endorsement, but it did the job in this case!

@ojw28 ojw28 changed the title ExoPlayer throws UnrecognizedInputFormatException ExoPlayer does not support FLV Oct 11, 2015
@ojw28
Copy link
Contributor

ojw28 commented Oct 26, 2015

FLV is now supported, although without seeking support currently. FLV doesn't actually contain a media index to make seeking easy, so it's unclear whether we'll ever support it. Closing the issue for now. @jeoliva can comment on whether it makes sense to add seeking support at some point, or not.

@ojw28 ojw28 closed this as completed Oct 26, 2015
@trungptdhcn
Copy link

I pull #828, I still play video with flv sample, However when I try to play my flv videos the following exception is thrown:
untitled
I need any help! Thank you in advance
Jodie Pham!

@sabinsbn
Copy link

sabinsbn commented Feb 8, 2016

hi,
Same happens for me. Any help??

@ojw28
Copy link
Contributor

ojw28 commented Feb 8, 2016

Please file a separate issue, with all of the information listed here including a link to sample media. Most likely the media you're attempting to play is not supported by Android/ExoPlayer.

@arjuntu
Copy link

arjuntu commented Feb 9, 2016

ok, i will do that. thank u.

@v4ekmarev
Copy link

@trungptdhcn you solved an issue?

@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants