not quite sure if this is the correct sub-forum to post this.

I am running wowza on an ec2 instance.

After recording a feed, the flv output has an incorrect duration. No change has been made to the initial installation.


This is the AS3 simplified code used to start and stop the webcam recording:

m_recorder.publish(m_strFilename, "record");
and exactly 30 seconds later:

protected function onRecordComplete (_event:Event):void
{
	m_timer.removeEventListener(TimerEvent.TIMER_COMPLETE, onRecordComplete);
			
	m_recorder.detachCamera();
	m_recorder.detachAudio();
			
	addEventListener(Event.ENTER_FRAME, onCheckBuffer);	
}
		
protected function onCheckBuffer (_event:Event):void
{
	if (m_recorder.bufferLength == 0)
	{
		m_recorder.publish("null", "");
		m_recorder.close();
				
		removeEventListener(Event.ENTER_FRAME, onCheckBuffer);
	}
}

The resulting FLV is 8 seconds too long (the actual 30 sec + an additionnal 8 sec of nothingness)

Input #0, flv, from 'video0.flv':
  Metadata:
    creationdate    : Tue Jan 28 23:00:18
  Duration: 00:00:39.39, start: 8.786000, bitrate: 775 kb/s
    Stream #0:0: Video: flv1, yuv420p, 640x360, 1k tbr, 1k tbn, 1k tbc
    Stream #0:1: Audio: nellymoser, 11025 Hz, mono, flt
As you can see the start the start time is : 8.786000 instead of 0.00000
Not sure what I'm doing wrong. The video is just unusable.






This is the complete ffprobe output for the resulting flv.


Input #0, flv, from 'video0.flv':
Metadata:
creationdate : Tue Jan 28 23:00:18
Duration: 00:00:39.39, start: 8.786000, bitrate: 775 kb/s
Stream #0:0: Video: flv1, yuv420p, 640x360, 1k tbr, 1k tbn, 1k tbc
Stream #0:1: Audio: nellymoser, 11025 Hz, mono, flt
[STREAM]
index=0
codec_name=flv
codec_long_name=FLV / Sorenson Spark / Sorenson H.263 (Flash Video)
profile=unknown
codec_type=video
codec_time_base=1/1000
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=640
height=360
has_b_frames=0
sample_aspect_ratio=0:1
display_aspect_ratio=0:1
pix_fmt=yuv420p
level=-99
timecode=N/A
id=N/A
r_frame_rate=1000/1
avg_frame_rate=0/0
time_base=1/1000
start_pts=9245
start_time=9.245000
duration_ts=N/A
duration=N/A
bit_rate=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
[/STREAM]
[STREAM]
index=1
codec_name=nellymoser
codec_long_name=Nellymoser Asao
profile=unknown
codec_type=audio
codec_time_base=1/11025
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
sample_fmt=flt
sample_rate=11025
channels=1
channel_layout=mono
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/1000
start_pts=8786
start_time=8.786000
duration_ts=N/A
duration=N/A
bit_rate=N/A
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
[/STREAM]