分类目录归档:None

AV1编码器 libsvtav1

libsvtav1 编码器适应较好
ffmpeg -i input.mp4 -c:v libsvtav1 -b:v 600k output.mp4

B站1080P 下789kbps 的视频码率 196kpbs音频【音频我觉得96kpbs就够了】

动漫 1080P更低

ffmpeg -i gjj.mp4 -c:v libsvtav1 -crf 42 -b:a 96k 42.mp4

DASH切片

ffmpeg -i 42.mp4 -c:v copy  -c:a copy -dash 1 -f dash output.mpd

Dplayer

<div id="dplayer"></div>
<script src="dash.min.js"></script>

DASH必须在Dplayer上面加装
<script src="DPlayer.min.js"></script>

<script>
const dp = new DPlayer({
    container: document.getElementById('dplayer'),
    video: {
        url: 'demo.mpd',
        type: 'dash',
    },
    pluginOptions: {
        dash: {
            // dash config
        },
    },
});
console.log(dp.plugins.dash); // Dash 实例
</script>
video: {
        url: 'dplayer.mp4',
        pic: 'dplayer.png',
        thumbnails: 'thumbnails.jpg',
        type: 'auto',
    }

micropython 圆周率代码计算速度测试

import gc
from utime import ticks_ms, ticks_diff
import machine
import os

def pi(places=100):
    # 3 + 3*(1/24) + 3*(1/24)*(9/80) + 3*(1/24)*(9/80)*(25/168)
    # The numerators 1, 9, 25, ... are given by (2x + 1) ^ 2
    # The denominators 24, 80, 168 are given by (16x^2 -24x + 8)
    extra = 8
    one = 10 ** (places+extra)
    t, c, n, na, d, da = 3*one, 3*one, 1, 0, 0, 24

    while t > 1:
        n, na, d, da = n+na, na+8, d+da, da+32
        t = t * n // d
        c += t
    return c // (10 ** extra)

def pi_t(n=1000):
    gc.collect()
    t1 = ticks_ms()
    pi(n)
    t2 = ticks_ms()
    print('  ', ticks_diff(t2, t1), 'ms')


r = os.uname()
print('\n\n')
print('Pi calculation performance test')
print('===============================')
print('chip:', r.sysname)
print('ver: ', r.version)
try:
    print('Freq:', machine.freq())
except:
    print('Freq: unknow')
print('Ram: ', gc.mem_free() + gc.mem_alloc())
for i in (100, 500, 1000, 2000, 5000, 10000, 100000):
    try:
        print('\nCalc {} bits pi'.format(i))
        pi_t(i)
    except:
        print('Calc error!')
        
        
        

github链接替换bgithub

// ==UserScript==
// @name         GITHUB_Change
// @namespace    https://*/
// @version      0.1.0
// @description  github.com 替换为 bgithub.xyz
// @author       You
// @match        *://*/*
// ==/UserScript==

(function() {
    var links = document.getElementsByTagName('a');
    for (var i = 0; i < links.length; i++) {
    var c=links[i].getAttribute("href");
    if(c){
        e=c.replace("https://github.com/","https://bgithub.xyz/")
        links[i].setAttribute("href",e);
    }
}
})();// ==UserScript==
// @name         GITHUB_Change
// @namespace    https://*/
// @version      0.1.0
// @description  github.com 替换为 bgithub.xyz
// @author       You
// @match        *://*/*
// ==/UserScript==

(function() {
    var links = document.getElementsByTagName('a');
    for (var i = 0; i < links.length; i++) {
    var c=links[i].getAttribute("href");
    if(c){
        e=c.replace("https://github.com/","https://bgithub.xyz/")
        links[i].setAttribute("href",e);
    }
}
})();

esp-ide

https://github.com/espressif/idf-eclipse-plugin/releases/tag/v3.0.0

1111111111111111

Installing IDF Plugins using the Update site URL:
https://dl.espressif.com/dl/idf-eclipse-plugin/updates/latest/

Installing IDF Plugins using the local archive file:
https://dl.espressif.com/dl/idf-eclipse-plugin/updates/com.espressif.idf.update-3.0.0.zip

Espressif IDE
https://dl.espressif.com/dl/idf-eclipse-plugin/ide/Espressif-IDE-macosx-cocoa-aarch64-v3.0.0.dmg
https://dl.espressif.com/dl/idf-eclipse-plugin/ide/Espressif-IDE-macosx-cocoa-x86_64-v3.0.0.dmg
https://dl.espressif.com/dl/idf-eclipse-plugin/ide/Espressif-IDE-3.0.0-win32.win32.x86_64.zip
https://dl.espressif.com/dl/idf-eclipse-plugin/ide/Espressif-IDE-3.0.0-linux.gtk.x86_64.tar.gz