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

ParserException: Unexpected ID3 file identifier, expected "ID3", actual "%c%c%c". #1966

Closed
harishrpatel opened this issue Oct 19, 2016 · 2 comments
Assignees

Comments

@harishrpatel
Copy link

harishrpatel commented Oct 19, 2016

We are seeing this issue on private content that requires authentication, so I cannot attach actual data. We have HLS content that has segments (.ts files). Each .ts file has ID3 tags in form of PrivFrames and they are used for Nielsen analytics purpose. All .ts files have ID3 header but some files randomly do not have the actual ID3 tag. When 3-4 .ts files contiguously do not have ID3 tags, ExoPlayer still tries to parse it. When I stepped through the code, data buffer is 10 bytes with all 0x00's. So, Unexpected ID3 file identifier, expected "ID3", actual ParserException is thrown. Can you please validate that there is an actual ID3 tag and then only try to parse it?

  • I validated content with Apple's mediastreamvalidator tool and 3rd party id3injector tool and content is valid.
  • I tested by pasting the authenticated URL into Demo App and failure is seen on both v1 (r1.5.11) and v2 (r2.0.1) versions.
  • Here are excerpts from one .ts file.

ID3 Header:

000000b0  ff ff ff ff ff ff ff ff  ff ff ff ff 47 50 00 10  |............GP..|
000000c0  00 02 b0 42 00 01 c1 00  00 e1 00 f0 11 25 0f ff  |...B.........%..|
000000d0  ff 49 44 33 20 ff 49 44  33 20 00 1f 00 01 1b e1  |.ID3 .ID3 ......|
000000e0  00 f0 00 0f e1 01 f0 06  0a 04 75 6e 64 00 15 e1  |..........und...|
000000f0  02 f0 0f 26 0d ff ff 49  44 33 20 ff 49 44 33 20  |...&...ID3 .ID3 |
00000100  00 0f fc 67 2c f4 ff ff  ff ff ff ff ff ff ff ff  |...g,...........|
00000110  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|

ID3 Tag example. Exception is thrown when 3-4 contiguous .ts files do not contain a tag:

00048ca0  0e a1 fe b1 e6 c4 39 8e  99 89 fd 6b a7 e8 85 2e  |......9....k....|
00048cb0  45 2d f7 e8 4a 65 55 cf  47 41 02 10 00 00 01 bd  |E-..JeU.GA......|
00048cc0  01 17 84 80 05 21 00 39  14 75 49 44 33 04 00 20  |.....!.9.uID3.. |
00048cd0  00 00 02 05 50 52 49 56  00 00 01 7b 00 00 77 77  |....PRIV...{..ww|
00048ce0  77 2e 6e 69 65 6c 73 65  6e 2e 63 6f 6d 2f 58 31  |w.nielsen.com/X1|
00048cf0  30 30 7a 64 43 49 47 65  49 6c 67 5a 6e 6b 59 6a  |00zdCIGeIlgZnkYj|
00048d00  36 55 76 51 3d 3d 2f 58  31 30 30 7a 64 43 49 47  |6UvQ==/X100zdCIG|
00048d10  65 49 6c 67 5a 6e 6b 59  6a 36 55 76 51 3d 3d 2f  |eIlgZnkYj6UvQ==/|
00048d20  41 41 41 42 67 4d 67 43  57 67 55 68 71 31 47 64  |AAABgMgCWgUhq1Gd|
00048d30  43 5f 62 63 38 6a 67 55  78 54 6e 5f 77 6f 36 76  |C_bc8jgUxTn_wo6v|
00048d40  47 70 39 78 63 30 30 50  74 6d 61 79 70 58 5f 52  |Gp9xc00PtmaypX_R|
00048d50  4c 47 43 43 65 35 39 49  38 61 41 44 6e 34 5f 65  |LGCCe59I8aADn4_e|
00048d60  31 47 53 44 70 4f 4a 78  53 6d 6a 32 47 43 71 64  |1GSDpOJxSmj2GCqd|
00048d70  74 72 75 54 47 01 02 31  52 00 ff ff ff ff ff ff  |truTG..1R.......|
00048d80  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|

Exception:
E/ExoPlayerImplInternal: Internal track renderer error.
com.google.android.exoplayer.ExoPlaybackException: com.google.android.exoplayer.ParserException: Unexpected ID3 file identifier, expected "ID3", actual "������".
at com.google.android.exoplayer.metadata.MetadataTrackRenderer.doSomeWork(MetadataTrackRenderer.java:112)
at com.google.android.exoplayer.SampleSourceTrackRenderer.doSomeWork(SampleSourceTrackRenderer.java:129)
at com.google.android.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:434)
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:213)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:154)
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.ParserException: Unexpected ID3 file identifier, expected "ID3", actual "������".
at com.google.android.exoplayer.metadata.id3.Id3Parser.parseId3Header(Id3Parser.java:136)
at com.google.android.exoplayer.metadata.id3.Id3Parser.parse(Id3Parser.java:49)
at com.google.android.exoplayer.metadata.id3.Id3Parser.parse(Id3Parser.java:33)
at com.google.android.exoplayer.metadata.MetadataTrackRenderer.doSomeWork(MetadataTrackRenderer.java:110)
at com.google.android.exoplayer.SampleSourceTrackRenderer.doSomeWork(SampleSourceTrackRenderer.java:129) 
at com.google.android.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:434) 
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:213) 
at android.os.Handler.dispatchMessage(Handler.java:98) 
at android.os.Looper.loop(Looper.java:154) 
at android.os.HandlerThread.run(HandlerThread.java:61) 
at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40) 

@AquilesCanta
Copy link
Contributor

Could you please download a ts chunk with these characteristics and send it to dev.exoplayer@gmail.com? So that I can have a look and test it myself.

@ojw28
Copy link
Contributor

ojw28 commented Oct 20, 2016

Sample content received; thanks!

ojw28 pushed a commit that referenced this issue Oct 24, 2016
@ojw28 ojw28 closed this as completed Oct 24, 2016
ojw28 pushed a commit that referenced this issue Oct 24, 2016
@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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants