I'm busy with FFmpeg streaming to a RTMP server. What I'm trying to do is stream a png file that changes content. The PNG file is been created by PhantomJS every 1 second. The file is not bigger then 2MB.
when the content of the PNG file is changed, I get the error:
[png @ 0xe91740] chunk too big Error while decoding stream #0:0: Invalid data found when processing input
This works fine but it breaks at some point with:
[flv @ 0xe8a9c0] Failed to update header with correct duration.
[flv @ 0xe8a9c0] Failed to update header with correct filesize.
I know the problem is caused because FFmpeg still remembers the previous file data, and encoded the new file with those settings.
This is the command line I use:
ffmpeg -y -re -stream_loop -1 -f image2 -i image.png -strict -1 \
-c:v libx264 -preset veryfast -maxrate 1000k -bufsize 1000k \
-pix_fmt yuv420p -g 50 -threads 1 -f flv rtmp://server/live/test \
-nostdin -nostats -hide_banner > /dev/null &
I use Ubuntu Server.