提交 9fdb6cd5 authored 作者: Anthony Minessale's avatar Anthony Minessale 提交者: Michael Jerris

FS-7519: support vb for video bitrate

上级 2a36066e
...@@ -604,13 +604,8 @@ SWITCH_STANDARD_APP(record_av_function) ...@@ -604,13 +604,8 @@ SWITCH_STANDARD_APP(record_av_function)
const AVCodecDescriptor *desc; const AVCodecDescriptor *desc;
if (!strncmp(data, "rtmp://", 7)) { if (!strncmp(data, "rtmp://", 7)) {
if (fmt->video_codec != AV_CODEC_ID_H264 ) { fmt->video_codec = AV_CODEC_ID_H264;
fmt->video_codec = AV_CODEC_ID_H264; // force H264 fmt->audio_codec = AV_CODEC_ID_AAC;
}
if (fmt->audio_codec != AV_CODEC_ID_AAC) {
fmt->audio_codec = AV_CODEC_ID_AAC; // force AAC
}
} }
desc = avcodec_descriptor_get(fmt->video_codec); desc = avcodec_descriptor_get(fmt->video_codec);
...@@ -1212,17 +1207,13 @@ static switch_status_t av_file_open(switch_file_handle_t *handle, const char *pa ...@@ -1212,17 +1207,13 @@ static switch_status_t av_file_open(switch_file_handle_t *handle, const char *pa
if (fmt->video_codec != AV_CODEC_ID_H264 ) { if (fmt->video_codec != AV_CODEC_ID_H264 ) {
fmt->video_codec = AV_CODEC_ID_H264; // force H264 fmt->video_codec = AV_CODEC_ID_H264; // force H264
} }
if (fmt->audio_codec != AV_CODEC_ID_AAC) { fmt->audio_codec = AV_CODEC_ID_AAC;
fmt->audio_codec = AV_CODEC_ID_AAC; // force AAC
}
handle->mm.samplerate = 44100; handle->mm.samplerate = 44100;
handle->mm.ab = 128; handle->mm.ab = 128;
if (handle->mm.vw && handle->mm.vh) { if (!handle->mm.vb && handle->mm.vw && handle->mm.vh) {
switch(handle->mm.vh) { switch(handle->mm.vh) {
case 240: case 240:
handle->mm.vb = 400; handle->mm.vb = 400;
...@@ -1248,7 +1239,6 @@ static switch_status_t av_file_open(switch_file_handle_t *handle, const char *pa ...@@ -1248,7 +1239,6 @@ static switch_status_t av_file_open(switch_file_handle_t *handle, const char *pa
if (handle->mm.fps > 0.0f) { if (handle->mm.fps > 0.0f) {
handle->mm.keyint = (int) 2.0f * handle->mm.fps; handle->mm.keyint = (int) 2.0f * handle->mm.fps;
} }
} }
desc = avcodec_descriptor_get(fmt->video_codec); desc = avcodec_descriptor_get(fmt->video_codec);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论