[FFmpeg-user] How to get 4-bit PNG frames?
Rocky Ji
rockyji3438 at gmail.com
Fri Jan 1 20:09:27 EET 2021
Ok.
But is there a way to limit pallette to 16 colors / 32 colors (using some
kind of estimation, rounding, etc.).
I used PNG because the incoming stream is of text editors and GUIs not
forest/movie like scenes. But now I am now open to using other formats such
as JPEG or GIF, etc. whichever gives least size at native resolution.
Happy New Year, thanks.
On Friday, January 1, 2021, Rocky Ji <rockyji3438 at gmail.com> wrote:
> Hi,
>
> I am using:
>
> ffmpeg -i /dev/video2 -r 4 -vf format=pal8 -pix_fmt pal8 -f image2
> s-%04d.png
>
> to get 4 8-bit PNG screenshots every second from game capture device (if I
> am understanding it correctly). For my purposes, I need to reduce size
> further. So I want to get 4-bit PNGs (or 5-bit is also ok).
>
> According to [https://trac.ffmpeg.org/wiki/colorspace] I should use
> colorspaces or zscale to achieve this. Unfortunately I can't find any
> information on color depth manipulation at [https://ffmpeg.org/ffmpeg-fil
> ters.html#colorspace]. So I look at zscale and there may be something at [
> https://github.com/sekrit-twc/zimg#depth] but I am unable to understand
> it (too technical).
>
> So, can I get 4-bit PNGs using ffmpeg only? If so how? Or I am doomed with
> needing to program python/go/node ...
>
> Thanks.
>
More information about the ffmpeg-user
mailing list