Best codec for playing unfinished files with VLC I am writing stream into video files with ffmpeg. Each file about 15 minutes. I want to be able to play finished and unfinished files with VLC (program using MetaVLC to be more precise). Which codec will best suit for this scenario?

I tried raw h264. Vlc can play them with option "demux=h264" but it unable to seek or change current time of playing. They play only from beginning.

I tried flv, but VLC can't play unfinished file.
You can use H.264 in MPEG-TS.

ffmpeg -i in -c:v libx264 out.ts


In Potplayer, I can play as well as seek. In VLC, as well, but timestamps are missing. Limitation is that you can only seek to keyframes. If you select a non-keyframe, then the video output will be frozen or corrupted till the player reaches a keyframe. Audio will work in any case.