The issue has been closed
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](https://user-images.githubusercontent.com/170500/54367573-e1cc7600-4672-11e9-8d97-e3eabfd512e2.gif)
Note: This is not an easy issue and requires good Swift and macOS/iOS experience.
![](https://avatars1.githubusercontent.com/u/170270?v=4)
Could you share the original recording? (Just ZIP it and attach it here) So I can reproduce it locally.
posted by sindresorhus almost 6 years ago![](https://avatars3.githubusercontent.com/u/170500?v=4)
posted by brumm almost 6 years ago ![](https://avatars1.githubusercontent.com/u/170270?v=4)
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](https://user-images.githubusercontent.com/170270/54913098-993f7300-4f24-11e9-9006-1841184e6938.png)
posted by sindresorhus almost 6 years ago![](https://avatars1.githubusercontent.com/u/170270?v=4)
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?
posted by sindresorhus almost 6 years ago![](https://avatars0.githubusercontent.com/u/72159?v=4)
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.
posted by kornelski almost 6 years ago![](https://avatars1.githubusercontent.com/u/38711189?v=4)
@issuehunt has funded $60.00 to this issue.
posted by IssueHuntBot almost 6 years ago![](https://avatars1.githubusercontent.com/u/170270?v=4)
posted by sindresorhus almost 5 years ago