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");
238 "16-bit big-endian audio in flv is valid but most likely unplayable (hardware dependent); use s16le\n");
297 metadata_count = 5 * !!video_enc +
350 if( !strcmp(tag->
key,
"width")
351 ||!strcmp(tag->
key,
"height")
352 ||!strcmp(tag->
key,
"videodatarate")
353 ||!strcmp(tag->
key,
"framerate")
354 ||!strcmp(tag->
key,
"videocodecid")
355 ||!strcmp(tag->
key,
"audiodatarate")
356 ||!strcmp(tag->
key,
"audiosamplerate")
357 ||!strcmp(tag->
key,
"audiosamplesize")
358 ||!strcmp(tag->
key,
"stereo")
359 ||!strcmp(tag->
key,
"audiocodecid")
360 ||!strcmp(tag->
key,
"duration")
361 ||!strcmp(tag->
key,
"onMetaData")
380 data_size =
avio_tell(pb) - metadata_size_pos - 10;
382 avio_seek(pb, metadata_count_pos, SEEK_SET);
385 avio_seek(pb, metadata_size_pos, SEEK_SET);
412 avio_seek(pb, -data_size - 10, SEEK_CUR);
481 "Video codec '%s' is not compatible with FLV\n",
511 "use audio bitstream filter 'aac_adtstoasc' to fix it "
512 "('-bsf:a aac_adtstoasc' option with ffmpeg)\n");
523 "Packets are not in the proper order with respect to DTS\n");
532 "8 frames per packet. Adobe Flash "
533 "Player cannot handle this!\n");
540 avio_w8(pb, (ts >> 24) & 0x7F);
545 int64_t metadata_size_pos =
avio_tell(pb);
559 data_size =
avio_tell(pb) - metadata_size_pos;
560 avio_seek(pb, metadata_size_pos - 10, SEEK_SET);
562 avio_seek(pb, data_size + 10 - 3, SEEK_CUR);
597 .mime_type =
"video/x-flv",