frame_size (1536) was not respected for a non-last frame

简介: frame_size (1536) was not respected for a non-last frame

用ffmpeg自带的ac3编码,执行编码函数时报错入如下:

[ac3 @ 0x7fed7800f200] frame_size (1536) was not respected for a

non-last frame (avcodec_encode_audio2)


用ac3编码时每次送入编码器的音频采样数应该是1536个采样,不然就会报上述错误。这个数字并非刻意固定,而是跟ac3内部的编码算法原理相关。

关于ac3/aac更多的固定参数配置,可参考之前的博客。

全网找不到,国内音视频之路还有很长的路,音视频人一起加油吧~


image.png

相关文章
|
4月前
【Simulink】报错:Size mismatch (size [2 x 1] ~= size [1 x 1]). The size to the left is the size of the l
【Simulink】报错:Size mismatch (size [2 x 1] ~= size [1 x 1]). The size to the left is the size of the l
|
9月前
nobuffer与av_read_frame的关系
nobuffer与av_read_frame的关系
39 0
|
6月前
刷新frame
刷新frame
|
9月前
|
编解码
av_read_frame返回值为-5 Input/output error
av_read_frame返回值为-5 Input/output error
85 0
|
9月前
|
存储 API
sws_scale():bad dst image pointers
sws_scale():bad dst image pointers
131 0
sws_scale():bad dst image pointers
|
程序员 iOS开发
frame 和 bounds的区别
frame 和 bounds的区别
104 0
frame 和 bounds的区别
成功解决AttributeError: module 'cv2.cv2' has no attribute 'CV_CAP_PROP_FPS'和 'CV_CAP_PROP_FRAME_WIDTH'
成功解决AttributeError: module 'cv2.cv2' has no attribute 'CV_CAP_PROP_FPS'和 'CV_CAP_PROP_FRAME_WIDTH'
|
iOS开发
深入浅出了解frame和bounds
对bounds和frame的理解
1493 0