#10255(avcodec:new): prores_ks encoder on Mac with M2 creates flickering
#10255: prores_ks encoder on Mac with M2 creates flickering -------------------------------------+------------------------------------- Reporter: jonnyburger | Type: defect Status: new | Priority: normal Component: avcodec | Version: | unspecified Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Summary of the bug: On an M2 Mac, encoding an image sequence with -profile:v 4 (4444) and the pixel format yuva444p10le creates a flickering video. The issue was reproduced by two separated developers, but the bug does not happen on a M1 Mac. We suspect it has to do with the Apple Silicon Media Engine. FFmpeg version: N-110004-g1231003c3c (build from latest development commit) How to reproduce: Get the reproduction from https://streams.videolan.org/ffmpeg/incoming /prores-repro.zip Command {{{ ffmpeg \ -r 30 \ -f image2 \ -s 1280x720 \ -start_number 0 \ -i out/element-%03d.png \ -vcodec prores_ks \ -profile:v 4 \ -pix_fmt yuva444p10le \ -map_metadata -1 \ -vendor apl0 \ -metadata comment="Made with Remotion 3.3.75" \ -y \ out.mov }}} Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker. -- Ticket URL: <https://trac.ffmpeg.org/ticket/10255> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10255: prores_ks encoder on Mac with M2 creates flickering -------------------------------------+----------------------------------- Reporter: jonnyburger | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Description changed by jonnyburger: Old description:
Summary of the bug:
On an M2 Mac, encoding an image sequence with -profile:v 4 (4444) and the pixel format yuva444p10le creates a flickering video.
The issue was reproduced by two separated developers, but the bug does not happen on a M1 Mac. We suspect it has to do with the Apple Silicon Media Engine.
FFmpeg version: N-110004-g1231003c3c (build from latest development commit)
How to reproduce:
Get the reproduction from https://streams.videolan.org/ffmpeg/incoming /prores-repro.zip
Command
{{{ ffmpeg \ -r 30 \ -f image2 \ -s 1280x720 \ -start_number 0 \ -i out/element-%03d.png \ -vcodec prores_ks \ -profile:v 4 \ -pix_fmt yuva444p10le \ -map_metadata -1 \ -vendor apl0 \ -metadata comment="Made with Remotion 3.3.75" \ -y \ out.mov }}}
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
New description: Summary of the bug: On an M2 Mac, encoding an image sequence with -profile:v 4 (4444) and the pixel format yuva444p10le creates a flickering video. The issue was reproduced by two separated developers, but the bug does not happen on a M1 Mac. We suspect it has to do with the Apple Silicon Media Engine. FFmpeg version: N-110004-g1231003c3c (build from latest development commit) How to reproduce: Get the reproduction from https://streams.videolan.org/ffmpeg/incoming /prores-repro.zip Command {{{ ffmpeg \ -r 30 \ -f image2 \ -s 1280x720 \ -start_number 0 \ -i out/element-%03d.png \ -vcodec prores_ks \ -profile:v 4 \ -pix_fmt yuva444p10le \ -map_metadata -1 \ -vendor apl0 \ -metadata comment="Made with Remotion 3.3.75" \ -y \ out.mov }}} -- -- Ticket URL: <https://trac.ffmpeg.org/ticket/10255#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10255: prores_ks encoder on Mac with M2 creates flickering -------------------------------------+----------------------------------- Reporter: jonnyburger | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by Thomas): I'd like to add something: the problem is not when encoding on an M2 Mac on my end, but when decoding on an M2 Mac, which is a bigger problem since I can't solve this problem for M2 users when I encode a prores (with alpha) video on a Linux machine. -- Ticket URL: <https://trac.ffmpeg.org/ticket/10255#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10255: prores_ks encoder on Mac with M2 creates flickering -------------------------------------+----------------------------------- Reporter: jonnyburger | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by Elon Musk): So to clarify and to be able to reproduce, check which one/multiply are correct/true: * decoding is not correct * encoding is not correct * decoding is not working properly on certain arch combo * encoding is not working properly on certain arch combo * when decoding always native ffmpeg decoder is used? -- Ticket URL: <https://trac.ffmpeg.org/ticket/10255#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10255: prores_ks encoder on Mac with M2 creates flickering -------------------------------------+----------------------------------- Reporter: jonnyburger | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by Thomas): Sorry about the misunderstanding. Actually, this is the `prores_ks` encoding (4444 w/alpha) that is not correct, on all platforms. Flickering only occurs when playing the video on a Mac M2 though, using native players such as Quicktime, iMovie, etc. To reproduce: - encode a prores 4444 w/alpha video on any platform - play the video on a Mac M2 using Quicktime -- Ticket URL: <https://trac.ffmpeg.org/ticket/10255#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10255: prores_ks encoder on Mac with M2 creates flickering -------------------------------------+----------------------------------- Reporter: jonnyburger | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by jonnyburger): I agree with Thomas and the original bug report is unprecise. The encoding is the same on both M1 and M2, but the playback on M2 is wrong. To complete the reproduction: Take the reproduction from the first post, and play the video with QuickTime on macOS on M2. To answer your question: - decoding on macOS does not work correctly when the video is encoded with FFmpeg - the QuickTime player is used for decoding - It is not clear yet whether the fault is in the encoder or decoder - The decoding works correctly on M1 arch, but not on M2 arch - The encoding is presumably the same on both platforms, since it is software encoding. My company remotion.dev is paying out a $500 bounty for the developer who can submit a patch! This fix has value to us because it would allow users to export transparent videos and drag them into other video editing programs. The bounty can be claimed by emailing jonny@remotion.dev. -- Ticket URL: <https://trac.ffmpeg.org/ticket/10255#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10255: prores_ks encoder on Mac with M2 creates flickering -------------------------------------+----------------------------------- Reporter: jonnyburger | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by Kieran Kunhya): Replying to [comment:3 Elon Musk]:
So to clarify and to be able to reproduce, check which one/multiply are correct/true:
* decoding is not correct * encoding is not correct * decoding is not working properly on certain arch combo * encoding is not working properly on certain arch combo * when decoding always native ffmpeg decoder is used?
FFmpeg also has videotoolbox support for hardware decoding of FFmpeg so this should be checked too. -- Ticket URL: <https://trac.ffmpeg.org/ticket/10255#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10255: prores_ks encoder on Mac with M2 creates flickering -------------------------------------+----------------------------------- Reporter: jonnyburger | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by jonnyburger): I tried on a M2 Mac on a copy of FFmpeg (`N-111888-gfc993e7a53`), enabled with `--enable-videotoolbox`, as an additional step of my repro: {{{ ffmpeg -hwaccel videotoolbox -i out.mov out.mp4 -y }}} It seems to have picked up, since values other than `videotoolbox` throw an error. The video transcodes without any flickering, although quality is degraded. I used ffmpeg to convert a video, because according of my knowledge, ffplay does not support the hwaccel flag. -- Ticket URL: <https://trac.ffmpeg.org/ticket/10255#comment:7> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10255: prores_ks encoder on Mac with M2 creates flickering -------------------------------------+----------------------------------- Reporter: jonnyburger | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by Clément Bœsch): I'm looking into the issue currently. -- Ticket URL: <https://trac.ffmpeg.org/ticket/10255#comment:8> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10255: prores_ks encoder on Mac with M2 creates flickering -------------------------------------+----------------------------------- Reporter: jonnyburger | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by jonnyburger): By the way, we (remotion.dev) have put out a $500 bounty to anyone can solve this: https://twitter.com/Remotion/status/1697141747426492422 -- Ticket URL: <https://trac.ffmpeg.org/ticket/10255#comment:9> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10255: prores_ks encoder on Mac with M2 creates flickering -------------------------------------+----------------------------------- Reporter: jonnyburger | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by Clément Bœsch): The following pending patch should address the issue: https://ffmpeg.org//pipermail/ffmpeg-devel/2023-December/318922.html -- Ticket URL: <https://trac.ffmpeg.org/ticket/10255#comment:10> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10255: prores_ks encoder on Mac with M2 creates flickering -------------------------------------+----------------------------------- Reporter: jonnyburger | Owner: (none) Type: defect | Status: new Priority: normal | Component: avcodec Version: unspecified | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by jonnyburger): For us, the patch solves the issue! -- Ticket URL: <https://trac.ffmpeg.org/ticket/10255#comment:11> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10255: prores_ks encoder on Mac with M2 creates flickering -------------------------------------+----------------------------------- Reporter: jonnyburger | Owner: (none) Type: defect | Status: closed Priority: normal | Component: avcodec Version: unspecified | Resolution: fixed Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Changes (by Marth64): * status: new => closed * resolution: => fixed Comment: Closing because patch was merged and user indicates it resolved the issue. Thank you. -- Ticket URL: <https://trac.ffmpeg.org/ticket/10255#comment:12> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg