Fix to silent & generic errors when loading videos with unsupported codecs#73
Open
shoyguer wants to merge 1 commit intoEIRTeam:masterfrom
Open
Fix to silent & generic errors when loading videos with unsupported codecs#73shoyguer wants to merge 1 commit intoEIRTeam:masterfrom
shoyguer wants to merge 1 commit intoEIRTeam:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently when
av_find_best_streamreturnsAVERROR_DECODER_NOT_FOUND, the container is parsed and the stream exists. The codec is just not registered in this FFmpeg build.The old code treated this the same as a missing stream. It fell through to
"Couldn't find video stream: Decoder not found", with no hint about which codec is the problem. The playback object returned null andVideoStreamPlayerfailed silently.Changes
AVERROR_DECODER_NOT_FOUNDhandler inprepare_decoding(). It re-probes ignoring decoder availability, names the codec, and tries a named fallback before failing._codec_id_to_libvpxto_codec_id_to_preferred_decoder_namesince the function now covers more than VP8/VP9.AV_CODEC_ID_HEVC("hevc") andAV_CODEC_ID_AV1("libaom-av1"). If a future build includes those decoders, the plugin picks them up with no code change.Before
These is how errors were shown, for reference:
Couldn't find video stream: Decoder not foundPlugin returned null playbackAfter (unsupported codec, no fallback available)
Example to how errors are shown now:
No decoder found for 'hevc': codec not supported by this FFmpeg build.After (supported named decoder found)
No default decoder for 'vp9', retrying with 'libvpx-vp9'.With these changes, now my .mp4 videos that were NOT being played.

I used this export properties on Davinci Resolve
Info about the videos after Davinci:
video.txt
Info about the videos after I used Handbrake to compress them further:
videohb.txt
(all information taken from MediaInfo).
I was getting these errors before:
Now everything runs perfectly, with the same videos.
Hope it helps, as it helped me. If you find ANY issues, please let me know, so I can fix them ASAP.
Thanks for your time and for this amazing plugin!
😄