mac os pkg解包
jdk1.8.pkg解包
每次安装Java的时候,都是一个pkg安装包,没有像linux下直接一个tar包那样绿色和方便。于是google搜索一下,终于找到解决的方法了。
...jdk1.8.pkg解包
每次安装Java的时候,都是一个pkg安装包,没有像linux下直接一个tar包那样绿色和方便。于是google搜索一下,终于找到解决的方法了。
...yum install -y xinetd rdate
vim /etc/xinetd.d/time-stream
# 将disable = yes 改为 disable = no
# 启动xinetd
systemctl start xinetd
# 添加开启启动
systemctl enable xinetd
首先在服务端执行以下命令(到底哪个是服务端呢?就是你在哪台机器上面执行了以上三个步骤就是服务端),在服务端上同步网络标准时间,然后再同步到内网各台机器上。
...cat /boot/grub2/grub.cfg |grep menuentry
menuentry 'CentOS Linux (3.10.0-327.36.3.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-80b9b662-0a1d-4e84-b07b-c1bf19e72d97' {
menuentry 'CentOS Linux (3.10.0-327.22.2.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-80b9b662-0a1d-4e84-b07b-c1bf19e72d97' {
menuentry 'CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-80b9b662-0a1d-4e84-b07b-c1bf19e72d97' {
menuentry 'CentOS Linux (0-rescue-7d26c16f128042a684ea474c9e2c240f) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-7d26c16f128042a684ea474c9e2c240f-advanced-80b9b662-0a1d-4e84-b07b-c1bf19e72d97'
grub2-set-default "CentOS Linux (3.10.0-327.22.2.el7.x86_64) 7 (Core)"
grub2-editenv list
saved_entry=CentOS Linux (3.10.0-327.22.2.el7.x86_64) 7 (Core)
modprobe ppp-compress-18 && echo yes
yum install -y ppp pptpd iptables
systemctl mask firewalld
systemctl stop firewalld
vi /etc/pptpd.conf #找到配制文件中默认的值,去掉注释即可
localip 192.168.0.1 #本机VPN IP
remoteip 192.168.0.234-238,192.168.0.245 客户端可以获取到的ip网段
#修改DNS
vi /etc/ppp/options.pptpd #末尾添加dns
ms-dns 8.8.8.8
ms-dns 114.114.114.114
#添加vpn账户
vi /etc/ppp/chap-secrets
# client server secret IP addresses
user pptpd passwd *
#开启路由转发
vi /etc/sysctl.conf
net.ipv4.ip_forward = 1 #添加在配制文件的末尾即可
sysctl -p #运行这个命令会输出上面添加的那一行信息,意思是使内核修改生效
#在防火墙上开启nat转发
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE #IP和网口根据实际情况修改即可
service iptables save
systemctl restart iptables
systemctl restart pptpd
通过modinfo bonding命令查看Linux是否支持bonding
lsmod |grep bonding
#载入bonding模块
modprobe bonding
# cat /etc/modprobe.d/bond0.conf
alias bond0 bonding
cd /etc/sysconfig/network-scripts/
# grep -v "^#" ifcfg-bond0
DEVICE=bond0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.5.88
NETMASK=255.255.255.0
GATEWAY=192.168.5.1
USERCTL=no
====================================================
BONDING_OPTS="mode=0 miimon=100"
说明:这里使用了BONDING_OPTS选项,则不需要再使用 /etc/modprobe.d/bond0.conf 配置文件对绑定设备进行配置。参数mode=0,指负载均衡模式,详见下文。miimon是用来进行链路监测的,其原理是检测网上的链路状态,一般将miimon值设为100,表示系统每100ms监测一次链路连接状态,如果有一条线路不通就转入另一条线路。
====================================================
# grep -v "^#" ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
MASTER=bond0
SLAVE=yes
USERCTL=no
# grep -v "^#" ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
注意:建议不要指定MAC地址
# echo 100 > /sys/class/net/bond0/bonding/miimon
# echo 6 > /sys/class/net/bond0/bonding/mode
Mode of operation : 0 for balance-rr, 1 for active-backup, 2 for balance-xor;
3 for broadcast, 4 for 802.3ad, 5 for balance-tlb, 6 for balance-alb (charp)
重启网络
# /etc/init.d/network restart
检查下
ifconfig
cat /proc/net/bonding/bond0
bonding的模式:0-6,即:7种模式
...yum --exclude="kernel*" update
cat /etc/yum.conf
[main]
......
exclude=kernel*
修改/etc/yum.conf,在“[main]”的最后加上“exclude=kernel*”即可。
方法一为零时的,也就是只在当次有效,而方法二为永久有效。可根据不同情况选择。
...ffmbc -i xx.ts -vcodec dvvideo -flags +ildct+ilme -tff -pix_fmt yuv422p -vf scale=1440:1080:1 -acodec pcm_s16le -ar 48000 -ac 1 -y xx.mxf
使用FFmpeg制作多声道视频
将8个音轨混合成双声道
ffmpeg -i input.mkv -filter_complex "[0:1][0:2][0:3][0:4][0:5][0:6][0:7][0:8] amerge=inputs=8" -c:a pcm_s16le output.mkv
ffmpeg -i input -vf "select=eq(n\,15237)",showinfo -an -f null /dev/null
15237为display_picture_number
[Parsed_showinfo_1 @ 0x41ca760] n: 0 pts:54860400 pts_time:609.56 pos:427032896 fmt:yuv420p sar:1/1 s:1920x1080 i:T iskey:0 type:B checksum:A2FB0133 plane_checksum:[7E1FA1A9 3D005549 67BC0A32] mean:[92 127 134] stdev:[62.5 9.2 20.7]
### showinfo ### 不改变输入而在行中显示每帧信息。
显示的信息以`key/value`的序列形式给出
下面是将显示在输出中的值:
- n
帧序数,从0开始计数
- pts
输入帧的时间戳,以时基为单位,时间依赖于输入
- pts_time
按秒计的时间戳
- pos
输入帧在输入流中的偏移定位,-1表示信息不可用和/或无意义(例如合成视频中)
- fmt
像素格式名
- sar
输入帧的宽高比,表示为`num/den`格式
- s
输入帧尺寸,语法同于[视频尺寸(分辨率)](ffmpeg-doc-cn-07.md#视频尺寸(分辨率))
- i
交错模式 ("P"对应 "逐行", "T" 对应上场优先, "B"为下场优先t)
- iskey
为1表示是关键帧,0则不是
- type
输入帧图片类型 ("I"对应I帧, "P" 对应P帧, "B" 对应B帧,或者 "?"对应未知类型).参考定义与`libavutil/avutil.h`中的`av_get_picture_type_char`函数和`
- checksum
输入帧所有信息内容的 Adler-32校验值 (以16进制输出)
- plane_checksum
输入帧所有信息内容的 Adler-32校验值 (以16进制输出), 以格式"[c0 c1 c2 c3]"显示
ffmpeg -i input -aspect 16:9 -c:v mpeg2video -b:v 4000k -minrate 4000k -maxrate 4000k -bufsize 2000k -dc 9 -flags +ilme+ildct -alternate_scan 1 -top 0 output
其实主要的就是如下参数:
-flags +ilme+ildct -alternate_scan 1 -top 0
alternate_scan使用隔行转码,top不一般没有什么要求的话頂场优先就可以了。
...