Closed birdie-github closed 5 months ago
Thank you for the report.Two things missed here:
Thanks a lot for your work!
Speaking of 1: are you saying this patchset is required and is not yet merged?
For 1, we do not need to change the original patch. I will ask the mp4 maintainer to review and merge the patch. For 2, I will try to implement it this weekend and send it to the mailing list for review.
I'm seeing a similar thing. With the most current FFmpeg master, I can only open (ffplay) and convert (ffmpeg) a sample video called "NovosobornayaSquare_1920x1080.vvc" (I have forgotten the source). All other samples failed.
After applying the remaining patch from #182 the situation is as follows.
Sample "NovosobornayaSquare_1920x1080.mp4" from https://www.elecard.com/videos
Can be played (ffplay) and converted to h264 (-vcodec h264
), but I get the warning:
This device does not support the qmin option. Value ignored.
It failed to convert to hevc (-vcodec hevc
) with the error:
[hevc_videotoolbox @ 0x7fc340007680] This device does not support the qmin option. Value ignored.
[hevc_videotoolbox @ 0x7fc340007680] This device does not support the qmax option. Value ignored.
[hevc_videotoolbox @ 0x7fc340007680] Error encoding frame: -12905
[hevc_videotoolbox @ 0x7fc340007680] popping: -542398533
[vost#0:0/hevc_videotoolbox @ 0x7fc340007240] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
[vf#0:0 @ 0x7fc340007e80] Error sending frames to consumers: Generic error in an external library
[vf#0:0 @ 0x7fc340007e80] Task finished with error code: -542398533 (Generic error in an external library)
[vf#0:0 @ 0x7fc340007e80] Terminating thread with return code -542398533 (Generic error in an external library)
[vost#0:0/hevc_videotoolbox @ 0x7fc340007240] Could not open encoder before EOF
[vost#0:0/hevc_videotoolbox @ 0x7fc340007240] Task finished with error code: -22 (Invalid argument)
[vost#0:0/hevc_videotoolbox @ 0x7fc340007240] Terminating thread with return code -22 (Invalid argument)
[out#0/mp4 @ 0x7fc340005ac0] Nothing was written into output file, because at least one of its streams received no packets.
Sample "foreman_cif_pal.266.mp4" from https://code.videolan.org/videolan/vlc/-/issues/27055 Can be played (ffplay) without issue. Converting to h264 failed with the error:
[h264_videotoolbox @ 0x7fde1072efc0] Error: cannot create compression session: -12903
[h264_videotoolbox @ 0x7fde1072efc0] Try -allow_sw 1. The hardware encoder may be busy, or not supported.
[vost#0:0/h264_videotoolbox @ 0x7fde1072ebc0] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
[vf#0:0 @ 0x7fde1072f7c0] Error sending frames to consumers: Generic error in an external library
[vf#0:0 @ 0x7fde1072f7c0] Task finished with error code: -542398533 (Generic error in an external library)
[vf#0:0 @ 0x7fde1072f7c0] Terminating thread with return code -542398533 (Generic error in an external library)
[vost#0:0/h264_videotoolbox @ 0x7fde1072ebc0] Could not open encoder before EOF
[vost#0:0/h264_videotoolbox @ 0x7fde1072ebc0] Task finished with error code: -22 (Invalid argument)
[vost#0:0/h264_videotoolbox @ 0x7fde1072ebc0] Terminating thread with return code -22 (Invalid argument)
[out#0/mp4 @ 0x7fde107300c0] Nothing was written into output file, because at least one of its streams received no packets.
Sample "Arknights - Reimei Zensou - 01 [VVC_1080p_AAC].mp4" from https://drive.google.com/drive/folders/1JK1-k2_EfcgvQgQDzWRmBw7VgQLBaNI4 Gives the following error several times when played with ffmpeg and the picture is just black and green:
[vvc @ 0x7fafaaf51c80] Intra Block Copy is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[vvc @ 0x7fafaaf51c80] frame 33, P( 0, 2) failed with -1163346256
Sample "Kage no Jitsuryokusha ni Naritakute! - 10 VVenC_1080p_fast_qpa1_qp26.mp4" from https://drive.google.com/drive/folders/1JK1-k2_EfcgvQgQDzWRmBw7VgQLBaNI4 Can be played without any issue. Converting to h264 gives the error:
[vist#0:0/vvc @ 0x7fa6cd006240] Error submitting packet to decoder: Not yet implemented in FFmpeg, patches welcome
[vvc @ 0x7fa6cd030e40] Intra Block Copy is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[vvc @ 0x7fa6cd030e40] frame 353, P( 0, 2) failed with -1163346256
[vist#0:0/vvc @ 0x7fa6cd006240] Error submitting packet to decoder: Not yet implemented in FFmpeg, patches welcome
[vvc @ 0x7fa6cd030e40] Intra Block Copy is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[vvc @ 0x7fa6cd030e40] frame 378, P( 14, 10) failed with -1163346256
@Nomis101 , Thank you for the report
For 1, 2, it's not related to vvc. Maybe your hardware encoder issues, you can try with h264 as input or software encoder "./ffmpeg -i NovosobornayaSquare_1920x1080.mp4 -c:v libx265 test.mp4" "./ffmpeg -i NovosobornayaSquare_1920x1080.mp4 -c:v libx264 test.mp4"
for 3, 4, intra block copy is not supported yet. Please follow https://github.com/ffvvc/FFmpeg/pull/169
https://github.com/ffvvc/FFmpeg/pull/182 fixes it, thanks a ton!
@birdie-github mp4 and ts fix upstreamed. please have a try https://github.com/FFmpeg/FFmpeg/commit/db6e360afb81ec67d460f8d4d65a6dbead80136c
Cool, works perfectly now with all my samples above (apart from #169). Thank you all so much for your work!
Using ffmpeg snapshot 59686eaf33.
Source file is taken here https://www.elecard.com/videos
ffmpeg with vvdec is playing this file just fine: