av_find_best_stream

简介: av_find_best_stream

av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, NULL, 0);

-1:要处理的流的索引号,不知道填-1

-1:要处理的流相关流的索引号,比如视频的相关是音频,不知道填-1

NULL:流的编解码器,不关心填NULL

0:flag,不关心填0

返回值:小于0错误,不小于0则是要找的流的索引值。


image.png

相关文章
|
8月前
Tp5 SplFileObject::__construct(/tmp/phpvuOdFd): failed to open stream: No such file or director解决方法
Tp5 SplFileObject::__construct(/tmp/phpvuOdFd): failed to open stream: No such file or director解决方法
|
1月前
|
编解码 应用服务中间件 nginx
DemuxException: type = CodecUnsupported, info = Flv: Unsupported codec in video frame: 2
DemuxException: type = CodecUnsupported, info = Flv: Unsupported codec in video frame: 2
196 0
|
10月前
ffmpeg编码报错:more samples than frame size (avcodec_encode_audio2)
ffmpeg编码报错:more samples than frame size (avcodec_encode_audio2)
61 0
ffmpeg编码报错:more samples than frame size (avcodec_encode_audio2)
|
10月前
srt报错:No room to store incoming packet seqno
srt报错:No room to store incoming packet seqno
116 0
srt报错:No room to store incoming packet seqno
|
10月前
|
网络协议
av_interleaved_write_frame -32 broken pipe
av_interleaved_write_frame -32 broken pipe
154 0
av_interleaved_write_frame -32 broken pipe
|
10月前
|
编解码
av_read_frame返回值为-5 Input/output error
av_read_frame返回值为-5 Input/output error
104 0
base64转图片的时候Can't read input file!
如果不去掉编码中的图片头信息,就会报Can't read input file!。 一开始还以为是文件路径格式有问题,然后看了看我之前用的,就有一个区别就是没有去头信息。
|
存储 传感器 消息中间件
Stream is the new file
随着5G 网络、容器云、高性能存储硬件水平的不断提高,流处理正在拥有越来越广泛的市场前景。
Stream is the new file