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

FLV ParserException #2634

Closed
Teviz opened this issue Mar 30, 2017 · 5 comments
Closed

FLV ParserException #2634

Teviz opened this issue Mar 30, 2017 · 5 comments
Labels

Comments

@Teviz
Copy link

Teviz commented Mar 30, 2017

Hi
I'm using v2.2 in my project, and I found that there are several FLV videos fails with ParserException as below.

com.google.android.exoplayer2.ParserException
at com.google.android.exoplayer2.extractor.flv.ScriptTagPayloadReader.parsePayload(ScriptTagPayloadReader.java:84)
at com.google.android.exoplayer2.extractor.flv.TagPayloadReader.consume(TagPayloadReader.java:65)
at com.google.android.exoplayer2.extractor.flv.FlvExtractor.readTagData(FlvExtractor.java:255)
at com.google.android.exoplayer2.extractor.flv.FlvExtractor.read(FlvExtractor.java:158)

The exception locate that line with notes says 'should never happen' when type is not AMF_TYPE_ECMA_ARRAY.
The type value is AMF_TYPE_OBJECT but not AMF_TYPE_ECMA_ARRAY when exception occurred.It seems that only metadata tag is illegal while audio tags and video tags are all right.And when I use some other player to play these video, there is no problem.
I believe that there must be some reason to check that type, but I don't know why.

So what should I do to avoid this exception ? And I hope to know the reason that why type can't be the object type.

@ojw28
Copy link
Contributor

ojw28 commented Mar 30, 2017

This issue is being closed because it does not adhere to our issue template, and/or because it omits information requested in the issue template that is required for us to investigate the problem efficiently. The issue template can be found here.

If you’re able to provide complete information as requested in the issue template, please do so below and we’ll re-open the issue. Thanks!

@Teviz
Copy link
Author

Teviz commented Mar 30, 2017

ok, sorry for that.

Issue description

When prepare some FLV videos, the player fails with ParserException.
I found the direct reason is that the metadata tag of FLV video is AMF_TYPE_OBJECT but not AMF_TYPE_ECMA_ARRAY.For more is out of my knowledge.

Reproduction steps

Using ExoPlayer demo app and replace the video url as I sent.

Link to test content

In the mail I sent.

Version of ExoPlayer being used

2.2.0

Device(s) and version(s) of Android being used

any Android OS Device I used.
e.g Nexus 5X emulator.
it reproduces every time.

A full bug report captured from the device

In the mail I sent.

@ojw28 ojw28 reopened this Mar 30, 2017
@ojw28 ojw28 added bug and removed need more info labels Mar 30, 2017
@ojw28
Copy link
Contributor

ojw28 commented Mar 30, 2017

Thanks. We'll push a fix for this shortly. The fix is just to swap:

      // Should never happen.
      throw new ParserException();

for:

      // We're not interested in this metadata.
      return;

@Teviz
Copy link
Author

Teviz commented Mar 31, 2017

ok. Thanks.
So at present, ExoPlayer only read 'duration' property from 'onMetaData' in FLV videos.
But there are some other properties in 'onMetaData' which may help us such as 'filesize', 'width' and 'height'.
Do you have any plan to support to parse these properties and open to us?

ojw28 added a commit that referenced this issue Mar 31, 2017
Issue: #2634

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151816597
@Teviz Teviz closed this as completed Apr 4, 2017
@ojw28
Copy link
Contributor

ojw28 commented Apr 24, 2017

I think we'd need a specific reason to parse additional properties. I think we already derive width and height from the actual video stream, for example.

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

No branches or pull requests

2 participants