82 "FLV only supports wideband (16kHz) Speex audio\n");
110 "FLV does not support sample rate %d, "
111 "choose from (44100, 22050, 11025)\n", enc->
sample_rate);
163 size_t len = strlen(str);
173 avio_w8(pb, (ts >> 24) & 0x7F);
197 AVCodecContext *audio_enc = NULL, *video_enc = NULL, *data_enc = NULL;
198 int i, metadata_count = 0;
199 double framerate = 0.0;
200 int64_t metadata_size_pos, data_size, metadata_count_pos;
216 "at most one video stream is supported in flv\n");
221 av_log(s,
AV_LOG_ERROR,
"Video codec '%s' for stream %d is not compatible with FLV\n",
229 "at most one audio stream is supported in flv\n");
293 metadata_count = 5 * !!video_enc +
346 if( !strcmp(tag->
key,
"width")
347 ||!strcmp(tag->
key,
"height")
348 ||!strcmp(tag->
key,
"videodatarate")
349 ||!strcmp(tag->
key,
"framerate")
350 ||!strcmp(tag->
key,
"videocodecid")
351 ||!strcmp(tag->
key,
"audiodatarate")
352 ||!strcmp(tag->
key,
"audiosamplerate")
353 ||!strcmp(tag->
key,
"audiosamplesize")
354 ||!strcmp(tag->
key,
"stereo")
355 ||!strcmp(tag->
key,
"audiocodecid")
356 ||!strcmp(tag->
key,
"duration")
357 ||!strcmp(tag->
key,
"onMetaData")
376 data_size =
avio_tell(pb) - metadata_size_pos - 10;
378 avio_seek(pb, metadata_count_pos, SEEK_SET);
381 avio_seek(pb, metadata_size_pos, SEEK_SET);
408 avio_seek(pb, -data_size - 10, SEEK_CUR);
477 "Video codec '%s' is not compatible with FLV\n",
507 "use audio bitstream filter 'aac_adtstoasc' to fix it "
508 "('-bsf:a aac_adtstoasc' option with ffmpeg)\n");
519 "Packets are not in the proper order with respect to DTS\n");
528 "8 frames per packet. Adobe Flash "
529 "Player cannot handle this!\n");
536 avio_w8(pb, (ts >> 24) & 0x7F);
555 data_size =
avio_tell(pb) - metadata_size_pos;
556 avio_seek(pb, metadata_size_pos - 10, SEEK_SET);
558 avio_seek(pb, data_size + 10 - 3, SEEK_CUR);
591 .mime_type =
"video/x-flv",