Wowza Community

Problem with recorded mp4 files

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

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.

<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>

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.

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.

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

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.

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.

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.

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.