ffmpeg -ss 519 -t 102 -i myinfile.avi myoutfile.avi -vcodec copy

gives me a file but "misses" the key frame at the beginning

i.e.

[mpeg4 @ 0000000001F99050] warning: first frame is no keyframe

As such the file when played is just all gobbledygook until it hits the first key frame.

Is there a way I can get ffmpeg to "go back" to the nearest key frame.

so if for example if it is 5 seconds previous to my required 519 seconds in just clip from there instead (automatically) ?

Help much appreciated.