user11523: 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.

user1871: 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.

user19905: Any header-less containers: .mjpeg (mjpeg raw streams, just concatenated jpeg images), .dv, .ts, .mpg (mpeg elementary stream, mpeg program stream), .h264 (annex b for raw h264 streams) and maybe other few.
You can edit video in these containers by direct byte manipulation. Sometime without knowledge where exact frame starts. You can build NLE video editor with bash and dd.
FLV is most simple container, this is stream format, you don't need to patch any bytes at finishing, but it have a small header (just few bytes). You can try to write it manually while opening file for writing.

11523: <p>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 <a href="https://github.com/higankanshi/Meta.Vlc" rel="nofollow noreferrer">MetaVLC</a> to be more precise). Which codec will best suit for this scenario?</p>

<p>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.</p>

<p>I tried flv, but VLC can't play unfinished file.</p>
 1871: <p>You can use H.264 in MPEG-TS.</p>

<pre><code>ffmpeg -i in -c:v libx264 out.ts
</code></pre>

<p>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.</p>
 19905: <p>Any header-less containers: <code>.mjpeg</code> (mjpeg raw streams, just concatenated jpeg images), <code>.dv</code>, <code>.ts</code>, <code>.mpg</code> (mpeg elementary stream, mpeg program stream), <code>.h264</code> (annex b for raw h264 streams) and maybe other few.</p>

<p>You can edit video in these containers by direct byte manipulation. Sometime without knowledge where exact frame starts. You can build NLE video editor with bash and dd.</p>

<p>FLV is most simple container, this is stream format, you don't need to patch any bytes at finishing, but it have a small header (just few bytes). You can try to write it manually while opening file for writing.</p>
