<p>Computers don't let you delete from the start of a file, so every time you trim video away, would required the file to be completely re written. Not a great idea. It would be better use some a fragmented format like HLS or DASH, and delete old fragments.</p>

CC BY-SA 3.0
2017-03-03T14:52:45.550Z
2017-03-04T07:39:02.887Z
2017-03-04T07:39:02.887Z
SlimSCSI
<p>How can I save a <code>ffmpeg</code> stream to a file that would contain the last 10 minutes of the stream and would constantly change over time to have this duration?</p>

CC BY-SA 3.0
2017-03-03T07:46:54.777Z
Are you asking for an output file that acts as a FIFO buffer?
Gyan
CC BY-SA 3.0
2017-03-03T07:52:30.020Z
Yes. I want the file to contain the last 10 minutes of the stream.
user123456
<ffmpeg><streaming>
How to save a stream to a file that would constantly change over time to have the right duration?
user123456
# How to save a stream to a file that would constantly change over time to have the right duration?

(Asked by: username_0 on 2017-03-03)

How can I save a `ffmpeg` stream to a file that would contain the last 10 minutes of the stream and would constantly change over time to have this duration?

**Tags:** ffmpeg, streaming

> **Comments:**
> **username_1**: Are you asking for an output file that acts as a FIFO buffer?  
> **username_0**: Yes. I want the file to contain the last 10 minutes of the stream.  

---

## 1 answers

### Answer by username_2 on 2017-03-03. Score: 1

Computers don't let you delete from the start of a file, so every time you trim video away, would required the file to be completely re written. Not a great idea. It would be better use some a fragmented format like HLS or DASH, and delete old fragments.


---

