20190229推流中断问题--javacv的分析

本文探讨了使用JavaCV进行推流时遇到的中断问题,涉及像素格式设置、FFmpeg错误信息解析及JavaCV的FrameGrabber和FrameRecorder组件在音视频操作中的作用。通过对FFmpeg日志的分析,发现可能存在的像素格式问题,提示确保正确设置了范围。文章还介绍了JavaCV如何封装FFmpeg的音视频操作,包括帧抓取、编码和推流流程,并给出了相关资源链接供深入学习。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

目录

第一,javacv基础知识:

 1.基础:

1、图像像素格式与图片封装格式

2、图像?视频帧?傻傻分不清楚

3、编码?封装?傻傻分不清楚

4、音/视频源

5、流媒体协议

6、流媒体服务

比如常见的srs(开源的rtmp流媒体服务,当然它支持rtmp/hls/http-flv的分发)和nginx(通过安装模块可以支持rtmp,hls,http-flv分发),除此之外的收费的和一些不太友好的开源流媒体服务就不一一介绍了。

第二:javaCV入门指南:调用FFmpeg原生API和JavaCV是如何封装了FFmpeg的音视频操作?(个人更感兴趣javacv的)

参考大神链接:https://blog.youkuaiyun.com/eguid_1/article/details/83663035 

1、什么是JavaCPP

2.javaCPP直接调用FFmpeg的API

3、JavaCV是如何封装了FFmpeg的音视频操作?

1、帧抓取器(FrameGrabber)

2、帧录制器/推流器(FrameRecorder)

3、帧(Frame)


参考链接:https://blog.youkuaiyun.com/leeking888/article/details/77542661 

翻译一下问题:

ated pixel format used, make sure you did set range correctly
[swscaler @ 000000006344e840] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 00000000635b8f80] non-strictly-monotonic PTS
[swscaler @ 000000006344e840] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 000000006344e840] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 000000006344e840] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 000000006344e840] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 00000000635b8f80] non-strictly-monotonic PTS
[swscaler @ 000000006344e840] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 000000006344e840] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 000000006344e840] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 000000006344e840] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 000000006344e840] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 00000000643328a0] frame I:15    Avg QP:13.91  size: 52452
[libx264 @ 00000000643328a0] frame P:115   Avg QP:17.78  size:  4696
[libx264 @ 00000000643328a0] frame B:223   Avg QP:17.87  size:   351
[libx264 @ 00000000643328a0] consecutive B-frames: 11.3% 11.3%  5.9% 71.4%
[libx264 @ 00000000643328a0] mb I  I16..4: 11.3% 50.4% 38.3%
[libx264 @ 00000000643328a0] mb P  I16..4:  0.4%  0.8%  0.3%  P16..4: 30.4%  3.9%  6.0%  0.0%  0.0%    skip:58.1%
[libx264 @ 00000000643328a0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 15.9%  0.7%  0.2%  direct: 0.6%  skip:82.6%  L0:29.2% L1:69.7% BI: 1.2%
[libx264 @ 00000000643328a0] final ratefactor: 16.14
[libx264 @ 00000000643328a0] 8x8 transform intra:50.7% inter:52.8%
[libx264 @ 00000000643328a0] coded y,uvDC,uvAC intra: 80.3% 76.0% 64.0% inter: 7.9% 9.2% 3.9%
[libx264 @ 00000000643328a0] i16 v,h,dc,p: 38% 19%  8% 35%
[libx264 @ 00000000643328a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 37% 16% 13%  4%  4%  7%  4%  5% 10%
[libx264 @ 00000000643328a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 38% 18%  6%  4%  6% 10%  4%  5%  7%
[libx264 @ 00000000643328a0] i8c dc,h,v,p: 48% 16% 30%  6%
[libx264 @ 00000000643328a0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 00000000643328a0] ref P L0: 88.2%  1.9%  7.4%  2.5%
[libx264 @ 00000000643328a0] ref B L0: 92.1%  6.9%  1.1%
[libx264 @ 00000000643328a0] ref B L1: 97.8%  2.2%
[libx264 @ 00000000643328a0] kb/s:399.21
[swscaler @ 000000006344e840] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 000000006344e840] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 000000006344e840] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 00000000635b8f80] non-strictly-monotonic PTS
[swscaler @ 000000006344e840] deprecated pixel format used, make sure you did set range correctly
[h264 @ 0000000063439f60] error while decoding MB 20 12, bytestream -20
[h264 @ 0000000063439f60] concealing 161 DC, 161 AC, 161 MV errors in P frame
[swscaler @ 000000006344e840] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 00000000635b8f80] frame I:12    Avg QP: 7.28  size: 37316
[libx264 @ 00000000635b8f80] frame P:69    Avg QP: 8.37  size: 10682
[libx264 @ 00000000635b8f80] frame B:203   Avg QP:13.32  size:  1705
[libx264 @ 00000000635b8f80] consecutive B-frames:  4.6%  0.0%  1.1% 94.4%
[libx264 @ 00000000635b8f80] mb I  I16..4: 24.6% 36.8% 38.6%
[libx264 @ 00000000635b8f80] mb P  I16..4:  1.7%  3.7%  3.7%  P16..4: 36.5%  9.9% 14.5%  0.0%  0.0%    skip:30.0%
[libx264 @ 00000000635b8f80] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 27.8%  5.0%  2.0%  direct: 2.9%  skip:62.2%  L0:47.2% L1:50.2% BI: 2.6%
[libx264 @ 00000000635b8f80] final ratefactor: 10.96
[libx264 @ 00000000635b8f80] 8x8 transform intra:38.4% inter:33.4%
[libx264 @ 00000000635b8f80] coded y,uvDC,uvAC intra: 83.3% 0.0% 0.0% inter: 15.8% 0.0% 0.0%
[libx264 @ 00000000635b8f80] i16 v,h完成了读流的方法
翻译后:

使用了像素格式,请确保正确设置了范围。

[swscaler@00000000 6344E840]不推荐使用像素格式,请确保正确设置了范围。

[libx264@00000000 635b8f80]非严格单调pts

[swscaler@00000000 6344E840]不推荐使用像素格式,请确保正确设置了范围。

评论 12
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值