[FFmpeg-user] CLI for low fps high resolution streaming?

2020-12-07 Thread Rocky Ji
Hi all!

tl;dr

What's the best codec & fps (and other CLI config) to minimize
bandwidth usage for streaming text editor videos? Specifically:
 * high res (as close to original as possible)
 * low fps (< 8 is fine)
 * low color count
 * no audio

_

Details:

I want to stream video from a USB video capture device (using nginx).

The incoming video is of text editing for the most part, so I guess
difference between frames would be minimal 9/10 times. Color loss is
acceptable, but fonts should remain sharp.

I have found that `ffmpeg -f v4l2 -i /dev/video0 
rtmp://localhost/live/test` is the basic template I need to follow.

Of all the combinations of codecs/framerates I tested, the only thing
that works without killing itself is `-f flv`.

If I try to suggest framerates, it works for 1-2 seconds and dies with
`[flv @ 0x...] failed to update header with correct
duration/filesize`.

Not specifiying a codec gives some NULL error. mp4, x264, mpeg4,
mpeg2video don't work. I was hopeful for VP8, but `-f VP8` doesn't
work.

mpegts works but dies as soon as vlc tries to open it (without
streaming anything).

Please advice.

Thanks.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-user] How to get 4-bit PNG frames?

2021-01-01 Thread Rocky Ji
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-
filters.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.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] How to get 4-bit PNG frames?

2021-01-01 Thread Rocky Ji
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  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.
>
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-user] How to have dynamic FPS to only capture changes in i-frame

2024-02-18 Thread Rocky Ji
Hi,

I have to record lectures to preserve quality (i.e. legibility of letters)
and reduce file size, both to maximum possible extent.

In our lectures, only 2 things happen - either tutor is full screen or the
slides are fullscreen. Obviously, there is no time pattern when slides come
and when teacher comes.

Having read that some video format have I-frames that are used when scene
changes significantly, so what commands can I pass to ffmpeg to have
kind-of dynamic framerate - record only 1 frame when teacher is speaking
and then capture another frame when slide (significant change in scene)
comes or (more challenging) slide changes. It is okay to have video that
looks choppy.

I have kept audio at highest quality (untouched), but I am not sure how to
achieve the above for video part of the file.

Regards,
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".