83 "FLV only supports wideband (16kHz) Speex audio\n");
111 "FLV does not support sample rate %d, "
112 "choose from (44100, 22050, 11025)\n", enc->
sample_rate);
164 size_t len = strlen(str);
174 avio_w8(pb, (ts >> 24) & 0x7F);
198 AVCodecContext *audio_enc = NULL, *video_enc = NULL, *data_enc = NULL;
199 int i, metadata_count = 0;
200 double framerate = 0.0;
201 int64_t metadata_size_pos, data_size, metadata_count_pos;
217 "at most one video stream is supported in flv\n");
222 av_log(s,
AV_LOG_ERROR,
"Video codec '%s' for stream %d is not compatible with FLV\n",
230 "at most one audio stream is supported in flv\n");
294 metadata_count = 5 * !!video_enc +
347 if( !strcmp(tag->
key,
"width")
348 ||!strcmp(tag->
key,
"height")
349 ||!strcmp(tag->
key,
"videodatarate")
350 ||!strcmp(tag->
key,
"framerate")
351 ||!strcmp(tag->
key,
"videocodecid")
352 ||!strcmp(tag->
key,
"audiodatarate")
353 ||!strcmp(tag->
key,
"audiosamplerate")
354 ||!strcmp(tag->
key,
"audiosamplesize")
355 ||!strcmp(tag->
key,
"stereo")
356 ||!strcmp(tag->
key,
"audiocodecid")
357 ||!strcmp(tag->
key,
"duration")
358 ||!strcmp(tag->
key,
"onMetaData")
377 data_size =
avio_tell(pb) - metadata_size_pos - 10;
379 avio_seek(pb, metadata_count_pos, SEEK_SET);
382 avio_seek(pb, metadata_size_pos, SEEK_SET);
409 avio_seek(pb, -data_size - 10, SEEK_CUR);
478 "Video codec '%s' is not compatible with FLV\n",
508 "use audio bitstream filter 'aac_adtstoasc' to fix it "
509 "('-bsf:a aac_adtstoasc' option with ffmpeg)\n");
520 "Packets are not in the proper order with respect to DTS\n");
529 "8 frames per packet. Adobe Flash "
530 "Player cannot handle this!\n");
537 avio_w8(pb, (ts >> 24) & 0x7F);
556 data_size =
avio_tell(pb) - metadata_size_pos;
557 avio_seek(pb, metadata_size_pos - 10, SEEK_SET);
559 avio_seek(pb, data_size + 10 - 3, SEEK_CUR);
590 .mime_type =
"video/x-flv",