Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-12T12:09:30.973Z
Answers.LastActivityDate: 2017-11-12T12:09:30.973Z
Answers.UserDisplayName: bukkojot
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-12T05:33:42.680Z
Answers.LastActivityDate: 2017-11-12T05:33:42.680Z
Answers.UserDisplayName: Gyan
Body: <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>
  
Tags: <ffmpeg><streaming><vlc>
Title: Best codec for playing unfinished files with VLC
UserDisplayName: Shultc
ThreadText: # Best codec for playing unfinished files with VLC
  
  (Asked by: username_0 on 2017-11-11)
  
  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](https://github.com/higankanshi/Meta.Vlc) 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.
  
  **Tags:** ffmpeg, streaming, vlc
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-11-12. Score: 1 | Accepted answer
  
  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.
  
  
  ---
  
  ### Answer by username_2 on 2017-11-12. Score: 1
  
  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.
  
  
  ---
  
  