Linux命令&ffmpeg瀑布流测试

ffmpeg -re -i /var/www/html/cct/public/public_video/eye.mp4 -vcodec copy -acodec copy -b:v 800k -b:a 32k -f flv rtmp://localhost:1935/live

2.ffmpeg -re -i xx.mp4 -vcodec copy -acodec copy -b:v 800k -b:a 32k -f flv -cors 'X-Custom-Header: CustomValue' rtmp://localhost:1935/hls

3.ffmpeg -re -i input.mp4 -vcodec copy -acodec copy -f flv -headers "X-Custom-Header: CustomValue" rtmp://localhost:1935/stream

ffplay rtmp://localhost:1935/live

过滤, 管道与重定向

过滤

过滤出 /etc/passwd 文件中包含 root 的记录

grep 'root' /etc/passwd

递归地过滤出 /var/log/ 目录中包含 linux 的记录

grep -r 'linux' /var/log/

管道

简单来说, Linux 中管道的作用是将上一个命令的输出作为下一个命令的输入, 像 pipe 一样将各个命令串联起来执行, 管道的操作符是 |

比如, 我们可以将 cat 和 grep 两个命令用管道组合在一起

cat /etc/passwd | grep 'root'

过滤出 /etc 目录中名字包含 ssh 的目录(不包括子目录)

ls /etc | grep 'ssh'

重定向

可以使用 > 或 < 将命令的输出重定向到一个文件中

echo 'Hello World' > ~/test.txt

运维常用命令

ping 命令

cloud.tencent.com 发送 4 个 ping 包, 检查与其是否联通

ping -c 4 cloud.tencent.com

netstat 命令

netstat 命令用于显示各种网络相关信息,如网络连接, 路由表, 接口状态等等

列出所有处于监听状态的tcp端口

netstat -lt

查看所有的端口信息, 包括 PID 和进程名称

netstat -tulpn

ps 命令

过滤得到当前系统中的 ssh 进程信息

ps aux | grep 's sh'

  1. 查看系统运行内存

free -m

相关推荐
武文斌771 分钟前
项目学习总结:LVGL图形参数动态变化、开发板的GDB调试、sqlite3移植、MQTT协议、心跳包
linux·开发语言·网络·arm开发·数据库·嵌入式硬件·学习
爱吃喵的鲤鱼4 分钟前
仿mudou——Connection模块(连接管理)
linux·运维·服务器·开发语言·网络·c++
让子弹飞0213 分钟前
永久解决ubuntu网络连接问题
linux·运维·ubuntu
郝学胜-神的一滴37 分钟前
使用Linux的read和write系统函数操作文件
linux·服务器·开发语言·数据库·c++·程序人生·软件工程
七七七七072 小时前
【Linux 系统】打开文件和文件系统
linux·运维·spring
DeeplyMind2 小时前
第二章:模块的编译与运行-7 Loading and Unloading Modules
linux·驱动开发
---学无止境---3 小时前
Linux中驱动程序通过fasync异步通知应用程序的实现
linux
cccyi73 小时前
Linux 进程间通信机制详解
linux·进程通信
北京迅为3 小时前
【北京迅为】iTOP-4412精英版使用手册-第三十五章 WEB控制LED
linux·嵌入式硬件·嵌入式·4412
让我们一起加油好吗3 小时前
【C++】封装红黑树模拟实现 set 和 map
linux·c++·set·map·红黑树