Archive


Category: 似水流年

  • 如何计算 mpegts 文件的长度

    Background ts文件为传输流文件, 视频编码主要格式 h264/mpeg4, 音频为 acc/mp3。 ts文件分为三层: 1) ts 层Transport Stream、 ts 层就是在pes层加入数据流的识别和传输必须的信息 ts 流: 由定长的TS包组成 (188字节) , 而TS包是对PES包的一个重新封装 (到这里, ES经过了两层的封装) 。应用于相对有错环境下的传输与存储 (如DVB中) , 其基本单位是TS包, 长度固定188字节。日本的DVB-S广播系统采用192个字节的TS包, 美国采用204个字节的TS包, 多加了16个字节的前向纠错校验码 (FEC) 。 2) pes 层 Packet Elemental Stream、 pes 层是在音视频数据上加了时间戳等对数据帧的说明信息, pes 流: PES流是ES流经过PES打包器处理后形成的数据流, 在这个过程中完成了将ES流分组、打包、加入包头信息等操作 (对ES流的第一次打包) 。PES流的基本单位是PES包。 3) es 层 Elementary Stream. es 层就是音视频数据, es 流: 有三种, 图像数据流, […]

  • Alert Manager

    The Alertmanager handles alerts sent by client applications such as the Prometheus server. It takes care of deduplicating, grouping, and routing them to the correct receiver integration such as email, PagerDuty, or OpsGenie. It also takes care of silencing and inhibition of alerts. Grouping 分组 Grouping categorizes alerts of similar nature into a single notification. […]

  • rust first step

    installation curl –proto '=https' –tlsv1.2 -sSf https://sh.rustup.rs | sh Cargo Cargo: the Rust build tool and package manager When you install Rustup you’ll also get the latest stable version of the Rust build tool and package manager, also known as Cargo. Cargo does lots of things: build your project with cargo build run your project […]

  • gstreamer new plugin: webrtcsink and webrtcsrc

    https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/tree/main/net/webrtc webrtcsink and webrtcsrc All-batteries included GStreamer WebRTC producer and consumer, that try their best to do The Right Thing™. It also provides a flexible and all-purposes WebRTC signalling server (gst-webrtc-signalling-server) and a Javascript API (gstwebrtc-api) to produce and consume compatible WebRTC streams from a web browser. Use case The webrtcbin element in GStreamer is […]

  • TDD

    Test-Driven Development (TDD) is an iterative development cycle that emphasizes writing automated tests before writing the actual feature or function. Put another way, TDD combines building and testing. This process not only helps ensure correctness of the code — but also helps to indirectly evolve the design and architecture of the project at hand. TDD […]

  • Sing Sailing

    (originally by The Sutherland Brothers) I am sailing, I am sailing Home again ‘cross the sea I am sailing, stormy waters To be near you, to be free I am flying, I am flying Like a bird ‘cross the sky I am flying, passing high clouds To be with you, to be free Can you […]

  • 时间管理读书笔记

    每天都会坐在电脑前花费很多时间,可当每次打开电脑时, 电子邮件, 即时消息, 各种各样的新闻,八卦扑面而来, 使得我们常常忘了起初到底要干什么,许多宝贵的时间就在鼠标的点击和滚动间无情地溜走了    有本系统管理员写的关于时间管理的好书,结合我自己, 有如下读后感    1.明确到底要做什么,营造专心的环境  1) 一定要做好计划, 一年之计在于春, 一天之计在于晨, 要明确了解当前应该做的事情  至于下一步要做的事情,今天要做的事,这个月,季度要做的事,留给计划(todo list), 只把大脑留给当前的事  每天早上做班车时,拿出小本子或手机, 写下日程安排,把今天要做的事列个清单,标上优先级,所需时间  把现在要做的事,放在手边(即时贴)    2)清理零乱的桌面, 驱除掉可以分散你注意力的东西  核心工作时间里关掉浏览器中的各大新闻八卦站点,IM挂上busy的状态, 关掉Outlook,每天早中晚各花十分钟检查邮件和看新闻,总时间严格控制在30分钟内    2. 建立核心工作时间的观念,在核心工作时间内避免干扰    例如张三在你的核心工作时间找你时,你有三种选择    1) 委派它: 有其他人可以做, 就委派给他  避免给人踢皮球的感觉, 站在别人的立场上,最好得到所委派人的确认  如:李四,张三在我这里, 他有个问题,你帮你看看好吗?    2) 记录它: 只有或应该你自己来做,但不紧急,就先记下来  如:好的,我明白你的意思,我先记下来, 张三需要在明天17:30之前收到bug分析报告, 是这样的吧    3) 执行它: 如果事情紧急,就中断正在做的事,马上去做  如: 好的,我保存一下文件,现在就做    3. 建立例行公事,形成习惯  1) 每月发完薪水后去交按揭,水电费,电话费  2) 永远随身携带手机, 笔和笔记本,钱包,钥匙,餐巾纸,香烟,打火机  3) 每个星期安排时间去图书馆看新的图片,杂志,报纸  4) 每天背十个英语单词和听译一篇短文  5) 每周做一周的计划,备份重要的东西  将经常重复做的事情, 经常会忘的事作为例行公事, 列上日程表.    4. 建立一份循环日程系统, 这个系统要求可随身携带,可靠并且有足够的容量  1) 日程表: 可以记录重复会议, 约会, 事件等  2) 人生目标列表: 月度,季度和年度目标与计划  3) 每日计划:每天的时间安排  工作表: 当日任务,优先级,估计所花费的时间  时间表:每个小时的日程安排