This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17(1-key,7-avc) 00(avc sps/pps) 00 00 00(composition time) 01(version) 64 00 1F FF | |
E1(sps-num) ------ 偏移10的这个字节 & 0x1f == sps-num | |
00 19(sps len) | |
xx xx xx xx xx xx(sps) | |
01(pps-num) | |
00 04(pps len) | |
xx xx xx xx(pps) | |
17(1-key,7-avc) 01(avc nalu) 00 00 28(composition time) | |
00 00 00 02(nalu-len) 09(nalu pkg, 09&0x1f=9,访问单元分隔符) 30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
killall 命令没有找到: yum install psmisc | |
目的:让nginx把php的解析交给php-fpm程序,双方进程通过unix-socket文件: /run/php/php7.0-fpm.sock 进行通信 | |
yum install epel-release | |
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm | |
yum install php70w-fpm | |
cd /etc/php-fpm.d/ | |
vim www.conf | |
;listen = 127.0.0.1:9000 ---- 这行注释掉 | |
listen = /run/php/php7.0-fpm.sock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
解决ubuntu18.04无法使用mac摄像头的问题 | |
git clone https://github.com/patjak/bcwc_pcie.git | |
cd bcwc_pcie/firmware | |
make | |
sudo make install | |
cd .. | |
make | |
sudo make install | |
sudo depmod |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
第一号菜: 四川豆瓣鱼 | |
1. 花刀 + 毛毛盐 | |
2. 姜 大葱 料酒 , 姜葱捏碎,在鱼身上不断擦拭, 然后放入鱼肚里面, 腌制10分钟 | |
3. 准备一点 姜葱蒜末 + 四川豆瓣酱(弄碎它) | |
4. 菜籽油7层热后冷却,再加热后煎鱼(金黄金黄即可) | |
5. 取出鱼,下豆瓣酱,炒一下,下葱姜蒜+2颗豆豉,下辣椒粉,喷入一点料酒, 加入水, 一点酱油,鸡精,白糖,醋 | |
6. 下入鱼儿烧一下,不断用汤淋雨身上,不需要翻面(6分钟) | |
7. 取出鱼,水淀粉+香油+性感的葱花和香菜 收汁 | |
8. 淋鱼身上, OK,大功告成 | |
视频链接:https://haokan.baidu.com/v?vid=17068956986695225173&tab= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo ip route add default via 10.0.3.2 dev enp0s8 table enp0s8 | |
sudo ip rule add from 10.0.3.15 lookup enp0s8 | |
sudo ip route add default via 10.0.2.2 dev enp0s3 table enp0s3 | |
sudo ip rule add from 10.0.2.15 lookup enp0s3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. 某个对象T要用引用计数进行管理,那么必须实现RefCountedInterface定义的方法,包括AddRef以及Release方法,最简单的办法是用 | |
RefCountedObject<T> 对T进行包装,包装后的类其实是T的一个子类,它具备了AddRef以及Release方法 | |
2. scoped_refptr<T> 实现了引用计数管理的功能,其中的T是步骤1包裹后的子类,get()方法可以获取到指向T的指针,release()方法 | |
也可以获取到指向T的指针,不过获取后同时释放了针对T的引用计数管理功能,所以如果某个scoped_refptr<T>调用了release(),T | |
本身的引用计数并没有改变,只是传递给了调用方去进行管理 | |
3. 步骤1中的T就好比一个气球,步骤2的scoped_refptr<T>就好比栓在这个气球上的一根线,一旦这个气球没有线拴住了,那么它就会被自动释放掉 | |
4. 举例 | |
peerconnection_client退出的时候,老是core掉,有两个原因: | |
1. videotrack的创建与销毁涉及到摄像头的启停,摄像头的启停要求在同一个线程里面完成,所以如果线程A创建了videotrack,线程B销毁videotrack,那么会core在同一线程检测逻辑上 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1、关闭FEC :internalencoderfactory.cc文件屏蔽kRedCodecName、kUlpfecCodecName | |
2、关闭SRTP | |
webrtc\src\webrtc\api\peerconnectioninterface.h | |
disable_encryption = true 取消SRTP | |
bool Conductor::CreatePeerConnection(bool dtls) 配置不生成密钥 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. 从解码角度可视化卡顿方案: https://blog.csdn.net/CrystalShaw/article/details/98081575 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. 默认linux下没有开启h264编解码,开启编码方式 | |
proprietary_codecs = true | |
ffmpeg_branding = "Chrome" | |
is_component_ffmpeg = false | |
2. is_component_ffmpeg 控制 webrtc 编译的ffmpeg是静态库还是动态库,webrtc编译ffmpeg的时候,做了大量的裁剪,avutils avdevice swresample等 | |
很多功能都裁减掉了,所以如果有其他的库依赖ffmpeg,很难去共用webrtc里面的ffmpeg, 建议的处理方式如下: | |
2.1 webrtc自身的ffmpeg编译成静态库, webrtc也编译成静态库,这样webrtc只依赖它自身裁剪过的静态库 | |
2.2 其他依赖ffmpeg的开源库,额外下载对应的ffmpeg版本去依赖 | |
2.3 链接的时候,最后连接webrtc, 这样的目的是查找ffmpeg符号的时候, 最后一个去查找阉割过的webrtc静态库里面的ffmpeg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.获取会话id和hid | |
curl -X POST -H "Content-Type: application/json" -d '{"janus": "list_sessions", "transaction": "123", "admin_secret": "janusoverlord"}' http://localhost:7088/admin | |
curl -X POST -H "Content-Type: application/json" -d '{"janus": "list_sessions", "transaction": "123", "admin_secret": "janusoverlord"}' http://localhost:7088/admin | |
2.启动janus抓包和停止抓包,抓取rtp明文 | |
curl -X POST -H "Content-Type: application/json" -d '{"janus": "start_pcap", "folder": "/tmp", "filename": "my-test2pcap-dump.pcap", "transaction": "123", "admin_secret": "janusoverlord"}' http://localhost:7088/admin/sessionId/handleId | |
curl -X POST -H "Content-Type: application/json" -d '{"janus": "stop_pcap", "transaction": "123", "admin_secret": "janusoverlord"}' http://localhost:7088/admin/sessionId/handleId |
NewerOlder