2

The situation is described here.

In short, I need a way to save infinite video real-time, playable while being saved. Suppose, there are ways to do this.

I imagine it's done like in web DASH, in chunks, but saved locally. Ideally (though not necessary) so that any modern player program could play it by clicking on file. Also prefer open software and standards like ffmpeg and vp9.

Thanks for help!

1

All you have to do is output to a .ts container. It's designed for broadcasting systems, so it works fine with incomplete files.

ffmpeg -i INPUT -c copy OUTPUT.ts

You just have to put a compatible codec in the container. I haven't been able to find a list of what's compatible, but through testing I've found that H.264 and H.265 work.

.ts containers aren't the best once the file is complete, though, because seeking can take a while and they're about 7% bigger, so you can copy the data into an .mp4 container (assuming you're using H.264) when you're finished with

ffmpeg -i INPUT.ts -c copy OUTPUT.mp4
  • Thank you, seems suitable. Now I remember these files from dvd's. And cameras, which are practically my use-case (learned there are variations of ts with timestamps for seeking). And the stream is usually split into smaller files too. Know any alternatives to ts and its descendants just in case or they're the dominant standard? – Alexey Orekhov Jul 13 '17 at 8:55
  • There's no alternative containers that I'm aware of. I don't know if they don't exist, or if I just haven't found them yet. – PunctualEmoticon Jul 14 '17 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.