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

Support lacing in Matroska Blocks #3026

Closed
langxuelang opened this issue Jul 5, 2017 · 17 comments
Closed

Support lacing in Matroska Blocks #3026

langxuelang opened this issue Jul 5, 2017 · 17 comments
Assignees

Comments

@langxuelang
Copy link

langxuelang commented Jul 5, 2017

when I play some mkv files,exoplayer report error below.

07-05 16:12:40.148 4984-6060/com.Android56 E/ExoPlayerImplInternal: Internal track renderer error.
                                                                    com.google.android.exoplayer.ExoPlaybackException: com.google.android.exoplayer.ParserException: Lacing only supported in SimpleBlocks.
                                                                        at com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:262)
                                                                        at com.google.android.exoplayer.SampleSourceTrackRenderer.maybeThrowError(SampleSourceTrackRenderer.java:144)
                                                                        at com.google.android.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:439)
                                                                        at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:211)
                                                                        at android.os.Handler.dispatchMessage(Handler.java:101)
                                                                        at android.os.Looper.loop(Looper.java:156)
                                                                        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: Lacing only supported in SimpleBlocks.
                                                                        at com.google.android.exoplayer.extractor.webm.WebmExtractor.binaryElement(WebmExtractor.java:901)
                                                                        at com.google.android.exoplayer.extractor.webm.WebmExtractor$InnerEbmlReaderOutput.binaryElement(WebmExtractor.java:1421)
                                                                        at com.google.android.exoplayer.extractor.webm.DefaultEbmlReader.read(DefaultEbmlReader.java:123)
                                                                        at com.google.android.exoplayer.extractor.webm.WebmExtractor.read(WebmExtractor.java:363)
                                                                        at com.google.android.exoplayer.extractor.ExtractorSampleSource$ExtractingLoadable.load(ExtractorSampleSource.java:835)
                                                                        at com.google.android.exoplayer.upstream.Loader$LoadTask.run(Loader.java:222)
                                                                        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
                                                                        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
                                                                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
                                                                        at java.lang.Thread.run(Thread.java:776)

and this is the link of file
https://drive.google.com/open?id=0BwneL-jNaOWGMXRXN0RrYWNnUTQ

@andrewlewis
Copy link
Collaborator

The relevant error is "Lacing only supported in SimpleBlocks". Marking as an enhancement to support lacing in Blocks, but this seems to be rarely used so it's unlikely we will get round to it soon. (And if we do implement this, you'd need to upgrade to v2 to use it.)

If you need to use lacing, is it feasible for you to change the container to use only SimpleBlocks?

@andrewlewis andrewlewis changed the title specified mkv file cannot play Support lacing in Matroska Blocks Jul 5, 2017
@langxuelang
Copy link
Author

@andrewlewis thanks for your replying.So currently I will notice user not support this video format.

@anonym24
Copy link

anonym24 commented Dec 15, 2017

just downloaded random movie and couldn't play it, got this error
so it's already v2 and not supported yet, so problem isn't going to be solved soon?

@ojw28
Copy link
Contributor

ojw28 commented Dec 15, 2017

As per response above, this is low priority and is unlikely to be resolved soon.

@anonym24
Copy link

@ojw28 well I downloaded one more random movie (mkv) and again this error, so it's not that rarely, I believe it will happen quite often

@ojw28
Copy link
Contributor

ojw28 commented Dec 15, 2017

We've received two reports of this error in the past six months, which does not suggest this is a widely used feature.

@anonym24
Copy link

@ojw28 I think not many developers tested with 2-5 gb (bdrip 720p) MKVs, for me the problem happened with such videos

@NitroXenon
Copy link

The exception is thrown when I try to play a link today.
Sample video:
https://docs.google.com/file/d/0B859uoPMN-bfWTZqRE5rdWpaMkU/preview

@andrewlewis
Copy link
Collaborator

I'm afraid we're still treating this as low priority. We can revisit it if someone can provide evidence that there is a lot of demand for playing files with this feature. I think we're also happy to accept pull requests that cleanly add this functionality to MatroskaExtractor. Sorry not to be more helpful.

@hahafamilia
Copy link

I am interested in this issue.
I also have the same problem.
The version I am using now is 2.7.3.
Is there a release version that updates this issue?

@andrewlewis
Copy link
Collaborator

No. We're still treating this as a low priority feature request.

@Cardas26
Copy link

Cardas26 commented Jan 26, 2019

I have this issue with a number of MKV's and would love to see it fixed. Exoplayer is used by the Emby Android TV app to play movie files, and the issue has been reported on the Emby forums a number of times:

Report 1

Report 2

Report 3

Report 4

Report 5

Also on the Plex forums:

Report 1

Report 2

Report 3

I would certainly welcome this feature. I'm sure the users who reported their issues in the links above would too.

@andrewlewis
Copy link
Collaborator

Thanks for the information.

We are still treating this as a low priority feature request. I think we'd also welcome a pull request that adds support.

[Also tracked by internal issue: b/122814967.]

@nimaaaaw
Copy link

@andrewlewis Hi there,
are you still treating this issue as a low priority?
cause I get this exception for almost half of the mkv movie files that are larger than 100mb
and please if you dont have plans to add this support, give me a heads up to fix it myself

thanks in advance

@ojw28
Copy link
Contributor

ojw28 commented Apr 23, 2019

are you still treating this issue as a low priority?

Yes, as per what Andrew's already written above. We have no near term plans to work on this.

@ojw28 ojw28 removed the low priority label Dec 5, 2019
@ojw28 ojw28 assigned ojw28 and unassigned andrewlewis Dec 5, 2019
ojw28 added a commit that referenced this issue Dec 6, 2019
- Change sampleHasReferenceBlock to a block reading variable, which is
  what it is (the distinction didn't matter previously, but will do so
  when we add lacing support in full blocks because there wont be a 1:1
  relationship any more.
- Move sampleRead to be a reading state variable.
- Stop abbreviating "additional"

Issue: #3026
PiperOrigin-RevId: 284000937
ojw28 added a commit that referenced this issue Dec 6, 2019
- Remove "lacing" from member variables. They're used even if
  there is no lacing (and the fact that lacing is the way of
  getting multiple samples into a block isn't important).

Issue: #3026
PiperOrigin-RevId: 284152447
ojw28 added a commit that referenced this issue Dec 6, 2019
- Change sampleHasReferenceBlock to a block reading variable, which is
  what it is (the distinction didn't matter previously, but will do so
  when we add lacing support in full blocks because there wont be a 1:1
  relationship any more.
- Move sampleRead to be a reading state variable.
- Stop abbreviating "additional"

Issue: #3026
PiperOrigin-RevId: 284000937
ojw28 added a commit that referenced this issue Dec 6, 2019
- Remove "lacing" from member variables. They're used even if
  there is no lacing (and the fact that lacing is the way of
  getting multiple samples into a block isn't important).

Issue: #3026
PiperOrigin-RevId: 284152447
ojw28 added a commit that referenced this issue Dec 9, 2019
This change constrains the use of sample state member variables to
writeSampleData, finishWriteSampleData and resetWriteSampleData.
Using them elsewhere gets increasingly confusing when considering
features like lacing in full blocks. For example sampleBytesWritten
cannot be used when calling commitSampleToOutput in this case
because we need to write the sample data for multiple samples
before we commit any of them.

Issue: #3026
PiperOrigin-RevId: 284541942
ojw28 added a commit that referenced this issue Dec 9, 2019
Caveats:

- Block additional data is ignored if the block is laced
  and contains multiple samples. Note that this is not
  a loss of functionality (SimpleBlock cannot have block
  additional data, and lacing was previously completely
  unsupported for Block)

- Subrip and ASS samples are dropped if they're in laced
  blocks with multiple samples (I don't think this is
  valid anyway)

Issue: #3026
PiperOrigin-RevId: 284545197
@ojw28
Copy link
Contributor

ojw28 commented Dec 9, 2019

This is supported in dev-v2.

@ojw28 ojw28 closed this as completed Dec 9, 2019
ojw28 added a commit that referenced this issue Dec 9, 2019
This change constrains the use of sample state member variables to
writeSampleData, finishWriteSampleData and resetWriteSampleData.
Using them elsewhere gets increasingly confusing when considering
features like lacing in full blocks. For example sampleBytesWritten
cannot be used when calling commitSampleToOutput in this case
because we need to write the sample data for multiple samples
before we commit any of them.

Issue: #3026
PiperOrigin-RevId: 284541942
ojw28 added a commit that referenced this issue Dec 9, 2019
Caveats:

- Block additional data is ignored if the block is laced
  and contains multiple samples. Note that this is not
  a loss of functionality (SimpleBlock cannot have block
  additional data, and lacing was previously completely
  unsupported for Block)

- Subrip and ASS samples are dropped if they're in laced
  blocks with multiple samples (I don't think this is
  valid anyway)

Issue: #3026
PiperOrigin-RevId: 284545197
@ojw28
Copy link
Contributor

ojw28 commented Dec 11, 2019

This is also supported in our 2.11.0 release.

@google google locked and limited conversation to collaborators Feb 8, 2020
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

8 participants