热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

不支持音频对象类型3。-Audioobjecttype3isnotsupported

Iamrunningintoanissuewithacustom-builtffmpeg.Basically,itsavanillaffmpegwithx264and

I am running into an issue with a custom-built ffmpeg. Basically, its a vanilla ffmpeg with x264 and fdk-aac libs enabled. I am feeding an SDP file through ffmpeg API and get the following error while passing the info to avcodec_open2:

我遇到了一个问题,一个定制的ffmpeg。基本上,它是一个带有x264和fdk-aac libs的香草ffmpeg。我正在通过ffmpeg API输入一个SDP文件,并在将信息传递给avcodec_open2时得到以下错误:

Audio object type 3 is not supported

不支持音频对象类型3。

My SDP file:

我的SDP文件:

v=0
o=- 0 0 IN IP4 127.0.0.1
s=Unnamed
i=N/A
c=IN IP4 192.168.1.1
t=0 0
a=recvonly
m=audio 8204 RTP/AVP 96
a=rtpmap:96 mpeg4-generic/32000
a=fmtp:96 streamtype=5; profile-level-id=15; mode=AAC-hbr; cOnfig=1a88; SizeLength=13; IndexLength=3; IndexDeltaLength=3;
a=control:trackID=0
m=video 8202 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=428028;sprop-parameter-sets=Z0KAKJWgKA9E,aM48gA==;
a=control:trackID=1
m=application 8206 RTP/AVP 96
a=rtpmap:96 smpte336m/10
a=control:trackID=2

The following is the output I get from ffmpeg as I open the input, dump its format, and try to open input streams:

下面是我打开输入时从ffmpeg得到的输出,转储它的格式,并尝试打开输入流:

Format sdp probed with size=2048 and score=50
audio codec set to: aac
audio samplerate set to: 32000
audio channels set to: 1
video codec set to: h264
RTP Packetization Mode: 1
RTP Profile IDC: 42 Profile IOP: 80 Level: 28
Extradata set to 0xc8d3dc0 (size: 21)!
File position before avformat_find_stream_info() is 522
Audio object type 3 is not supported.
Could not find codec parameters for stream 1 (Video: h264): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
File position after avformat_find_stream_info() is 522
Dumping input AV format
Input #0, sdp, from 'conf/test.sdp':

格式sdp probed与size=2048和score=50音频编解码器设置为:aac音频samplerate设置为:32000音频频道设置为:1视频编解码器设置为:h264 RTP packe化模式:1 RTP配置文件IDC: 42 Profile IOP: 80 Level: 28 Extradata set to 0xc8d3dc0 (size: 21)!在avformat_find_stream_info()之前,文件位置是522音频对象类型3不受支持。无法找到流1(视频:h264)的编解码器参数:在avformat_find_stream_info()为522 dump输入AV格式输入#0,sdp,从'conf/test.sdp'中,未指定的大小考虑增加“分析化”和“probesize”选项文件位置的值。

Metadata:
title :Unnamed
comment :N/A

元数据:标题:匿名评论:N/A。

Duration:N/A, bitrate:N/A

持续时间:N / A,比特率:N / A

Stream #0:0, 0, 1/32000: Audio: aac, 32000 Hz, 1 channels, fltp  

Stream #0:1, 0, 1/90000: Video: h264, 90k tbr, 90k tbn, 180k tbc  

Stream #0:2, 0, 1/90000: Data: none, 0/1  

Audio object type 3 is not supported.

不支持音频对象类型3。

I also see the error reported for not finding codec parameters for stream 1:

我也看到了没有找到流1的编解码器参数的错误报告:

Could not find codec parameters for stream 1 (Video: h264): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options

无法找到流1的编解码器参数(视频:h264):未指定大小考虑增加“分析化”和“probesize”选项的值?

However, I think that is due to me not running an actual rtp at the moment of the test.

但是,我认为这是由于我在测试的时候没有运行实际的rtp。

In any case, what may be the reason for getting audio object type 3 not supported exception?

在任何情况下,获得音频对象类型3的原因可能不支持异常?

UPDATE - Oct 02, 2013

更新- 2013年10月02日

Static ffmpeg build gives the following flags:

静态ffmpeg构建给出了以下标志:

Static ffmpeg 2.0.1 build flag output:

静态ffmpeg 2.0.1构建标志输出:

ffmpeg version 2.0.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Sep 30 2013 22:24:00 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-54)
  configuration: --enable-gpl --enable-nonfree --enable-shared
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --enable-runtime-cpudetect --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-avfilter --enable-pthreads --enable-x11grab --enable-vdpau --disable-avisynth --enable-libdc1394 --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libx264 --enable-libxavs --enable-libxvid --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --disable-stripping

My build is from ffmpeg 2.0.1 snapshot with the following flags:

我的构建来自ffmpeg 2.0.1快照,其中有以下标志:

--enable-static --disable-shared --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfaac --enable-libmp3lame --enable-libx264 --disable-symver --disable-doc --disable-ffplay --enable-ffmpeg --disable-ffprobe --disable-ffserver --disable-avdevice --disable-avfilter --disable-filters --disable-devices --disable-everything --enable-avformat --enable-avcodec --enable-muxers --enable-protocols --enable-parsers --enable-demuxers --enable-decoders --enable-encoders --enable-bsfs --enable-network --enable-swscale  --disable-demuxer=sbg --disable-demuxer=dts --disable-parser=dca --disable-decoder=dca --enable-asm --enable-pthreads --enable-version3

The fdk-aac library version I'm using:

我正在使用的fdk-aac库版本:

fdk-aac - 0.1.2

fdk-aac——0.1.2

So it seems that the same .sdp file causes Audio object type 3 error with my build but not with static but I really do not see what causes it (granted I am not an expert with ffmpeg API and may simply miss important details).

因此,似乎相同的。sdp文件会导致我的构建导致音频对象类型3错误,但不是静态的,但我确实不知道是什么原因造成的(当然,我不是ffmpeg API的专家,可能只是忽略了重要的细节)。

Simplified code for opening .sdp file that doesn't include error checks and logic separation:

打开。sdp文件的简化代码,不包括错误检查和逻辑分离:

AVFormatContext *inputCOntext= NULL;

av_register_all();
avformat_network_init();

avformat_open_input(&inputContext, "test.sdp", NULL, NULL);
avformat_find_stream_info(inputContext, NULL);

int inAudioStreamIdx = av_find_best_stream(inputContext, AVMEDIA_TYPE_AUDIO, -1, -1, NULL, 0);
AVStream *st = inputContext->streams[inAudioStreamIdx];

AVCodecContext *dec_ctx = st->codec;
AVCodec *dec = avcodec_find_decoder(dec_ctx->codec_id);

avcodec_open2(dec_ctx, dec, NULL); // Fails here with Audio object type 3

Am I opening the sdp input improperly?

我打开sdp输入不正确吗?

1 个解决方案

#1


1  

First of, Object type 3 is AAC-SSR (It is defined in ISO 14496-3), And to the best of my knowledge it is not supported in the ffmpeg deocoder. As for the h.264 error, The 'unspecified size' message refers to the fact the decoder could not be configured with the video resolution. The resolution is specified in the SPS/PPS NALUs int he AVC Elementary Stream.

首先,对象类型3是AAC-SSR(它在ISO 14496-3中定义),并且根据我的知识,它不支持ffmpeg deocoder。对于h。264错误,“未指定尺寸”信息是指解码器无法通过视频分辨率配置的事实。该决议是在SPS/PPS NALUs int中指定的。

FFmpeg (specifically libavcodec) will analyze a stream for a few seconds to determine the parameters need to configure the decoders. You had a stream length of 0 seconds, hence the decoders were never configured properly. Hence the errors.

FFmpeg(特别是libavcodec)将分析一个流,以确定需要配置解码器的参数。您的流长度为0秒,因此无法正确配置解码器。因此,错误。


推荐阅读
  • 本文介绍了在CentOS上安装Python2.7.2的详细步骤,包括下载、解压、编译和安装等操作。同时提供了一些注意事项,以及测试安装是否成功的方法。 ... [详细]
  • 向QTextEdit拖放文件的方法及实现步骤
    本文介绍了在使用QTextEdit时如何实现拖放文件的功能,包括相关的方法和实现步骤。通过重写dragEnterEvent和dropEvent函数,并结合QMimeData和QUrl等类,可以轻松实现向QTextEdit拖放文件的功能。详细的代码实现和说明可以参考本文提供的示例代码。 ... [详细]
  • 本文介绍了Swing组件的用法,重点讲解了图标接口的定义和创建方法。图标接口用来将图标与各种组件相关联,可以是简单的绘画或使用磁盘上的GIF格式图像。文章详细介绍了图标接口的属性和绘制方法,并给出了一个菱形图标的实现示例。该示例可以配置图标的尺寸、颜色和填充状态。 ... [详细]
  • Android工程师面试准备及设计模式使用场景
    本文介绍了Android工程师面试准备的经验,包括面试流程和重点准备内容。同时,还介绍了建造者模式的使用场景,以及在Android开发中的具体应用。 ... [详细]
  • 纠正网上的错误:自定义一个类叫java.lang.System/String的方法
    本文纠正了网上关于自定义一个类叫java.lang.System/String的错误答案,并详细解释了为什么这种方法是错误的。作者指出,虽然双亲委托机制确实可以阻止自定义的System类被加载,但通过自定义一个特殊的类加载器,可以绕过双亲委托机制,达到自定义System类的目的。作者呼吁读者对网上的内容持怀疑态度,并带着问题来阅读文章。 ... [详细]
  • 基于Socket的多个客户端之间的聊天功能实现方法
    本文介绍了基于Socket的多个客户端之间实现聊天功能的方法,包括服务器端的实现和客户端的实现。服务器端通过每个用户的输出流向特定用户发送消息,而客户端通过输入流接收消息。同时,还介绍了相关的实体类和Socket的基本概念。 ... [详细]
  • 本文介绍了Android中的assets目录和raw目录的共同点和区别,包括获取资源的方法、目录结构的限制以及列出资源的能力。同时,还解释了raw目录中资源文件生成的ID,并说明了这些目录的使用方法。 ... [详细]
  • Iamtryingtomakeaclassthatwillreadatextfileofnamesintoanarray,thenreturnthatarra ... [详细]
  • 在Android开发中,使用Picasso库可以实现对网络图片的等比例缩放。本文介绍了使用Picasso库进行图片缩放的方法,并提供了具体的代码实现。通过获取图片的宽高,计算目标宽度和高度,并创建新图实现等比例缩放。 ... [详细]
  • Linux重启网络命令实例及关机和重启示例教程
    本文介绍了Linux系统中重启网络命令的实例,以及使用不同方式关机和重启系统的示例教程。包括使用图形界面和控制台访问系统的方法,以及使用shutdown命令进行系统关机和重启的句法和用法。 ... [详细]
  • 本文主要解析了Open judge C16H问题中涉及到的Magical Balls的快速幂和逆元算法,并给出了问题的解析和解决方法。详细介绍了问题的背景和规则,并给出了相应的算法解析和实现步骤。通过本文的解析,读者可以更好地理解和解决Open judge C16H问题中的Magical Balls部分。 ... [详细]
  • 个人学习使用:谨慎参考1Client类importcom.thoughtworks.gauge.Step;importcom.thoughtworks.gauge.T ... [详细]
  • C++字符字符串处理及字符集编码方案
    本文介绍了C++中字符字符串处理的问题,并详细解释了字符集编码方案,包括UNICODE、Windows apps采用的UTF-16编码、ASCII、SBCS和DBCS编码方案。同时说明了ANSI C标准和Windows中的字符/字符串数据类型实现。文章还提到了在编译时需要定义UNICODE宏以支持unicode编码,否则将使用windows code page编译。最后,给出了相关的头文件和数据类型定义。 ... [详细]
  • 开发笔记:实验7的文件读写操作
    本文介绍了使用C++的ofstream和ifstream类进行文件读写操作的方法,包括创建文件、写入文件和读取文件的过程。同时还介绍了如何判断文件是否成功打开和关闭文件的方法。通过本文的学习,读者可以了解如何在C++中进行文件读写操作。 ... [详细]
  • Windows7 64位系统安装PLSQL Developer的步骤和注意事项
    本文介绍了在Windows7 64位系统上安装PLSQL Developer的步骤和注意事项。首先下载并安装PLSQL Developer,注意不要安装在默认目录下。然后下载Windows 32位的oracle instant client,并解压到指定路径。最后,按照自己的喜好对解压后的文件进行命名和压缩。 ... [详细]
author-avatar
烦了_12664
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有