Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What browser are you using? I just tried this with a 0x00 to 0xff linear gradient ( https://www.imagemagick.org/image/gradients/linear_gradient...., duplicated so I have two frames) encoded to MPEG levels (16 to 235) 8-bit h264.

    ffmpeg -r 30 -f image2 -i linear_gradient%02d.png -vcodec libx264 -preset slow -crf 22 -pix_fmt yuv420p -start_number 1 -vframes 2  linear_gradient.mp4
Firefox stretches it to 0x01 to 0xfe, and introduces obvious banding in the process. MPV does the same thing, although it has an optional debanding filter. The black and white levels are only a single unit off from the original, so I doubt I'd notice in real video. The banding is a much bigger problem (solved by 10-bit color spaces), but GIF has more banding in general use.


Yeah I made some more tests with a full RGB color image and a youtube uploading and everything is fine now.

I'm pretty sure there was trouble some time ago though.... (It was with another computer. There's a lot of things that can introduce color shifts : video platform encoding, browser decoding, graphic card drivers / configuration etc.)

Thanks for the comment




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: