question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make Metadata-extractors fail fast

See original GitHub issue

Use case description

Right now incorrectly videos with incorrect metadata failing to play with cryptic assert: Loading finished before preparation is completed

The most primitive scenario is to pass 0-length video. You could try it in any sample app.

Failure to find the moov segment by any reason causes the same assert. I guess failure to find tracks will cause the similar problem as well.

Proposed solution

The Extractor should throw an error instead of letting the upper layer to guess what went wrong. Ideally extractor should provide some information about file size, missing fields etc.

It will simplify debugging of such issues.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ojw28commented, Jan 13, 2020

It’s not feasible to implement such a feature in a sensible way. Codec support isn’t even evaluated in the MediaSource, since it’s not the MediaSources responsibility to try and play the media.

0reactions
ojw28commented, Jan 17, 2020

Coming back to the original request:

I agree for the user there is no difference why video is not playing, but there is a difference for the application developer. And meaningful messages will definitely make the debugging loop shorter which will result in better user experience as the problems will be addressed faster. Isn’t it better to see an exception that video was 0 size instead of just Loading finished before preparation is completed?

Yes, it would definitely be better, but there are many thousands of potential reasons for failure in our extractors. It would not be a good use of time for us to create friendly debug messages for all of them, and it would add a significant amount of bloat to the library.

If it is impossible to narrow down why preparation has failed while loading of video was finished maybe it is possible to fast fail some well known cases?

The well known case is that the media is not malformed. I’m not sure that feeding a file of length 0 to the player is a common case. It’s also easy for a developer to debug themselves by taking a very cursory look at what they’ve fed in.

Maybe there is way to specify which extractor failed? Or tell which parameters are mandatory for an extractor?

Determining which extractor will be being used is equivalent to knowing what container format the media uses, which is also easy to determine with a very cursory look at what was fed in (e.g., mediainfo file.ext on the command line).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make Powershell Extract Metadata script run faster?
I tried putting all the get-item lines together in a for-loop thinking that it would be faster to retrieve the file once from...
Read more >
Metadata extraction failed - CloverCARE Support - CloverDX
I am using CloverETL to extract data and metadata from a sql database. The sql database connection is valid, however when I try...
Read more >
Failed to start Tracker metadata extractor 2 - Support
systemd[1671]: Failed to start Tracker metadata extractor. ░░ Subject: A start job for unit UNIT has failed ░░ Defined-By: systemd ░░ Support: ...
Read more >
Is Fast Search able to extract file metadata?
I was not able to find if Fast Search is able to extract meta data from files. I'm not talking about meta data...
Read more >
meta-extractor-info-sheet.pdf - Metadata Extraction Tool
Automation is integral to implementing a digital preservation metadata strategy: o It mitigates the risk of human error. o It allows the processing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found