# Problem with recorded mp4 files

**URL:** <https://community.wowza.com/t/problem-with-recorded-mp4-files/35199>\
**Category:** Wowza Streaming Engine\
**Created:** [October 4, 2011, 6:39pm UTC](https://community.wowza.com/t/problem-with-recorded-mp4-files/35199 "2011-10-04T18:39:33Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![Eyal\_Hasson](https://avatars.discourse-cdn.com/v4/letter/e/9f8e36/32.png) [@Eyal\_Hasson](https://community.wowza.com/u/Eyal_Hasson)\
**Post date:** [October 11, 2011, 3:49pm UTC](https://community.wowza.com/t/problem-with-recorded-mp4-files/35199/21 "2011-10-11T15:49:52Z")

</div>

Any idea about what’s “QTWriterContextTrackAtomBase.getBlock: java.io.EOFException” or why does it happend after a timeout??

---

<div class="post-metadata">

**Author:** ![Eyal\_Hasson](https://avatars.discourse-cdn.com/v4/letter/e/9f8e36/32.png) [@Eyal\_Hasson](https://community.wowza.com/u/Eyal_Hasson)\
**Post date:** [October 11, 2011, 9:59pm UTC](https://community.wowza.com/t/problem-with-recorded-mp4-files/35199/22 "2011-10-11T21:59:52Z")

</div>

All I can say is that I am using the Application.xml configuration bellow, and streams that have bad cellular Internet connection sometimes are disconnected, and this problem occurs. However, not all disconnected recordings are suffering from this.

```auto
<Root>
	<Application>
		<!-- Uncomment to set application level timeout values
		<ApplicationTimeout>60000</ApplicationTimeout>
		<PingTimeout>12000</PingTimeout>
		<ValidationFrequency>8000</ValidationFrequency>
		<MaximumPendingWriteBytes>0</MaximumPendingWriteBytes>
		<MaximumSetBufferTime>60000</MaximumSetBufferTime>
		<MaximumStorageDirDepth>25</MaximumStorageDirDepth>
		-->
		<Connections>
			<AutoAccept>true</AutoAccept>
			<AllowDomains></AllowDomains>
		</Connections>
		<!--
			StorageDir path variables
			
			${com.wowza.wms.AppHome} - Application home directory
			${com.wowza.wms.ConfigHome} - Configuration home directory
			${com.wowza.wms.context.VHost} - Virtual host name
			${com.wowza.wms.context.VHostConfigHome} - Virtual host config directory
			${com.wowza.wms.context.Application} - Application name
			${com.wowza.wms.context.ApplicationInstance} - Application instance name
			
		-->
		<Streams>
			<StreamType>rtp-live-record-lowlatency</StreamType>
<!-- <StorageDir>${com.wowza.wms.context.VHostConfigHome}/content</StorageDir> -->
      <StorageDir>I:\Video\&#1513;&#1497;&#1491;&#1493;&#1512;&#1497;&#1501;_&#1495;&#1497;&#1497;&#1501;</StorageDir>
      <KeyDir>${com.wowza.wms.context.VHostConfigHome}/keys</KeyDir>
			<!-- LiveStreamPacketizers (separate with commas): cupertinostreamingpacketizer, smoothstreamingpacketizer, cupertinostreamingrepeater, smoothstreamingrepeater -->
      <LiveStreamPacketizers>cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer</LiveStreamPacketizers>
      <!-- Properties defined here will override any properties defined in conf/Streams.xml for any streams types loaded by this application -->
			<Properties>
			</Properties>
		</Streams>
		<!-- HTTPStreamers (separate with commas): cupertinostreaming, smoothstreaming -->
    <HTTPStreamers>cupertinostreaming,smoothstreaming,sanjosestreaming</HTTPStreamers>
		<SharedObjects>
			<StorageDir></StorageDir>
		</SharedObjects>
		<Client>
			<IdleFrequency>-1</IdleFrequency>
			<Access>
				<StreamReadAccess>*</StreamReadAccess>
				<StreamWriteAccess>*</StreamWriteAccess>
				<StreamAudioSampleAccess></StreamAudioSampleAccess>
				<StreamVideoSampleAccess></StreamVideoSampleAccess>
				<SharedObjectReadAccess>*</SharedObjectReadAccess>
				<SharedObjectWriteAccess>*</SharedObjectWriteAccess>
			</Access>
		</Client>
		<RTP>
			<!-- RTP/Authentication/[type]Methods defined in Authentication.xml. Default setup includes; none, basic, digest -->
			<Authentication>
				<PublishMethod>none</PublishMethod>
				<PlayMethod>none</PlayMethod>
			</Authentication>
			<!-- RTP/AVSyncMethod. Valid values are: senderreport, systemclock, rtptimecode -->
			<AVSyncMethod>senderreport</AVSyncMethod>
			<MaxRTCPWaitTime>12000</MaxRTCPWaitTime>
			<IdleFrequency>25</IdleFrequency>
			<RTSPSessionTimeout>90000</RTSPSessionTimeout>
			<RTSPMaximumPendingWriteBytes>0</RTSPMaximumPendingWriteBytes>
			<RTSPBindIpAddress></RTSPBindIpAddress>
			<RTSPConnectionIpAddress>0.0.0.0</RTSPConnectionIpAddress>
			<RTSPOriginIpAddress>127.0.0.1</RTSPOriginIpAddress>
			<IncomingDatagramPortRanges>*</IncomingDatagramPortRanges>
			<!-- Properties defined here will override any properties defined in conf/RTP.xml for any depacketizers loaded by this application -->
			<Properties>
			</Properties>
		</RTP>
		<MediaCaster>
			<!-- Properties defined here will override any properties defined in conf/MediaCasters.xml for any MediaCasters loaded by this applications -->
			<Properties>
				<Property>
				    <Name>forceInterleaved</Name>
				    <Value>true</Value>
				    <Type>Boolean</Type>
				</Property>			
			</Properties>
		</MediaCaster>
		<MediaReader>
			<!-- Properties defined here will override any properties defined in conf/MediaReaders.xml for any MediaReaders loaded by this applications -->
			<Properties>
			</Properties>
		</MediaReader>
		<MediaWriter>
			<!-- Properties defined here will override any properties defined in conf/MediaWriter.xml for any MediaWriter loaded by this applications -->
			<Properties>
			</Properties>
		</MediaWriter>
		<LiveStreamPacketizer>
			<!-- Properties defined here will override any properties defined in conf/LiveStreamPacketizers.xml for any LiveStreamPacketizers loaded by this applications -->
			<Properties>
			</Properties>
		</LiveStreamPacketizer>
		<HTTPStreamer>
			<!-- Properties defined here will override any properties defined in conf/HTTPStreamers.xml for any HTTPStreamer loaded by this applications -->
			<Properties>
			</Properties>
		</HTTPStreamer>
		<Repeater>
			<OriginURL></OriginURL>
			<QueryString><![CDATA[]]></QueryString>
		</Repeater> 
		<Modules>
			<Module>
				<Name>base</Name>
				<Description>Base</Description>
				<Class>com.wowza.wms.module.ModuleCore</Class>
			</Module>
			<Module>
				<Name>properties</Name>
				<Description>Properties</Description>
				<Class>com.wowza.wms.module.ModuleProperties</Class>
			</Module>
			<Module>
				<Name>logging</Name>
				<Description>Client Logging</Description>
				<Class>com.wowza.wms.module.ModuleClientLogging</Class>
			</Module>
			<Module>
				<Name>flvplayback</Name>
				<Description>FLVPlayback</Description>
				<Class>com.wowza.wms.module.ModuleFLVPlayback</Class>
			</Module>
      <Module>
        <Name>liveNames</Name>
        <Description>KHL Live Names</Description>
        <Class>com.khl.wms.module.liveNames</Class>
      </Module>
      <!--
      <Module>
        <Name>ModuleLiveStreamRecord</Name>
        <Description>ModuleLiveStreamRecord</Description>
        <Class>com.wowza.wms.plugin.livestreamrecord.ModuleLiveStreamRecord</Class>
      </Module>
-->
    </Modules>
		<!-- Properties defined here will be added to the IApplication.getProperties() and IApplicationInstance.getProperties() collections -->
		<Properties>
		</Properties>
	</Application>
</Root>

```

---

<div class="post-metadata">

**Author:** ![Eyal\_Hasson](https://avatars.discourse-cdn.com/v4/letter/e/9f8e36/32.png) [@Eyal\_Hasson](https://community.wowza.com/u/Eyal_Hasson)\
**Post date:** [November 14, 2011, 6:47pm UTC](https://community.wowza.com/t/problem-with-recorded-mp4-files/35199/23 "2011-11-14T18:47:09Z")

</div>

I have upgraded to Wowza server 3.0.2, but the problem persists. Actually it approaching a show stopper situation for the whole project. Please try to figure out what situation can generate the " QTWriterContextTrackAtomBase.getBlock: java.io.EOFException" error.

I was able to reproduce a part of this problem – if you follow the steps bellow, you will get a damaged mp4 files, although the EOFException does not appear.

1. Start streaming with Livu.

2. Interrupt the network connection for a few seconds, until Livu pops up with a message “Stream Error the connection was lost. Restarting in 5 seconds”.

3. Regain network access. Livu will continue streaming.

4. Do step 2 again.

5. Press cancel on this dialog, while still no network access.

This will create damaged files on the Wowza server.

Thanks,

Eyal.

---

<div class="post-metadata">

**Author:** ![Eyal\_Hasson](https://avatars.discourse-cdn.com/v4/letter/e/9f8e36/32.png) [@Eyal\_Hasson](https://community.wowza.com/u/Eyal_Hasson)\
**Post date:** [November 16, 2011, 7:57pm UTC](https://community.wowza.com/t/problem-with-recorded-mp4-files/35199/24 "2011-11-16T19:57:11Z")

</div>

You wrote “The only solution would be to record to FLV”. I understand that this will be H.264/AAC based flv (since this is my stream content), right?

Thanks,

Eyal.

---

<div class="post-metadata">

**Author:** ![Eyal\_Hasson](https://avatars.discourse-cdn.com/v4/letter/e/9f8e36/32.png) [@Eyal\_Hasson](https://community.wowza.com/u/Eyal_Hasson)\
**Post date:** [November 16, 2011, 8:05pm UTC](https://community.wowza.com/t/problem-with-recorded-mp4-files/35199/25 "2011-11-16T20:05:42Z")

</div>

Acctually, how do I change the recoding format to flv?

---

<div class="post-metadata">

**Author:** ![Eyal\_Hasson](https://avatars.discourse-cdn.com/v4/letter/e/9f8e36/32.png) [@Eyal\_Hasson](https://community.wowza.com/u/Eyal_Hasson)\
**Post date:** [November 17, 2011, 9:01am UTC](https://community.wowza.com/t/problem-with-recorded-mp4-files/35199/26 "2011-11-17T09:01:14Z")

</div>

I am streaming from the Livu iPhone app, and does not insert “mp4:” anywhere there. Anywat in the .conf file to enforce flv?

Thanks, Eyal.

---

<div class="post-metadata">

**Author:** ![Eyal\_Hasson](https://avatars.discourse-cdn.com/v4/letter/e/9f8e36/32.png) [@Eyal\_Hasson](https://community.wowza.com/u/Eyal_Hasson)\
**Post date:** [November 19, 2011, 9:21pm UTC](https://community.wowza.com/t/problem-with-recorded-mp4-files/35199/27 "2011-11-19T21:21:38Z")

</div>

O.K., I found how to make Livu stream in FLV. I’ll try that and let you know if it makes a difference.

Thanks,

Eyal.

---

<div class="post-metadata">

**Author:** ![Eyal\_Hasson](https://avatars.discourse-cdn.com/v4/letter/e/9f8e36/32.png) [@Eyal\_Hasson](https://community.wowza.com/u/Eyal_Hasson)\
**Post date:** [December 6, 2011, 4:12pm UTC](https://community.wowza.com/t/problem-with-recorded-mp4-files/35199/28 "2011-12-06T16:12:57Z")

</div>

Using flv for some time did get better results. Files are still not written correctly, meaning onWriteComplete is not called, but this does not totally corrupt the files. They are still readable although seeking in them is disabled (and requires reencoding).

However, I found out the iPhone can’t read them. Is there anyway to used flv on Wowza with iPhone?

Also, do i have any other, more reliable alternative for recording the live streams?

Thanks,

Eyal.

---

<div class="post-metadata">

**Author:** ![Eyal\_Hasson](https://avatars.discourse-cdn.com/v4/letter/e/9f8e36/32.png) [@Eyal\_Hasson](https://community.wowza.com/u/Eyal_Hasson)\
**Post date:** [December 7, 2011, 3:19pm UTC](https://community.wowza.com/t/problem-with-recorded-mp4-files/35199/29 "2011-12-07T15:19:05Z")

</div>

Hi Richard,

Would the Transcoder or nDVR addons help in this?

What about my second question about other, more reliable alternative for recording the live streams?

Thanks,

Eyal.

[Previous page](https://community.wowza.com/t/problem-with-recorded-mp4-files/35199.md?page=1)
