I have no idea if this idea will work but here is something you can give it a try.
I'd go along your second idea. If the stars align, you can use ffmpeg process encoding with segment
muxer while ffplay process decoding with concat
demuxer.
The main idea is that segment
muxer to produce a ~3-min video snippet (some duration shorter than the needed delay of ~4 min) after snippet throughout the day. This will give you predictable list of video files that ffplay
needs to play in a sequence. So, you can prepare the playlist accordingly.
The encoder part should look something like:
ffmpeg [fill dshow input here] -f segment -segment_time 180 -segment_format_options movflags=+faststart out%03d.mp4
You can pick any codec/format you wish. mp4/h264 is probably a sensible solution but if you want raw you can use .nut
format as well (see the other examples in the doc). When you experiment with it, you can enable -segment_list playlist.ffconcat
to see what the concat
demuxer expects.
If this display (is this an art installation?) will run for 24 hours, then you will have 480 files (assuming 3-min segments). Have all these filenames listed in the concat text and start ffplay after 4 minutes, by then the first segment should be available for playback. As ffplay plays, ffmpeg deposits new segments with prearranged file names every 3 minutes. So, you should be able to achieve continuous playback.
There is likely a way to make the delayed playback automated if you're programming all this. See the FFmpeg wiki on the topic of concatenation for more ideas.
You do need to be careful about the disk space, especially if you chose to store uncompressed video (.nut). Get a large storage or run a program on a side to delete consumed segments.
Again, I've never done this myself so I could very well be missing some details. But if I were you, this would be my first line of attack. Good luck.