2016年6月26日 星期日

ffmpeg encode HD to DVD, Part 3

ffmpeg render with the parameters below should generate better quality, interlaced (top field first) NTSC widescreen mpeg2. These may be the best tuned parameters

$  ffmpeg -y -i input.mov -target ntsc-dvd -qscale:v 2 -r 29.97 -s 720x480 -aspect 16:9 -g 12 -alternate_scan 1 -top 1 TFF-q2.mpg

2016年6月25日 星期六

ubuntu on rpi2

Ubuntu 16.04 LTS 有出 Raspberry Pi 的映像檔耶,不是snappy core而是Server完整版喔。看上去真是不錯的玩具呢。




REF: http://insights.ubuntu.com/2016/06/20/howto-classic-apt-based-ubuntu-16-04-lts-server-on-the-rpi2/

2016年6月24日 星期五

Broadcast Environment in Taiwan

台灣的產業以製造代工為主,所以媒體業在21世紀後很難做,沒有足夠的資金投入,政府也無法重點栽培,所以雞生蛋生雞就每下愈況。似乎應該重構一下營運模式呢。
  • 連結在地重點產業
  • 強化獨特品牌價值

ZFS application

底下是ZFS系統使用硬體上面要注意的地方。吃記憶體,品質最好用ECC,KVM不要VirtIO,以及擴充卡不要有cache影響硬碟I/O。

Hardware
ZFS depends heavily on memory, so you need at least 4GB to start. In practice, use as much you can get for your hardware/budget. To prevent data corruption, the use of high quality ECC RAM is very recommended.
If you use a dedicated cache and/or log disk, you should use a enterprise class SSD (e.g. Intel SSD DC S3700 Series). This can increase the overall performance quite significantly.
If you are experimenting with an installation of Proxmox inside a VM (Nested_Virtualization), don't use Virtio for disks of that VM, since are not supported by ZFS, use IDE or SCSI (it's ok also with Virtio type contorller) instead.
IMPORTANT: Do not use zfs on top of hardware controller which has it's own cache management. Zfs needs to directly communicate with disks, an HBA adapter is the way to go (or something like LSI controller flashed in 'IT' mode).

2016年6月22日 星期三

google form

Google Form真是問卷,報名表的好幫手! 問卷填答設定方便,要上傳檔案這種進階功能,還能掛指令碼編寫,複製貼上超方便,省下程式設計師好多時間哪!

REF:
https://gscript.xyz/2015/12/30/google-form-%E9%80%8F%E9%81%8Egoogle%E8%A1%A8%E5%96%AE%E4%B8%8A%E5%82%B3%E6%AA%94%E6%A1%88/

ResourceSpace as MAM

ResourceSpace是個輕便的PHP撰寫的digital asset management solution,因此用來做MAM (media asset management)也就是他的一個subset。支援關鍵字,影片preview,客製欄位這些基本功能,而支援LDAP, SSO,小型片庫算合用囉。Plugin也很豐富。

REF:
http://wiki.resourcespace.org/index.php?title=Plugin_list

LinkIt Smart 7688 

聯發科出的這個物聯網小板很不錯,五百元不到,有wifi, usb*2, 128RAM, 32MB flash, with OpenWrt preinstalled. 簡直就是一個迷你Raspberry Pi,一路USB供電,一路USB接個sensor,wifi用來傳數據。很方便哪!

REF:
http://oranwind.org/linkit-7688-linkit-smart-76887688-duo-ji-chu-jiao-xue/

2016年6月19日 星期日

Chrome OS

Chromebit迎著智慧棒風潮,出了一陣子了。不知道能為Chrome OS增加多少普及率呢?至少在簡易電腦,櫃檯,Console之類的應用,應是足矣。

REF: http://www.techbang.com/posts/40067-asus-chromebit-computer-great-trial

2016年6月18日 星期六

Geo replication

用不同地區IDC的概念來解釋「雲端」到底買了什麼,似乎比較直觀一些。備份資料到雲端,實際也是異地備援那樣。例如用Google App這種SaaS,就可以在地圖上標出Mountain View, CA啦。

cloud forum 2016

場地漂亮,選在松菸14F,view很好。可惜議程就是廠商大拜拜,基本沒有新東西。
Notes:
  • hard to promote app, html5 instead.
  • road digging is limited by law. therefore cable wiring on air is simpler.

openstack spec

Compute 與 Storage nodes 應該是建造像 OpenStack 這種 IaaS 最常用的components. 因此提早規劃適當的伺服器規格給他們,不算浪費時間吧 : )
  • Compute應考慮刀鋒架構。2U4node的刀鋒伺服器做一個節點挺合適。
  • Storage的話,當然是用SDS這種IP Storage,而每個硬碟不要太大,維護。Ceph的話,2U機殼含12Bay硬碟,兩個做SSD cahe,還剩10個用2TB HDD. replication三座,這樣一個單位是20TB.

2016年6月15日 星期三

Storage network trend

一些趨勢觀察報告如下。

  • IDC projection: 3x growtg in FC+NAS×iSCSI storage.
  • IP storage vs Fibre Channel ('95~) storage.
  • Gen5 16Gbps vs Gen6 32Gbps
  • SSD/Flash requires faster networking:IOPS vs throughput
  • Flash drive speed may be 10,000 times faster than 7200rpm!
  • Monitoring and Alerting Policy Suite (MAPS) for network packets. ~ intuitive reporting ex. CRC errors.
  • Loop is still the common issue for IP Network! => Brocade VDX could auto detect & correct config.
  • Pure Storage: warranty peroid + volume capacity, as simple pricing.
  • Introducing forever flash: controller (firmware) upgrade every 3 yrs. All Flash, everywhere.
  • ex. Netflix has 1.5 factor gzip compression, and higher IOPS of PB scale data.

like share analysis

Facebook的分享與讚的分析,可能可以作為二級傳播的觀察指標。讚或可作為「正向影響力」的表徵,而分享的讚數或可視為意見領袖的指標。讚數超過次數愈多,表示分享效率愈高。是否表示此人的影響力愈好?當然內容本身也會影響。

cable system

總的來說,有線系統數位化後,應該還是保持收視優勢。IPTV,OTT還是挺難撼動市佔率。

  • cable管線走空中,沒有地下化的限制。數位升級時,工程隊會先來換幹線,頻寬不夠的細線或任何瓶頸會更新喔。
  • 原本的cable室內線,除非是細線,不然原本的走線都可以現成使用。30min就可更新一戶,要從新拉室內線的,大概延到一兩小時。
  • 安上機上盒就可以收視。機上盒可確認訊號強度,基本高於-49dB就可正常收視,每分接一個機上盒就會再降低。所以拉到家戶,至少要有-43dB左右。
  • 數位化之後,多了很多HD內容頻道,並且還有SMOD, CatchPlay直接搶食MOD的市場。
  • 用戶操作習慣不變:一支遙控器,電源開關控制電視機,選台跟音量跟數字盤控制機上盒。電視機原本的遙控器調適好後,基本可以不用,而機上盒基本不關。
  • 由於機上盒基本不關,機上盒的收視數據會有偏差,因此尼爾森收視調查還是需要。加上收視習慣不需改變,2015世新收視調查的電視比率佔92.1%,數位機上盒又蠶食OTT市場,這樣舊有的Cable市場因此很難撼動。

2016年6月12日 星期日

coverage, reach, and profiling

優質的影音內容可經由各種通路平台,覆蓋不同的國家與地區,觸達不同的人群。「地理分
佈」說明了覆蓋範圍(coverage),是三大指標(覆蓋,觸達,觀眾輪廓)中, 從最宏觀的視野描繪一個大眾媒體的影響區域。還需要更細緻的觸達(REACH,就是指定內容在通路上觸及的觀眾),與觀眾輪廓(audience profile,受眾屬性),從更具體的「質」與「量」進一步敘述媒體影響力。

然而,傳統媒體通路長於覆蓋(廣電播出),新媒體通路長於觸達(用戶互動),沒有任一平
台通路可以提供充分資料以確切闡述媒體影響力,這也是近年各大媒體在轉型過程中難
以確定戰略方向的主因。綜合各通路資料並以一致性內容傳播於不同的通路平台,由此可總合(ensemble)各指標,使其產品效益(ex. 廣告)最佳化。

Check_MK RAW edition, part 8

Hosts and services多起來後,也需要將更多文字資訊整合進MK中,就可以活用他的Notes的功能了。如此,即可集中查看相關資訊。

REF: https://mathias-kettner.de/checkmk_multisite_notes.html

Now let's make a note for the host b02nag01. This is done by creating a file with that name and writing HTML code into it:
/etc/check_mk/notes/hosts/b02nag01
This is a note for b02nag02

2016年6月10日 星期五

ffmpeg better mpeg-2

REF: http://superuser.com/questions/835871/how-to-make-an-mpeg2-video-file-with-the-highest-quality-possible-using-ffmpeg

You have a few options if you want to stick with MPEG-2:

1. Increase the bitrate.

2. Use a specific quality setting. Change -b:v … to -qscale:v 2. The number here ranges from 1 to 31 and higher means lower quality. There's no point going beyond 4 or 5. If you don't care for the bitrate start with 2 and see if that works for you.

2016年6月9日 星期四

TV packaging

TV節目結構,跟廣電播出的IT架構,可以進一步整合。拆解為:

  • Main Opening. Video.
  • Virtual Background. Animation.
  • Virtual Foreground. Image with alpha.
  • Insert loops. Video.
  • Ending. Image comps.

Analysis to Big Data

講起物聯網與大數據,三小時大致可分為:
  • 趨勢分析與大數據 -- 從分析理論到商業分析的應用 (1hr)
  • 大數據與萬物聯網 -- 物聯網給產業升級帶來什麼?(1hr)
  • 萬物聯網與新媒體趨勢 -- 產業升級相關的廣宣策略 (1hr)

SDI upconverter

現在的SDI介面設計愈來愈方便。多通道獨立I/O已經很容易取得。訊號轉換也是幾萬塊就搞定的事情。
  • 構圖比例先統一為16:9。SD的採用NTSC widescreen。這樣轉換的圖像損失比較好算。
  • 最簡單就是用ffmpeg進行live I/O。NTSC upconvert的話,最好停在720p,這樣pixel減損比為 (1280x720)/(720x480)=2.67不到三倍。到1080p的話可能就差很多了。
  • 總體HD話就因而彈性很多。但就得限制在720p為中繼標準。以目前OTT與電信網路的進展,這還夠用。

Norway style

一家咖啡廳的內裝很有FU. 聽說那就是北歐風格,有挪威的感覺。具野性的文明感吧,跟現有的都市不同。
  • 因應寒冷天氣,不宜外出的基本設計方針。
  • 木造,導入戶外自然風。以及其他能強化自然風的物件。
  • 大格窗框,採光,因外出不易。並營造室內大氣的氣氛。

Facebook Live, Part 2

Facebook Live 終於上線啦! 有些眉角需要注意。


  • 一篇貼文的RTMP url只能用一次! 嘗試連第二次會error,貼文得換一篇。算是一種安全機制吧,避免[蓋台」。
  • video profile沒有嚴格限制,比起YouTube Live 寬鬆,High profile也跑得不錯。但有上述連一次限制,rtmp穩定度就很重要,得確保訊號源很穩,不然卡頓時,你是不能換訊號的。
  • YouTube的容許度就大一些,只有初始連結比較要求。

H.264 baseline

H.264 baseline有一陣子沒用了,因為平均設備的運算都挺強,處理HIgh profile基本沒大問題。然而,在穩定度很critical例如訊號轉接,發現baseline這種低功耗做法,確實讓穩定度提升。

REF: https://trac.ffmpeg.org/wiki/Encode/H.264.

If you want your videos to have highest compatibility with target devices (older iOS versions or all Android devices):
-profile:v baseline -level 3.0
This disables some advanced features but provides for better compatibility. Typically you may not need this setting (and therefore avoid using -profile:vand -level), but if you do use this setting it may increase the bit rate quite a bit compared to what is needed to achieve the same quality in higher profiles.

iOS

iOS Compatability (source)
ProfileLevelDevicesOptions
Baseline3.0All devices-profile:v baseline -level 3.0
Baseline3.1iPhone 3G and later, iPod touch 2nd generation and later-profile:v baseline -level 3.1
Main3.1iPad (all versions), Apple TV 2 and later, iPhone 4 and later-profile:v main -level 3.1
Main4.0Apple TV 3 and later, iPad 2 and later, iPhone 4s and later-profile:v main -level 4.0
High4.0Apple TV 3 and later, iPad 2 and later, iPhone 4s and later-profile:v high -level 4.0
High4.1iPad 2 and later, iPhone 4s and later, iPhone 5c and later-profile:v high -level 4.1
High4.2iPad Air and later, iPhone 5s and later-profile:v high -level 4.2

Supermicro products

在Computex看到Supermicro,近年發展的挺有趣呢。可應用的規格不少。

電視台的IT架構以多實體播控儲存節點(20個以上)為主,Ultra Server系列比較適合運用。適合的型號為:1U (6018U-TR4+) 與 2U (6028U-TR4+) 這兩種規格。SuperServer (SYS-5019S-WR) 也不錯。

http://www.supermicro.com/products/nfo/Ultra.cfm
http://www.supermicro.com/products/system/1U/6018/SYS-6018U-TR4_.cfm
http://www.supermicro.com/products/system/2U/6028/SYS-6028U-TR4_.cfm

10Gb與1Gb的SDN交換器也有! 搭配10Gb的網卡吧。

L3 SDN Switch (SSE-X3648S/SR)
L2 SDN Switch (SSE-G3648B/BR)
Add-on Card (AOC-STG-b4S)

還有很酷的硬碟櫃,一次塞60個(甚至90個),重達200kg!

SuperStorage (SSG-6048R-E1CR60N)


samsung vs apple

Android總是緊跟iOS的發展腳步。近年iOS停滯了,Android基本就跟上了,現在的棉花糖,連App Security都做了,狠狠的鎖住App的可視範圍,基本的安全框架已臻完善。OS的取代性,已有九成,但一些關鍵細節,Android沒有自帶。然而,由此可看到第三方廠商如Samsung的「用心」,唉難怪蘋果要告他。基本可以完全取代了,但價格只有一半甚是三分之一!

  1. Mail App。Android自帶Gmail,抄一個好用度不輸Apple Mail的吧。
  2. 多國鍵盤。連優雅的排列也抄起來。
  3. Calendar, Tasks這些小物。也是必備的喔。
  4. Notification & Lock Screen。還沒到iOS那麼整合,但work around算改善很多。
  5. 底層再加Security Policy,像SELinux那樣。

Telecom recent status

前些日子一位電信業的朋友講述目前的競爭現況,真是令人大開眼界,幾年前還感覺這麼激烈呢。

  • 基本戰術方針:客人想換電信業者,門市要想辦法留客,否則門市人員扣分。
  • 一般客人不會太異常的拖欠不繳,退租時,門市會詢問對方業者開出的價格。這邊,就直接把你的租費下壓到同樣的價格。
  • 所以,在代工發達的地方,產業發展成熟後又回到不創新的價格戰。看來這就是代工集中的弊端吧。

ffmpeg encode HD to DVD, Part 2

承上,若影片需要Field order,則可用:

(Bottom Field First)

ffmpeg -y -i input.mov -target ntsc-dvd -r 29.97 -s 720x480 -aspect 16:9 -g 12 -flags +ilme+ildct -alternate_scan 1 -top 0 BFF.mpg

(Top Field First)

ffmpeg -y -i input.mov -target ntsc-dvd -r 29.97 -s 720x480 -aspect 16:9 -g 12 -flags +ilme+ildct -alternate_scan 1 -top 1 TFF.mpg

ffmpeg encode HD to DVD MPEG-2

用ffmpeg直接encode mpeg2 from HD 1080p MOV給廣電播出,可簡單設定參數如下。field order基本是progressive scan。

ffmpeg -y -i input.mov -target ntsc-dvd -r 29.97 -s 720x480 -aspect 16:9 -g
12 output.mpg

播出端的mpeg2 decode設計,簡單可不用太多參數,呼叫library做 720x480, AV_CODEC_ID_MPEG2VIDEO, CODEC_FLAG_TRUNCATED,decode後轉pixel format到PIX_FMT_RGB32。