|
Re: ffmpeg vp9 dash av1 dash |
|
Just can't stay away
|
packager \ in=../num.mp4,stream=audio,init_segment='myvideo/a_init.mp4',segment_template='myvideo/a_$Number%03d$.m4s' \ in=1080.mp4,stream=video,init_segment='myvideo/1080_init.mp4',segment_template='myvideo/1080_$Number%03d$.m4s' \ in=720.mp4,stream=video,init_segment='myvideo/720_init.mp4',segment_template='myvideo/720_$Number%03d$.m4s' \ in=360.mp4,stream=video,init_segment='myvideo/360_init.mp4',segment_template='myvideo/360_$Number%03d$.m4s' \ in=180.mp4,stream=video,init_segment='myvideo/180_init.mp4',segment_template='myvideo/180_$Number%03d$.m4s' \ --segment_duration 10 \ --generate_static_live_mpd \ --mpd_output myvideo/manifest.mpd
Posted on: 2023/6/16 1:39
|
|
|
Re: ffmpeg vp9 dash av1 dash |
|
Just can't stay away
|
packager \ in=myvideo_1920x1080.mp4,stream=audio,init_segment='myvideo/audio_init.mp4',segment_template='myvideo/audio_$Number%03d$.m4s' \ in=myvideo_1920x1080.mp4,stream=video,init_segment='myvideo/1920x1080_init.mp4',segment_template='myvideo/1920x1080_$Number%03d$.m4s' \ in=myvideo_1280x720.mp4,stream=video,init_segment='myvideo/1280x720_init.mp4',segment_template='myvideo/1280x720_$Number%03d$.m4s' \ in=myvideo_640x360.mp4,stream=video,init_segment='myvideo/640x360_init.mp4',segment_template='myvideo/640x360_$Number%03d$.m4s' \ in=myvideo_320x180.mp4,stream=video,init_segment='myvideo/320x180_init.mp4',segment_template='myvideo/320x180_$Number%03d$.m4s' \ --segment_duration 20 \ --generate_static_live_mpd \ --mpd_output myvideo/myvideo.mpd
Posted on: 2023/6/15 22:10
|
|
|
Cloudflare Cache Reserve |
|
Just can't stay away
|
Cloudflare Cache Reserve 费用 每月最少也需要 US$4.88 缓存储备使用成本:
- US$0.36/100 万次读取操作
- US$4.50/100 万次写入操作
- US$0.015/1 GB 存储/月
Posted on: 2023/4/25 7:48
|
|
|
ffmpeg vp9 dash av1 dash |
|
Just can't stay away
|
ffmpeg -i in.video -vn -acodec libvorbis -ab 128k -dash 1 my_audio.webm
ffmpeg -i in.video -c:v libvpx-vp9 -keyint_min 150 -row-mt 1 \ -g 150 -tile-columns 4 -frame-parallel 1 -f webm -dash 1 \ -an -vf scale=320:180 -b:v 180k -dash 1 180.webm \ -an -vf scale=640:360 -b:v 300k -dash 1 360.webm \ -an -vf scale=1280:720 -b:v 500k -dash 1 720.webm \ -an -vf scale=1920:1080 -b:v 800k -dash 1 1080.webm
VP9_DASH_PARAMS=" -row-mt 1 -tile-columns 4 -frame-parallel 1"
ffmpeg -i input_video.y4m -c:v libvpx-vp9 -s 320x180 -b:v 180k -keyint_min 150 -g 150 ${VP9_DASH_PARAMS} -an -f webm -dash 1 video_320x180_180k.webm ffmpeg -i input_video.y4m -c:v libvpx-vp9 -s 640x360 -b:v 300k -keyint_min 150 -g 150 ${VP9_DASH_PARAMS} -an -f webm -dash 1 video_640x360_300k.webm ffmpeg -i input_video.y4m -c:v libvpx-vp9 -s 1280x720 -b:v 720k -keyint_min 150 -g 150 ${VP9_DASH_PARAMS} -an -f webm -dash 1 video_1280x720_720k.webm ffmpeg -i input_video.y4m -c:v libvpx-vp9 -s 1920x1080 -b:v 900k -keyint_min 150 -g 150 ${VP9_DASH_PARAMS} -an -f webm -dash 1 video_1920x1080_1080k.webm
ffmpeg -i input_audio.wav -c:a libvorbis -b:a 128k -vn -f webm -dash 1 audio_128k.webm
ffmpeg \ -f webm_dash_manifest -i video_320x180_180k.webm \ -f webm_dash_manifest -i video_640x360_300k.webm \ -f webm_dash_manifest -i video_1280x720_720k.webm \ -f webm_dash_manifest -i video_1920x1080_1080k.webm \ -f webm_dash_manifest -i audio_128k.webm \ -c copy -map 0 -map 1 -map 2 -map 3 -map 4 \ -f webm_dash_manifest \ -adaptation_sets "id=0,streams=0,1,2,3 id=1,streams=4" \ manifest.mpd
dash av1
ffmpeg -i ../xiaona.mp4 -c:v libaom-av1 -keyint_min 150 -g 150 -tile-columns 2 -cpu-used 8 -frame-parallel 1 -f webm -dash 1 \ -an -vf scale=320:180 -b:v 180k -dash 1 180.webm \ -an -vf scale=640:360 -b:v 300k -dash 1 360.webm \ -an -vf scale=1280:720 -b:v 500k -dash 1 720.webm \ -an -vf scale=1920:1080 -b:v 800k -dash 1 1080.webm
av1 dash
docker run -v /host_media_path/:/media -it --net=host --rm google/shaka-packager
packager \ in=a.webm,stream=audio,output=ap.webm \ in=180.webm,stream=video,output=180p.webm \ in=360.webm,stream=video,output=360p.webm \ in=720.webm,stream=video,output=720p.webm \ in=1080.webm,stream=video,output=1080p.webm \ --mpd_output manifest.mpd
Posted on: 2023/4/1 21:50
|
|
|
php phar 打包 |
|
Just can't stay away
|
<?php $exts = ['php','css', 'js' ]; // 需要打包的文件后缀, twig是模版文件, 你还可以安需加入html等后缀 $dir = __DIR__; // 需要打包的目录 $file = 'yii.app.out.phar'; // 包的名称, 注意它不仅仅是一个文件名, 在stub中也会作为入口前缀 $phar = new Phar(__DIR__ . '/' . $file, FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::KEY_AS_FILENAME, $file); // 开始打包 $phar->startBuffering(); // 将后缀名相关的文件打包 foreach ($exts as $ext) { $phar->buildFromDirectory($dir, '/.' . $ext . '$/'); } // 把build.php本身摘除 $phar->delete('build.php'); $phar->delete('requirements.php'); // 设置入口 $phar->setStub("<?php Phar::mapPhar('{$file}'); require 'phar://{$file}/web/index.php'; __HALT_COMPILER(); ?>"); $phar->compressFiles(Phar::GZ); $phar->stopBuffering(); // 打包完成 echo "Finished {$file}n"; #$new_name = date("Y.md.Hi.") . $file; rename(__DIR__ . '/' . $file, __DIR__ . "/../" . $file);
Posted on: 2023/3/31 10:07
|
|
|
cloudflare r2 OPTIONS |
|
Just can't stay away
|
postman http put body raw xml AWS Signature AWS Region auto Service Name s3
https://****************.r2.cloudflarestorage.com/vc-cc?cors
<?xml version="1.0" encoding="UTF-8"?> <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <CORSRule> <AllowedMethod>GET</AllowedMethod> <AllowedMethod>HEAD</AllowedMethod> <AllowedMethod>OPTIONS</AllowedMethod> <AllowedOrigin>*</AllowedOrigin> <AllowedHeader>*</AllowedHeader> </CORSRule> </CORSConfiguration>
Posted on: 2023/3/30 14:16
|
|
|
nomachine ufw iptables firewall |
|
Just can't stay away
|
cd /usr/NX/
grep "#EnableFirewallConfiguration 1" -rl . | xargs sed -i 's/#EnableFirewallConfiguration 1/EnableFirewallConfiguration 0/g'
Posted on: 2023/3/26 16:28
|
|
|
ubuntu cryptsetup |
|
Just can't stay away
|
fallocate -l 2G /tmp/test.img cryptsetup luksFormat /tmp/test.img ## only once sudo cryptsetup luksOpen /tmp/test.img usbone sudo mkfs.ext4 /dev/mapper/usbone ## only once sudo mount /dev/mapper/usbone /mnt/usb.mt/ sudo umount /mnt/usb.mt sudo cryptsetup luksClose usbone
dd if=/dev/urandom of=放置keyfile的文件路径 bs=1k count=64 cryptsetup luksDump 已加密的物理设备或逻辑设备 cryptsetup luksAddKey 已加密的物理分区或虚拟盘 所用keyfile的路径 cryptsetup --key-file 所用keyfile的路径 luksOpen 已加密的物理分区或虚拟盘 映射名 cryptsetup luksKillSlot 已加密的物理分区或虚拟盘 Slot的编号
Posted on: 2023/3/23 12:09
|
|
|
ubuntu 22.04 ssh ubuntu 14.04 Permission denied (publickey) |
|
Just can't stay away
|
ubuntu 14.04 Permission denied (publickey) The RSA SHA-1 hash algorithm is being quickly deprecated. There is a workaround for re-enabling RSA at SSH-RSA key rejected with message "no mutual signature algorithm" . Add the following line to /etc/ssh/ssh_config on the client side:
PubkeyAcceptedKeyTypes +ssh-rsa
Posted on: 2023/3/15 10:01
|
|
|
fail2ban nginx |
|
Just can't stay away
|
## /etc/fail2ban/filter.d/nginx-bad-req.conf
# fail2ban filter configuration for nginx [Definition] failregex = ^<HOST> .* "(GET|POST|HEAD).*HTTP.*" 500 .*$
### /etc/fail2ban/jail.local
[nginx-bad-req] enabled = true port = http,https filter = nginx-bad-req logpath = %(nginx_access_log)s maxretry = 10 findtime = 60 bantime = 3600 ignoreip = 127.0.0.1
Posted on: 2023/2/27 13:04
|
|
|