Results 1 to 10 of 14

Thread: Invalid flv when recording

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Invalid flv when recording

    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]

  2. #2

    Default

    Hi, what StreamType is your application set to? If the StreamType is set to "live" try setting it to "default" instead.

    Also, you might try using the example that ships with Wowza, [install-dir]/examples/WebcamRecording

    Salvadore

  3. #3

    Default

    And make sure that the mic doesn't have the silence level set (or is set to "0") and that you are attaching the camera and mic before you start publishing.

    Salvadore

  4. #4

    Default

    Hi Salvadore.

    In the amazon cloudfront template, the examples folder was not included. I tried to find it on the web, but I had no luck.

    I'm using the vods3 Application.xml and the StreamType is "default".


    In flash, I am using theses settings for the microphone and camera (I tried different combination without a signifiant improvement).


    m_h264 = new H264VideoStreamSettings();
    m_h264.setProfileLevel(H264Profile.BASELINE, H264Level.LEVEL_3_1);
    m_h264.setQuality(0, 90);
    m_h264.setMode(WIDTH, HEIGHT, FPS);
    
    m_camera.setMode(WIDTH, HEIGHT, FPS, true);
    m_camera.setQuality(0, 90);
    m_camera.addEventListener(StatusEvent.STATUS, onCameraStatus); 
    m_camera.setKeyFrameInterval(FPS);
    
    var micXform:SoundTransform = new SoundTransform(0);
    m_microphone.soundTransform = micXform;
    
    m_microphone.rate = 11;
    m_microphone.setSilenceLevel(0);
    m_microphone.setUseEchoSuppression(true);
    
    var micOptions:MicrophoneEnhancedOptions = new MicrophoneEnhancedOptions();
    micOptions.mode = MicrophoneEnhancedMode.FULL_DUPLEX; 
    micOptions.nonLinearProcessing = true;
    micOptions.echoPath = 128;
    m_microphone.enhancedOptions = micOptions;
    
    m_recorder.videoStreamSettings = m_h264;
    m_recorder.attachCamera(m_camera);
    m_recorder.attachAudio(m_microphone);
    and when I'm publishing

    m_recorder.publish("mp4:" + m_strFilename, "record");
    
    var objMeta:Object = new Object();
    objMeta.codec = m_h264.codec;
    objMeta.profile = m_h264.profile;
    objMeta.level = m_h264.level;
    objMeta.fps = m_camera.fps;
    objMeta.bandwidth = m_camera.bandwidth;
    objMeta.keyFrameInterval = m_camera.keyFrameInterval;
    objMeta.title = "video1";
    objMeta.width = WIDTH;
    objMeta.height = HEIGHT;
    
    m_recorder.send("@setDataFrame", "onMetaData", objMeta);
    thx for your help

    Martin

  5. #5

    Default

    I also made a zip with a 5 secs file.

    When probing this file, you can see that the videc codec is correct, but that the duration is not, and that the audio is just not there.


    http://www.lesaffranchis.ca/wowza/video0.zip

  6. #6
    Join Date
    Jun 2011
    Posts
    1,037

    Default

    Hi,
    Please reference the ticket you have open, #79462

    Daren

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •