Option --start-time doesn't work well for mpeg-files
In VLC 3.0.4 the --start-time option still doesn't work well for MPEG-2 files (PS-stream with correct timestamps).
The appended graphic shows for some videos the difference between the time, at which VLC starts, and the requested time t. In the middle of the movies the difference typically amounts to some minutes.
It seems, that VLC only uses the average-datarate A to estimate the postion of the data by: A*t. If the datarate is almost constant, this works well. But for most mpeg-files, captured from cable-TV, the variation of the datarate isn't small. May be VLC uses this simple method, because mpeg-files don't have a keyframe index. So some effort is needed, to find the position p(t) of the data for the frame at time t.
I think, using timestamps, one can improve this method easily by adding further steps:
p = A*t; p1 = nextGOPto(p);
if t1=t(p1) not near enough to t:
p = p1 + A*(t-t1); p2 = nextGOPto(p);
if t2=t(p2) not near enough to t, use interpolation:
p = p2 + (p2-p1)/(t2-t1) * (t-t2); p3 = nextGOPto(p);
t3=t(p3) should now be near enough to t, so one should find the optimal GOP in reasonable time by scanning from GOP to GOP.
I hope, someone will implement this or another improved method involving timestamps.