I need to delay a live stream 15 seconds before running it through CasparCG server. The flow I am currently using is:
- Outside of casparcg, begin writing the stream to disk
- Wait 15 seconds
- Outside of casparcg, run ffmpeg -re -i temp.ts -c copy -f mpegts udp://127.0.0.1:1234
- Star playing this new stream on casparcg server via amcp: PLAY 1-1 udp://127.0.0.1:1234
Question #1, is there some way pass the -re flag (Read input at native frame rate) to ffmpeg in step 4, so I could eliminate step 3?
Question #2, is there a better way to produce the 15-second delay, preferably without writing the stream to disk?
Any tips and advice will be much appreciated, thanks!