Closed dwbuiten closed 4 months ago
Looks reasonable, will try on some random av1 files later
Anything I can do to help move this along? I'm looking at getting a new Aegisub stable out but I'd like to have proper VP9/AV1 support, and don't want to build against a fork.
Anything I can do to help move this along? I'm looking at getting a new Aegisub stable out but I'd like to have proper VP9/AV1 support, and don't want to build against a fork.
Mostly it is a function of my time (of which I have little at the moment...) - the current PR seems to have issues, which I need to debug.
How about using libvpx to decode vp9? It seems more multi-thread capable than native one (but maybe slightly slower in single-thread) and with support of alpha channel in addition.
It seems not suffer form https://github.com/FFMS/ffms2/issues/352. Let me list in detail:
All above are built with msys2 mingw-w64 (as used by media-autobuild_suite), decoded data from all "good" results are exactly the same
I encountered this error opening files with video+audio with several combination of codecs after this PR. vapoursynth.Error: Source: Insanity detected: decoder returned an empty frame
But not all file of problematic combination will cause error, for example vp9+opus produced by ffmpeg fails but some files downloaded from YouTube don't. If audio is removed then the decoding will be successful.
@L4cache I am revisiting this PR currently, can you provide an example file?
@L4cache I am revisiting this PR currently, can you provide an example file?
https://transfer.sh/85oyj7LBrm/sample.zip
I forgot to mention, the way I apply this pr is https://github.com/L4cache/ffms2/tree/test-3 Many more video+audio codec combinations are affected, like, basically anything but h264 or h265 + commonly used lossy audio encoders (libmp3lame is broken but libshine is ok so I say encoder)
@L4cache Thanks, I was able to reproduce the issue using your sample. I will look into it.
@L4cache I found the bug. I have updated the PR.
Merged, let the testing begin!
Note thay CI failed for unrelated reasons. Tests pass locally, aside from HDR metadata which is being fixed upstream in FFmpeg right now.
This PR does two things:
AVERROR(EAGAIN)
fromavcodec_send_packet
by stashing the packet to send again on the next call, and fromavcodec_receive_frame
by increasing the delay counter.Since this makes changes to the core decode loop(s), it needs some good testing before merging. Particularily to confiirm AV1 and VP9 are, in fact, fixed (seeking, and linear).
Should (probably) fix #319, and makes #323 obsolete, I think. May or may not fix #352.
CC: @tdaede @jamrial @wangqr