Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Green line artifact on right side of gif #64

Closed
brumm opened this issue Mar 14, 2019 · 7 comments
Closed

Green line artifact on right side of gif #64

brumm opened this issue Mar 14, 2019 · 7 comments
Labels
bug Something isn't working

Comments

@brumm
Copy link

brumm commented Mar 14, 2019

Issuehunt badges

The bounty for this issue now applies to #183 instead.


Hey,

I'm seeing green artifacts on the right side of the resulting gif. The input video file is taken straight from the Mojave screen recording tool.

Here's a sample:

Screen Recording 2019-03-14 at 15 53 36


Note: This is not an easy issue and requires good Swift and macOS/iOS experience.

There is a $60.00 open bounty on this issue. Add more on Issuehunt.

@sindresorhus
Copy link
Owner

Could you share the original recording? (Just ZIP it and attach it here) So I can reproduce it locally.

@sindresorhus sindresorhus added the bug Something isn't working label Mar 25, 2019
@brumm
Copy link
Author

brumm commented Mar 25, 2019

@sindresorhus
Copy link
Owner

I can reproduce the problem when converting the video to PNG frames using ffmpeg too:

$ ffmpeg -i "Screen Recording 2019-03-14 at 15.53.36.mov" frame%04d.png

This is what I end up with:

frame0001

@sindresorhus
Copy link
Owner

I think it's because the dimensions of the video is 384x529, which is a problem, as both sides have to be divisible by 4.

@kornelski Any thoughts what we could do about this?

@kornelski
Copy link
Collaborator

kornelski commented Mar 25, 2019

If AVFoundation and ffmpeg both agree that there's a green line there, there's a green line there. It might be caused by Mojave encoding the video incorrectly, so I'd report that to Apple as a bug in the screen recording tool.

But I think odd sizes of videos are "legal" in general. Internally they may need to be padded, which is a pain to deal with, but should be supported (e.g. JPEG only supports multiplies of 8 or even 16, but you can have any size after conversion).

The cause of this is probably an off-by-one error in computation of the size of the chroma channel. If you really wanted a workaround for this, you could try decoding the video into planar YUV format. Assuming you'd get YUV bitplanes in the right sizes (without that garbage line), you could then resize chroma with appropriate padding to match luma's size.

@IssueHuntBot
Copy link

@IssueHunt has funded $60.00 to this issue.


@sindresorhus sindresorhus added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label May 3, 2019
@sindresorhus
Copy link
Owner

Closing as I agree this is not something we should fix. The bounty now applies to #183 instead.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants