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;
215 "at most one video stream is supported in flv\n");
220 av_log(s,
AV_LOG_ERROR,
"Video codec '%s' for stream %d is not compatible with FLV\n",
232 "use vstrict=-1 / -strict -1 to use it anyway.\n");
240 "at most one audio stream is supported in flv\n");
248 "16-bit big-endian audio in flv is valid but most likely unplayable (hardware dependent); use s16le\n");
307 metadata_count = 4 * !!video_enc +
330 if (framerate != 0.0) {
363 if( !strcmp(tag->
key,
"width")
364 ||!strcmp(tag->
key,
"height")
365 ||!strcmp(tag->
key,
"videodatarate")
366 ||!strcmp(tag->
key,
"framerate")
367 ||!strcmp(tag->
key,
"videocodecid")
368 ||!strcmp(tag->
key,
"audiodatarate")
369 ||!strcmp(tag->
key,
"audiosamplerate")
370 ||!strcmp(tag->
key,
"audiosamplesize")
371 ||!strcmp(tag->
key,
"stereo")
372 ||!strcmp(tag->
key,
"audiocodecid")
373 ||!strcmp(tag->
key,
"duration")
374 ||!strcmp(tag->
key,
"onMetaData")
393 data_size =
avio_tell(pb) - metadata_size_pos - 10;
395 avio_seek(pb, metadata_count_pos, SEEK_SET);
398 avio_seek(pb, metadata_size_pos, SEEK_SET);
425 avio_seek(pb, -data_size - 10, SEEK_CUR);
494 "Video codec '%s' is not compatible with FLV\n",
524 "use audio bitstream filter 'aac_adtstoasc' to fix it "
525 "('-bsf:a aac_adtstoasc' option with ffmpeg)\n");
536 "Packets are not in the proper order with respect to DTS\n");
545 "8 frames per packet. Adobe Flash "
546 "Player cannot handle this!\n");
553 avio_w8(pb, (ts >> 24) & 0x7F);
558 int64_t metadata_size_pos =
avio_tell(pb);
572 data_size =
avio_tell(pb) - metadata_size_pos;
573 avio_seek(pb, metadata_size_pos - 10, SEEK_SET);
575 avio_seek(pb, data_size + 10 - 3, SEEK_CUR);
610 .mime_type =
"video/x-flv",