提交 80694ad5 authored 作者: Anthony Minessale's avatar Anthony Minessale 提交者: Michael Jerris

FS-7519: avformat tweaks for broadcast

上级 4b9b0044
......@@ -231,6 +231,8 @@ static switch_status_t add_stream(OutputStream *ost, AVFormatContext *oc, AVCode
/* Resolution must be a multiple of two. */
c->width = ost->width;
c->height = ost->height;
ost->st->time_base.den = 1000;
ost->st->time_base.num = 1;
c->time_base.den = 1000;
c->time_base.num = 1;
c->gop_size = 25; /* emit one intra frame every x frames at most */
......@@ -238,6 +240,10 @@ static switch_status_t add_stream(OutputStream *ost, AVFormatContext *oc, AVCode
c->thread_count = threads;
c->rc_initial_buffer_occupancy = buffer_bytes * 8;
if (codec_id == AV_CODEC_ID_H264) {
c->ticks_per_frame = 2;
}
if (codec_id == AV_CODEC_ID_VP8) {
av_set_options_string(c, "quality=realtime", "=", ":");
}
......@@ -1209,7 +1215,7 @@ static switch_status_t av_file_open(switch_file_handle_t *handle, const char *pa
}
fmt->audio_codec = AV_CODEC_ID_AAC;
handle->samplerate = 44100;
handle->mm.samplerate = 44100;
handle->mm.ab = 128;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论