ffmpeg 2-pass

Assume to limit the output less than 20 MB.

  1. 1st-pass crf :

    ffmpeg -i input.mkv -an -ss 00:55 -t 00:10 -pass 1 -passlogfile text.log -codec:v libx264 -x264opts crf=22 output.mp4

    20 MiB = 8 * 20 Mib = 8 * 20 * 1024 * 1024 bits = 167772160 bits

    bitrate = 167772160 bits / 10 sec = 16777216 bps = (16777216 / 1000) * K bps ~= 16777 K bps

  2. 2nd-pass 會參考 crf 22 的 bitrate 分配方式 等比例縮小到 16777 K bps

    ffmpeg -i input.mkv -an -ss 00:55 -t 00:10 -pass 2 -passlogfile text.log -codec:v libx264 -b:v 16777k output.mp4

Invest

  • 極簡投資 : 六百萬的教訓,換一個價值投資APP的誕生 – Mobile01
    [股票估值,個股健檢,定存股計算]
    這個APP運用公司的財報數據計算出公司股票的合理價格
    同時也分析了公司的體質,幫忙過濾地雷股
    基本的財務數字在裡面都有整理出來了
    APP也搜集了一些財經新聞,可以隨時掌握全球的經濟動態

BookmarkLet for MarkDown

Some works to implement bmLet (BookmarkLet) for MarkDown .

  1. TitleURL

    javascript:(function(d){var x=d.createElement(‘input’);x.type=’text’;x.value='[‘+d.title+’](‘+d.URL+’)’;d.body.appendChild(x);x.focus();d.execCommand(‘copy’);d.body.removeChild(x);})(document)

    javascript:(function(d){var x=d.createElement(‘input’);x.type=’text’;x.value='[‘+d.title+’](‘+d.URL+’)’;d.body.appendChild(x);x.select();x.setSelectionRange(0, 99999);d.execCommand(‘copy’);x.parentNode.removeChild(x);})(document)

  2. #MarkUP

    javascript:(function(d){var x=d.createElement(‘pre’);x.appendChild(d.createTextNode(‘## [‘+d.title+”]\n(“+d.URL+’)’));d.body.appendChild(x);d.execCommand(‘copy’);d.body.removeChild(x);})(document)

    javascript:(function(d){var x=d.createElement(‘textarea’);x.appendChild(d.createTextNode(‘## [‘+d.title+”\n](“+d.URL+’)’));d.body.appendChild(x);x.select();d.execCommand(‘copy’);d.body.removeChild(x);})(document)

  3. +MarkItem

    javascript:(function(d){var x=d.createElement(‘pre’);x.appendChild(d.createTextNode(‘+ [‘+d.title+”\n](“+d.URL+’)’));d.body.appendChild(x);d.execCommand(‘copy’);d.body.removeChild(x);})(document)

  4. =MarkIt

    javascript:(function(d){var x=d.createElement(‘textarea’);x.appendChild(d.createTextNode(‘- [‘+d.title+”\n](“+d.URL+’)’));d.body.appendChild(x);x.select();d.execCommand(‘copy’);d.body.removeChild(x);})(document)

  5. etc .

Continue reading “BookmarkLet for MarkDown”

ffmpeg merge multiple streams

ffmpeg -i input1.mkv -i input2.webm -i input3.mov \
-filter_complex '[0:v:0][0:a:0][1:v:0][1:a:0][2:v:0][2:a:0]concat=n=3:v=1:a=1[outv][outa]' \
-map '[outv]' -map '[outa]' output.mp4
  • See also [ffmpeg – Merge two video clips into one | Unix & Linux Stack Exchange
    ]

    ffmpeg \
      -i input1.mp4 \
      -i input2.mp4 \
      -filter_complex '[0:v]pad=iw*2:ih[int];[int][1:v]overlay=W/2:0[vid]' \
      -map [vid] \
      -c:v libx264 \
      -crf 23 \
      -preset veryfast \
      output.mp4

關於同文堂 bookmarklet 的二三事

  1. openfoundry 出現 , 亦參見此處
  2. 個人曾改寫為 Maxthon add-on.
  3. bookmarklet 有時行,有時不行,這篇文章 [新同文堂 Bookmarklet 失效] 解說得很詳細,也有提供解決辦法。但是解法中的 [RawGit] 也即將失效,可以轉移陣地到下列 services.

~~~~

The following free services offer fantastic alternatives to some or all of RawGit’s functionality. You may like them even more than RawGit.

~~~~

https://cdn.rawgit.com/stargazer8tw/samples/fe8d4f5d89aebff0359b7f3ea52e141a1d92dcf5/tongwen_bookmarklet/js/bookmarklet_tw.js
==>
https://cdn.jsdelivr.net/gh/stargazer8tw/samples@fe8d4f5d89aebff0359b7f3ea52e141a1d92dcf5/tongwen_bookmarklet/js/bookmarklet_tw.js

 

未完,待續。