[FFmpeg-user] Feeding raw image bytes into ffmpeg rawvideo (via nodejs) fails with Invalid buffer size on linux only

Ioannis Cherouvim ioannis.cherouvim at gmail.com
Sat Feb 6 19:21:01 EET 2021


Hello

The full description of my problem is at
https://stackoverflow.com/questions/66060074/feeding-raw-image-bytes-into-ffmpeg-rawvideo-fails-with-invalid-buffer-size-on-l

I have a nodejs program which I use to render raw bytes and pipe them
like that into ffmpeg:

> node generate | ffmpeg -f rawvideo -pixel_format rgb24 -video_size 1000x1000 -i - test.png

For large images it always fails with: Invalid buffer size, packet
size 65536 < expected frame_size 3000000

I found out that on linux, the pipe buffer size is 65536, so probably
that's why it fails.

Since I can't seem to be able to raise the pipe buffer size, is there
a way to let ffmpeg know that it should wait until all bytes have been
received, or I explicitly cancel it via CTLR+C or something?

thanks


More information about the ffmpeg-user mailing list