/* mixed array (hash) with size and string/type/data tuples */
put_byte(pb, AMF_DATA_TYPE_MIXEDARRAY);
- put_be32(pb, 5*!!video_enc + 4*!!audio_enc + 2); // +2 for duration and file size
+ put_be32(pb, 5*!!video_enc + 5*!!audio_enc + 2); // +2 for duration and file size
put_amf_string(pb, "duration");
flv->duration_offset= url_ftell(pb);
put_amf_double(pb, video_enc->height);
put_amf_string(pb, "videodatarate");
- put_amf_double(pb, s->bit_rate / 1024.0);
+ put_amf_double(pb, video_enc->bit_rate / 1024.0);
put_amf_string(pb, "framerate");
put_amf_double(pb, framerate);
}
if(audio_enc){
+ put_amf_string(pb, "audiodatarate");
+ put_amf_double(pb, audio_enc->bit_rate / 1024.0);
+
put_amf_string(pb, "audiosamplerate");
put_amf_double(pb, audio_enc->sample_rate);
flv_write_packet,
flv_write_trailer,
.codec_tag= (const AVCodecTag* const []){flv_video_codec_ids, flv_audio_codec_ids, 0},
- .flags= AVFMT_GLOBALHEADER,
+ .flags= AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS,
};