Work with FLV video long enough and you'll find a common problem is videos that stop playing correctly once you play at or near the end. Typically they stutter if you try to reply them, or only play from the beginning (losing seek ability), or just plain stall out if you try to view them again after they've run once to the end.
It's caused by faulty encoding, and while I have not yet determined what encoders create the problem, I have found a fairly easy method to fix it that doesn't require re-encoding.
(The current builds of FFMPEG do not seem to be the culprit, but given how I encounter so many of these files "in the wild," and the near ubiqitous nature of FFMPEG, I suspect it might be from an earlier build of the program. If you use FFMPEG be sure to have a reasonably up-to-date version.)
According to Adob'e FLVCheck tool these files suffer from a "backwards" or anachronistic timestamp. That's always been a given, but it took my experimenting with writing my own metadata injector to find out that the bad timestamp is almost always placed at the end of the file, and has a value of 0. Not good.
One way to fix the problem is simply to re-encode, but this can cause a deterioration of quality. I tried a variety of metadata injectors, and so far have found only one that can fix this. It's Yamdi, available on sourceforge.
The trick with Yamdi is that you need to run it twice. The first time it will incorrectly set a duration and last timestamp of 0, probably reflecting the bad timestamp placed at the end of the file during encoding. However, if you run it again the proper durations and last timestamp values will be inserted in all the proper places.
Gordon
It's caused by faulty encoding, and while I have not yet determined what encoders create the problem, I have found a fairly easy method to fix it that doesn't require re-encoding.
(The current builds of FFMPEG do not seem to be the culprit, but given how I encounter so many of these files "in the wild," and the near ubiqitous nature of FFMPEG, I suspect it might be from an earlier build of the program. If you use FFMPEG be sure to have a reasonably up-to-date version.)
According to Adob'e FLVCheck tool these files suffer from a "backwards" or anachronistic timestamp. That's always been a given, but it took my experimenting with writing my own metadata injector to find out that the bad timestamp is almost always placed at the end of the file, and has a value of 0. Not good.
One way to fix the problem is simply to re-encode, but this can cause a deterioration of quality. I tried a variety of metadata injectors, and so far have found only one that can fix this. It's Yamdi, available on sourceforge.
The trick with Yamdi is that you need to run it twice. The first time it will incorrectly set a duration and last timestamp of 0, probably reflecting the bad timestamp placed at the end of the file during encoding. However, if you run it again the proper durations and last timestamp values will be inserted in all the proper places.
Gordon