cycle: initial support for splitting stream output in time (refs #561)
Example:
#cycle{duration=20m,
dst=std{mux=ts,access=file,dst=sport.ts}, duration=5m},
dst=std{mux=ts,access=file,dst=weather.ts}, duration=5m}
Skips 20 minutes, then records 5 minutes to sport.ts, then 5 more
minutes to weather.ts and restarts.
"duration" specifies the duration of the previous phase
"offset" specifies the offset at which the previous phase ends
and the next phase begins
(mutually exclusive with duration)
"dst" specifies the stream output chain for the phase
(if missing, the phase is skipped/discarded)
Durations and offsets are so far expressed as an integer, optionally
followed by a unit: w=week, d=day, h=hour, m=minute, s=second. Second
is the default.
Currently only the decoding time stamp can be used as a reference, but
adding local or UTC clocks should be relatively easy.
ES synchronization and reference frames management is left for
further study.
To avoid clobbering each file with the next one, you probably need to use --sout-file-format as well.