# Stream H264 / MP4 while recording

**URL:** <https://community.wowza.com/t/stream-h264-mp4-while-recording/34828>\
**Category:** Wowza Streaming Engine\
**Created:** [May 20, 2010, 4:37pm UTC](https://community.wowza.com/t/stream-h264-mp4-while-recording/34828 "2010-05-20T16:37:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Louis\_Matignon](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@Louis\_Matignon](https://community.wowza.com/u/Louis_Matignon)\
**Post date:** [May 20, 2010, 4:37pm UTC](https://community.wowza.com/t/stream-h264-mp4-while-recording/34828/1 "2010-05-20T16:37:22Z")

</div>

Hi all,

we are trying to achieve on a project the following workflow :

Long form videos (up to 4hours) are encoded by a third part encoder in H264, MP4 wrapped

We would like to be able to start a rtmp stream as soon as the file creation operation started, so our users wouldn’t wait the end of the encoding.

I’m actually trying to figure out whether that’s possible or not with the technology : MP4 + Flash streaming.

If in therory that could be ok, could you give me any tricks to follow to devellop my wowza modules, or any restriction I should take into account in my Encoder choice ?

Cheers,

Louis

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 20, 2010, 3:46pm UTC](https://community.wowza.com/t/stream-h264-mp4-while-recording/34828/2 "2010-05-20T15:46:30Z")

</div>

The encoding process involves a raw video on disk? I don’t think you can do it.

Or it is a live encoder? You can use StreamType “live” to view the stream while the encoder is also saving it to disk. And/or you can use StreamType “live-record” and users will be able to view while Wowza also records the stream.

Richard

---

<div class="post-metadata">

**Author:** ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)\
**Post date:** [May 20, 2010, 3:22pm UTC](https://community.wowza.com/t/stream-h264-mp4-while-recording/34828/3 "2010-05-20T15:22:28Z")

</div>

It is an MP4 issue. The file must be complete. It includes a header/tail that references all the items in the file (moov atom). So this header/tail cannot be written until the file is complete. There are ways to write fragmented files but we do not support these until the file writing is complete.

Charlie

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 20, 2010, 4:14pm UTC](https://community.wowza.com/t/stream-h264-mp4-while-recording/34828/4 "2010-05-20T16:14:04Z")

</div>

I don’t think it will work, but I am assuming. You could try. There wouldn’t be any trick to it, just make the output be the content folder on Wowza, and try to play it while it is encoding.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 30, 2010, 1:52pm UTC](https://community.wowza.com/t/stream-h264-mp4-while-recording/34828/5 "2010-05-30T13:52:57Z")

</div>

You can use StreamType “rtp-live-record”

Richard

---

<div class="post-metadata">

**Author:** ![Tim\_Erwin](https://avatars.discourse-cdn.com/v4/letter/t/e56c9b/32.png) [@Tim\_Erwin](https://community.wowza.com/u/Tim_Erwin)\
**Post date:** [May 29, 2010, 8:15pm UTC](https://community.wowza.com/t/stream-h264-mp4-while-recording/34828/6 "2010-05-29T20:15:31Z")

</div>

Is it possible to do live-record in a case where we have been using RTP-Live? We have a vlc config that works well for live Flash. But we would like to record it to the local disk while it is streaming live. Can we replace the rtp-live with live-record in the .

---

<div class="post-metadata">

**Author:** ![Louis\_Matignon](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@Louis\_Matignon](https://community.wowza.com/u/Louis_Matignon)\
**Post date:** [May 20, 2010, 5:07pm UTC](https://community.wowza.com/t/stream-h264-mp4-while-recording/34828/7 "2010-05-20T17:07:26Z")

</div>

your first assumption was the right one : The encoder source is a file on a disk.

Do you by any chance know whether it’s a limitation of the Flash streaming technology or of the MP4 standard ?

Cheers,

Louis

---

<div class="post-metadata">

**Author:** ![Louis\_Matignon](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@Louis\_Matignon](https://community.wowza.com/u/Louis_Matignon)\
**Post date:** [May 25, 2010, 9:46am UTC](https://community.wowza.com/t/stream-h264-mp4-while-recording/34828/8 "2010-05-25T09:46:33Z")

</div>

Ok, thanks a lot Charlie for that answer.

Cheers
