-
Notifications
You must be signed in to change notification settings - Fork 94
Description
Running this ffmpeg command to continually overwrite img.jpg
ffmpeg -i /dev/video0 -f image2 -update 1 img.jpg
and then running chafa in another terminal to watch the file
chafa --clear --watch img.jpg
will draw images, but eventually stops with
Bus error (core dumped) chafa --clear --watch img.jpg
Slowing the framerate makes it happen less often, but even at 1fps it will still eventually throw a bus error.
I stumbled upon this trying to get a feed of my webcam in my terminal with chafa and I'm not even sure if it's possible. I first tried to pipe directly from ffmpeg
ffmpeg -i /dev/video0 -f gif pipe:1 2>/dev/null | chafa
but it wouldn't render it unless I wrote a limited number of frames, which I suppose is because you can't have individual gif frames outside of a complete file. So I tried an image2 sequence
ffmpeg -i /dev/video0 -f image2pipe pipe:1 2>/dev/null | chafa
but it wouldn't really render that either, unless I captured a single image (which is completely black as the webcam has not time to autoexpose). This led me to try writing just the single image over and over, but this results in the core dump. I don't know if I'm going about this the wrong way, but I figured at least it shouldn't core dump.