webrtc 下载代码perfetto.git 失败

[0:04:23] src/third_party/perfetto
41>WARNING: subprocess ‘”git” “-c” “core.deltaBaseCacheLimit=2g” “clone” “–no-checkout” “–progress” “https://android.googlesource.com/platform/external/perfetto.git” “/mydata/code/webrtc/src/third_party/_gclient_perfetto_knlrq6i8″‘ in /mydata/code/webrtc failed; will retry after a short nap…

[0:06:33] src/third_party/perfetto
41>WARNING: subprocess ‘”git” “-c” “core.deltaBaseCacheLimit=2g” “clone” “–no-checkout” “–progress” “https://android.googlesource.com/platform/external/perfetto.git” “/mydata/code/webrtc/src/third_party/_gclient_perfetto_knlrq6i8″‘ in /mydata/code/webrtc failed; will retry after a short nap…

同步代码时提示如上错误,

使用github的仓储进行替换。

git config –global url.https://github.com/google/perfetto.git.insteadOf https://android.googlesource.com/platform/external/perfetto.git

常用正则表达式

一、校验数字的表达式

  • 数字:^[0-9]*$
  • n位的数字:^\d{n}$
  • 至少n位的数字:^\d{n,}$
  • m-n位的数字:^\d{m,n}$
  • 零和非零开头的数字:^(0|[1-9][0-9]*)$
  • 非零开头的最多带两位小数的数字:^([1-9][0-9]*)+(\.[0-9]{1,2})?$
  • 带1-2位小数的正数或负数:^(\-)?\d+(\.\d{1,2})$
  • 正数、负数、和小数:^(\-|\+)?\d+(\.\d+)?$
  • 有两位小数的正实数:^[0-9]+(\.[0-9]{2})?$
  • 有1~3位小数的正实数:^[0-9]+(\.[0-9]{1,3})?$
  • 非零的正整数:^[1-9]\d*$ 或 ^([1-9][0-9]*){1,3}$ 或 ^\+?[1-9][0-9]*$
  • 非零的负整数:^\-[1-9][]0-9″*$ 或 ^-[1-9]\d*$
  • 非负整数:^\d+$ 或 ^[1-9]\d*|0$
  • 非正整数:^-[1-9]\d*|0$ 或 ^((-\d+)|(0+))$
  • 非负浮点数:^\d+(\.\d+)?$ 或 ^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$
  • 非正浮点数:^((-\d+(\.\d+)?)|(0+(\.0+)?))$ 或 ^(-([1-9]\d*\.\d*|0\.\d*[1-9]\d*))|0?\.0+|0$
  • 正浮点数:^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$ 或 ^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$
  • 负浮点数:^-([1-9]\d*\.\d*|0\.\d*[1-9]\d*)$ 或 ^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$
  • 浮点数:^(-?\d+)(\.\d+)?$ 或 ^-?([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$

校验字符的表达式

  • 汉字:^[\u4e00-\u9fa5]{0,}$
  • 英文和数字:^[A-Za-z0-9]+$ 或 ^[A-Za-z0-9]{4,40}$
  • 长度为3-20的所有字符:^.{3,20}$
  • 由26个英文字母组成的字符串:^[A-Za-z]+$
  • 由26个大写英文字母组成的字符串:^[A-Z]+$
  • 由26个小写英文字母组成的字符串:^[a-z]+$
  • 由数字和26个英文字母组成的字符串:^[A-Za-z0-9]+$
  • 由数字、26个英文字母或者下划线组成的字符串:^\w+$ 或 ^\w{3,20}$
  • 中文、英文、数字包括下划线:^[\u4E00-\u9FA5A-Za-z0-9_]+$
  • 中文、英文、数字但不包括下划线等符号:^[\u4E00-\u9FA5A-Za-z0-9]+$ 或 ^[\u4E00-\u9FA5A-Za-z0-9]{2,20}$
  • 可以输入含有^%&’,;=?$\”等字符:[^%&’,;=?$\x22]+
  • 禁止输入含有~的字符:[^~\x22]+

三、特殊需求表达式

  • Email地址:^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$
  • 域名:[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?
  • InternetURL:[a-zA-z]+://[^\s]* 或 ^http://([\w-]+\.)+[\w-]+(/[\w-./?%&=]*)?$
  • 手机号码:^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$
  • 电话号码(“XXX-XXXXXXX”、”XXXX-XXXXXXXX”、”XXX-XXXXXXX”、”XXX-XXXXXXXX”、”XXXXXXX”和”XXXXXXXX):^(\(\d{3,4}-)|\d{3.4}-)?\d{7,8}$
  • 国内电话号码(0511-4405222、021-87888822):\d{3}-\d{8}|\d{4}-\d{7}
  • 电话号码正则表达式(支持手机号码,3-4位区号,7-8位直播号码,1-4位分机号): ((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)
  • 身份证号(15位、18位数字),最后一位是校验位,可能为数字或字符X:(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)
  • 帐号是否合法(字母开头,允许5-16字节,允许字母数字下划线):^[a-zA-Z][a-zA-Z0-9_]{4,15}$
  • 密码(以字母开头,长度在6~18之间,只能包含字母、数字和下划线):^[a-zA-Z]\w{5,17}$
  • 强密码(必须包含大小写字母和数字的组合,不能使用特殊字符,长度在 8-10 之间):^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]{8,10}$
  • 强密码(必须包含大小写字母和数字的组合,可以使用特殊字符,长度在8-10之间):^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,10}$
  • 日期格式:^\d{4}-\d{1,2}-\d{1,2}
  • 一年的12个月(01~09和1~12):^(0?[1-9]|1[0-2])$
  • 一个月的31天(01~09和1~31):^((0?[1-9])|((1|2)[0-9])|30|31)$
  • 钱的输入格式:
    1. 有四种钱的表示形式我们可以接受:”10000.00″ 和 “10,000.00”, 和没有 “分” 的 “10000” 和 “10,000”:^[1-9][0-9]*$
    2. 这表示任意一个不以0开头的数字,但是,这也意味着一个字符”0″不通过,所以我们采用下面的形式:^(0|[1-9][0-9]*)$
    3. 一个0或者一个不以0开头的数字.我们还可以允许开头有一个负号:^(0|-?[1-9][0-9]*)$
    4. 这表示一个0或者一个可能为负的开头不为0的数字.让用户以0开头好了.把负号的也去掉,因为钱总不能是负的吧。下面我们要加的是说明可能的小数部分:^[0-9]+(.[0-9]+)?$
    5. 必须说明的是,小数点后面至少应该有1位数,所以”10.”是不通过的,但是 “10” 和 “10.2” 是通过的:^[0-9]+(.[0-9]{2})?$
    6. 这样我们规定小数点后面必须有两位,如果你认为太苛刻了,可以这样:^[0-9]+(.[0-9]{1,2})?$
    7. 这样就允许用户只写一位小数.下面我们该考虑数字中的逗号了,我们可以这样:^[0-9]{1,3}(,[0-9]{3})*(.[0-9]{1,2})?$
    8. 1到3个数字,后面跟着任意个 逗号+3个数字,逗号成为可选,而不是必须:^([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(.[0-9]{1,2})?$
    9. 备注:这就是最终结果了,别忘了”+”可以用”*”替代如果你觉得空字符串也可以接受的话(奇怪,为什么?)最后,别忘了在用函数时去掉去掉那个反斜杠,一般的错误都在这里
  • xml文件:^([a-zA-Z]+-?)+[a-zA-Z0-9]+\\.[x|X][m|M][l|L]$
  • 中文字符的正则表达式:[\u4e00-\u9fa5]
  • 双字节字符:[^\x00-\xff] (包括汉字在内,可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1))
  • 空白行的正则表达式:\n\s*\r (可以用来删除空白行)
  • HTML标记的正则表达式:<(\S*?)[^>]*>.*?|<.*? /> ( 首尾空白字符的正则表达式:^\s*|\s*$或(^\s*)|(\s*$) (可以用来删除行首行尾的空白字符(包括空格、制表符、换页符等等),非常有用的表达式)
  • 腾讯QQ号:[1-9][0-9]{4,} (腾讯QQ号从10000开始)
  • 中国邮政编码:[1-9]\d{5}(?!\d) (中国邮政编码为6位数字)
  • IPv4地址:((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{1,2})){3}

开源音视频编码器

https://en.wikipedia.org/wiki/List_of_open-source_codecs

 

Video codecs

x264 – H.264/MPEG-4 AVC implementation. x264 is not a codec (encoder/decoder); it is just an encoder (it cannot decode video).
OpenH264 – H.264 baseline profile encoding and decoding
x265 – An encoder based on the High Efficiency Video Coding (HEVC/H.265) standard.
Xvid – MPEG-4 Part 2 codec, compatible with DivX
libvpx – VP8 and VP9 implementation; formerly a proprietary codec developed by On2 Technologies, released by Google under a BSD-like license in May 2010.
SVT-AV1 – An AV1 encoder originally developed by Intel and Netflix, which is available as FLOSS now.[1] SVT-AV1 is generally considered to be the most optimized and fastest free AV1 encoder, which is why it serves as the base for the development of new, free, general-purpose and production-ready implementations in the AOMedia Software Implementation Working Group.[2] While SVT-AV1 already performs very well in constrained quality mode and is economically usable for many scenarios, as of the time being commercial implementations like Aurora1 may still beat it.[3]
xvc – An open source video codec, aiming to compete with h.265 and AV1. The reference implementation is released under the LGPL 2.1 and currently available in version 2.0 (as of 12/2020)[4]
FFmpeg codecs – Codecs in the libavcodec library from the FFmpeg project (FFV1, Snow, MPEG-1, MPEG-2, MPEG-4 part 2, MSMPEG-4, WMV2, SVQ1, MJPEG, HuffYUV and others). Decoders in the libavcodec (H.264, SVQ3, WMV3, VP3, Theora, Indeo, Dirac, Lagarith and others).
Lagarith – Video codec designed for strong lossless compression in RGB(A) colorspace (similar to ZIP/RAR/etc.)
libtheora – A reference implementation of the Theora format, based on VP3, part of the Ogg Project
Dirac as dirac-research, a wavelet based codec created by the BBC Research, and Schrödinger, an implementation developed by David Schleef.[5]
Huffyuv – Lossless codec from BenRG
Daala – Experimental Video codec which was under development by the Xiph.Org Foundation and finally merged into AV1.
Thor – Experimental royalty free video codec which was under development by Cisco Systems, and merged technologies into AV1.
Turing – A High Efficiency Video Coding (HEVC/H.265) encoder implemented by BBC Research.
libaom – Reference implementation for the royalty free AV1 video coding format by AOMedia, inheriting technologies from VP9, Daala and Thor.

Audio codecs[edit]
FLAC – Lossless codec developed by Xiph.Org Foundation.
LAME – Lossy compression (MP3 format).
TooLAME/TwoLAME – Lossy compression (MP2 format).
Musepack – Lossy compression; based on MP2 format, with many improvements.
Speex – Low bitrate compression, primarily voice; developed by Xiph.Org Foundation. Deprecated in favour of Opus according to www.speex.org.
CELT – Lossy compression for low-latency audio communication
libopus – A reference implementation of the Opus format, the IETF standards-track successor to CELT. (Opus support is mandatory for WebRTC implementations.)
libvorbis – Lossy compression, implementation of the Vorbis format; developed by Xiph.Org Foundation.
iLBC – Low bitrate compression, primarily voice
iSAC – Low bitrate compression, primarily voice; (free when using the WebRTC codebase)
TTA – Lossless compression
WavPack – Hybrid lossy/lossless
Bonk – Hybrid lossy/lossless; supported by fre:ac (formerly BonkEnc)
Apple Lossless – Lossless compression (MP4)
Fraunhofer FDK AAC – Lossy compression (AAC)
FFmpeg codecs in the libavcodec library, e.g. AC-3, AAC, ADPCM, PCM, Apple Lossless, FLAC, WMA, Vorbis, MP2, etc.
FAAD2 – open-source decoder for Advanced Audio Coding. There is also FAAC, the same project’s encoder, but it is proprietary (but still free of charge).
libgsm – Lossy compression (GSM 06.10)
opencore-amr – Lossy compression (AMR and AMR-WB)
liba52 – a free ATSC A/52 stream decoder (AC-3)
libdca – a free DTS Coherent Acoustics decoder
Codec2 – Low bitrate compression, primarily voice

ffmpeg合并音频至视频

ffmpeg -i autovideo_4k2k.ts -i 1kl-10kr.wav -c:v copy -c:a aac  -strict experimental -map 0:v:0 -map 1:a:0 autovideo_4K_1k.ts 
ffmpeg -i autovideo_1080_1k.mp4 -filter_complex "showwavespic=s=720x240:split_channels=1:colors=0x00ff00|0xff0000|0x0000ff" -frames:v 1 audio.png
ffmpeg -i autovideo_1080.ts -filter_complex "[0:a]showfreqs=s=1920x1080:mode=line:fscale=log,format=yuv420p[v]" -map "[v]" -map 0:a showfreqs_audio_03.mp4

 

x265 文件修改次数列表

  30 source/common/loopfilter.cpp
  30 source/common/vec/ipfilter.inc
  31 source/common/scalinglist.cpp
  31 source/common/vec/blockcopy-sse3.cpp
  31 source/encoder/predict.cpp
  32 source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp
  32 source/encoder/TComRdCost_SSE.cpp
  32 source/encoder/reference.cpp
  33 source/common/cpu.cpp
  33 source/common/vec/intra-sse41.cpp
  34 source/Lib/TLibEncoder/SEIwrite.cpp
  34 source/common/vec/dct-sse41.cpp
  34 source/common/vec/pixel-sse3.cpp
  34 source/encoder/vec/vecprimitives.inc
  35 source/common/TShortYUV.cpp
  36 source/Lib/TLibCommon/TComMotionInfo.cpp
  36 source/common/picyuv.cpp
  36 source/common/wavefront.cpp
  36 source/encoder/vec/intrapred.inc
  37 source/common/shortyuv.cpp
  37 source/output/y4m.cpp
  38 intrinsic
  38 source/Lib/TLibCommon/TComBitStream.cpp
  38 source/output/yuv.cpp
  39 logic
  40 source/encoder/threadpool.cpp
  41 source/test/testpool.cpp
  43 source/common/vec/intra-ssse3.cpp
  45 source/Lib/TLibCommon/TComPicSym.cpp
  45 source/common/vec/sse.inc
  45 source/encoder/level.cpp
  45 source/x265enc.cpp
  46 source/common/vec/intra-sse3.cpp
  47 source/encoder/bitcost.cpp
  48 source/common/vec/dct-sse3.cpp
  52 source/common/intrapred.cpp
  54 source/common/arm/asm-primitives.cpp
  54 source/common/vec/vec-primitives.cpp
  54 source/encoder/macroblock.cpp
  55 source/common/deblock.cpp
  55 source/encoder/cturow.cpp
  58 source/Lib/TLibEncoder/TEncCavlc.cpp
  58 source/Lib/TLibEncoder/TEncEntropy.cpp
  58 source/common/predict.cpp
  62 source/encoder/vec/pixel.inc
  63 source/encoder/primitives.cpp
  65 source/common/vec/pixel.inc
  66 source/Lib/TLibCommon/TComWeightPrediction.cpp
  66 source/common/reference.cpp
  66 source/common/vec/ipfilter8.inc
  67 source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
  69 source/common/frame.cpp
  69 source/common/vec/dct.inc
  71 source/Lib/TLibCommon/TComPattern.cpp
  71 source/input/yuv.cpp
  72 source/Lib/TLibCommon/TComLoopFilter.cpp
  73 source/x265cfg.cpp
  74 source/common/vec/intrapred.inc
  75 source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp
  75 source/common/threadpool.cpp
  75 source/common/vec/pixel-sse41.cpp
  85 source/common/lowres.cpp
  85 source/input/y4m.cpp
  91 source/encoder/weightPrediction.cpp
  92 source/Lib/TLibCommon/TComRom.cpp
  95 source/Lib/TLibCommon/TComRdCost.cpp
  95 source/encoder/vec/macroblock.inc
  97 source/Lib/TLibCommon/TComPic.cpp
 102 source/Lib/TLibCommon/TComYuv.cpp
 102 source/common/ipfilter.cpp
 103 source/Lib/TLibEncoder/TEncSbac.cpp
 104 source/test/intrapredharness.cpp
 110 source/common/cudata.cpp
 114 source/Lib/TLibCommon/TComPicYuv.cpp
 119 source/common/vec/pixel8.inc
 120 source/common/dct.cpp
 124 source/common/primitives.cpp
 132 source/test/mbdstharness.cpp
 135 source/encoder/dpb.cpp
 140 source/test/ipfilterharness.cpp
 144 source/test/testbench.cpp
 150 source/Lib/TLibEncoder/TEncSlice.cpp
 153 source/encoder/api.cpp
 157 source/encoder/sao.cpp
 160 source/Lib/TLibCommon/TComSlice.cpp
 179 source/Lib/TLibCommon/TComPrediction.cpp
 197 source/common/quant.cpp
 198 source/encoder/framefilter.cpp
 210 source/common/pixel.cpp
 215 source/Lib/TLibEncoder/TEncTop.cpp
 245 source/common/common.cpp
 249 source/encoder/motion.cpp
 258 source/Lib/TLibEncoder/TEncGOP.cpp
 261 source/Lib/TLibCommon/TComTrQuant.cpp
 271 source/Lib/TLibCommon/TComDataCU.cpp
 290 source/encoder/compress.cpp
 301 source/test/pixelharness.cpp
 324 source/Lib/TLibEncoder/TEncCu.cpp
 326 source/encoder/entropy.cpp
 378 source/x265.cpp
 411 source/common/param.cpp
 422 source/encoder/slicetype.cpp
 442 source/encoder/ratecontrol.cpp
 445 source/encoder/search.cpp
 595 source/encoder/analysis.cpp
 692 source/Lib/TLibEncoder/TEncSearch.cpp
 706 source/encoder/frameencoder.cpp
 983 source/encoder/encoder.cpp
1727 source/common/x86/asm-primitives.cpp