2015年3月25日 星期三

Download 香港電台節目重溫 windows script_alpha v0.07

Download 香港電台聲音節目 windows script_alpha v0.07

- download 1


changelog:
- 新增:一個 download_Rthk_audio_By_download_link_List.wsh,批次下載多個不同網址的香港電台聲音節目,下載網址來源檔案為 download_link_List.txt

"download_Rthk_audio.wsf"

step guides:
===================================================================
unzip file,download click "download_Rthk_audio.wsf",輸入要download節目網頁網址
(不是popup player link)

例如輸入
http://programme.rthk.hk/channel/radio/programme.php?name=radio1/openline_openview&d=2015-03-11&p=1069&e=299215&m=episode

 不要輸入
http://programme.rthk.hk/channel/radio/player_popup.php?pid=1069&eid=299215&d=2015-03-11&player=mp3&type=archive&channel=radio1

refs:
http://forum5.hkgolden.com/view.aspx?type=SW&message=4940044


 ====================================================================
 
 "download_Rthk_audio_By_download_link_List.wshf"

Step guides:
  • 變更 download_link_List.txt 內容,例如,如下
  • double click "download_Rthk_audio_By_download_link_List.wshf 執行下載


http://programme.rthk.hk/channel/radio/programme.php?name=openline_openview&d=2015-03-24&p=1069&e=&m=episode
http://programme.rthk.hk/channel/radio/programme.php?name=radio2/freeaswind&d=2014-07-20&p=414&e=271537&m=episode
http://programme.rthk.hk/channel/radio/programme.php?name=radio2/freeaswind&d=2014-07-06&p=414&e=269266&m=episode


2015年3月22日 星期日

Download 香港電台節目重溫 windows script_alpha v0.065

Download 香港電台節目重溫 windows script_alpha v0.065

- download 1


change log:
- 新增:重複下載同一節目時,將已存在檔案改名為 XXXX_old.mp3
- 修正:讀取 clipboard 中港台節目 URL 會讀不到情況
- 新增:一個 download_Rthk_audio & Description.wsh,功能一樣,但多一載節錄內容介紹 
step guides:
===================================================================
unzip file,download click "download_Rthk_audio.wsf",輸入要download節目網頁網址
(不是popup player link)

例如輸入
http://programme.rthk.hk/channel/radio/programme.php?name=radio1/openline_openview&d=2015-03-11&p=1069&e=299215&m=episode

 不要輸入
http://programme.rthk.hk/channel/radio/player_popup.php?pid=1069&eid=299215&d=2015-03-11&player=mp3&type=archive&channel=radio1

refs:
http://forum5.hkgolden.com/view.aspx?type=SW&message=4940044

2015年3月15日 星期日

Download 香港電台節目重溫 windows script_alpha v0.05

Download 香港電台節目重溫 windows script_alpha v0.05

- download 1
- download 2

change log:
- 更改下載節目的 ffmpeg windows 標題為節目分段名稱
- 同時 call 多個 ffmpeg windows,同時下載同一節目中的多個分段

unzip file,download click "download_Rthk_audio.wsf",輸入要download節目網頁 (不是popup player link),

例如輸入
http://programme.rthk.hk/channel/radio/programme.php?name=radio1/openline_openview&d=2015-03-11&p=1069&e=299215&m=episode

 不要輸入
http://programme.rthk.hk/channel/radio/player_popup.php?pid=1069&eid=299215&d=2015-03-11&player=mp3&type=archive&channel=radio1

refs:
http://forum5.hkgolden.com/view.aspx?type=SW&message=4940044



2014年2月28日 星期五

下載香港電台節目重溫方法

Update: 2015-5-17 更新並整理內容
===========================

方法1:使用 internet download manager 下載
方法2:使用 ffmpeg 下載
方法3:使用 LiveStreamer 下載
方法4:使用 Download manager 下節目的 playlists 中的多個 ts 檔案
方法5:自行寫 program 解釋 HLS (HTTP Live Streaming),並下載檔案 (待寫)
方法6:編寫script並使用 ffmpeg、LiveStreamer下載


方法1:使用 internet download manager
========================================== 
internet download manager 能下載所有playlist中所有 ts 檔案並自動合併成單一檔案



refs: http://forum4.hkgolden.com/view.aspx?type=SW&message=5226138


方法2:使用 ffmpeg 下載
=====================

第一步下載 ffmpeg
http://www.ffmpeg.org/download.html

以下以 windows 為例子,Mac /Linux 下載方法細節自行推敲吧。


第二步到要重溫節目聲音檔案網頁,打開重溫節目的 Rthk player 網頁

第三步檢視原始碼
找出要下載的 playlist 網址

以講東講西為例子,打開獨立 Rthk player 網頁

下載完整全部份網址
 
下載第一部份網址
 
下載第二部份網址

「命令提示字元」 MS-DOS Command Prompt 下輸入

ffmpeg -i "http://stmw.rthk.hk/aod/_definst_/radio/archive/radio1/happydaily/mp3/mp3:20140128.mp3/playlist.m3u8?wowzaplaystart=0&wowzaplayduration=2398000" -acodec mp3 OutputTest12345.mp3


等待數分鐘後便完成下載 (轉錄 stream),檔名為 OutputTest12345.mp3 (自訂的檔案名)


方法3:使用 LiveStreamer 下載
=========================
livestreamer 介紹
http://www.videohelp.com/tools/livestreamer

用法例子 
http://stream-recorder.com/forum/download-audio-streamed-jwplayer-t19521.html

以 windows 版的 LiveStremer 為例,下載以下節目

講東講西 - 任性

先下載 LiveStreamer ,解壓

「命令提示字元」 MS-DOS Command Prompt 下輸入

Step 1
============================================================
livestreamer "hlsvariant://stmw3.rthk.hk/aod/_definst_/radio/archive/radio1/Free_as_the_wind/mp3/mp3:20150327.mp3/playlist.m3u8"  best -o 20150327.ts

Step 2
============================================================
再使用ffmpeg轉換 ts file為 mp3 file,去除一些不必要的 header data

ffmpeg -i "20150327.ts" -c:a copy "20150327.mp3"

完


方法4:使用 Download manager 下節目的 playlists 中的多個 ts 檔案
=====================================================
待寫,暫時參考
http://blog.sina.com.cn/s/blog_571e0fe40101hrvo.html


方法5:自行寫 program 解釋 HLS (HTTP Live Streaming),並下載檔案 (待寫)
 ============================================================
- 什麼是 HTTP Live Streaming
- 什麼是 M3U、M3U8 file
- M3U8 格式
- note 一些細節
港台使用串流server軟件為 Wowza Media Server 3 Perpetual Edition 3.6.4 build9641
串流時 load balance到幾個不同server,下載串流網址其實互通的,一個 down 機時,可改用另一個server

http://stmw.rthk.hk
http://stmw1.rthk.hk
http://stmw2.rthk.hk
http://stmw3.rthk.hk

現成解釋 HLS 工具或script,e.g.
gohls - HTTP Live Streaming (HLS) downloader written in Golang
https://github.com/kz26/gohls 

 hlsclient
Client to download all files from HLS streams
This is a simple Python HTTP Live Streaming Client. It consumes a list of remote playlists, and saves all needed files to serve the playlist locally: the key, segments, and a modified m3u8 with paths normalized.

2013年1月1日 星期二

About this Blog

人作出一個行為,通常會有些目的和動機,寫 Blog 也一樣。

寫 Blog 通常是公開的,因此,透露個人私隱、生活資訊是想別人關心自己。發表作品則希望表現自我,找尋知音人、收到回饋。做筆記則希望留下有用的資訊,分享資訊有了助人助己,記錄生活點滴為了留下回憶,文筆差的人寫作為了鍛鍊習組織能力、表達技巧。而建立這個Blog作初是為留下製作 firefox extension / addons 的心得,但很不幸的,這個目的已經失去作用,過去製作 firefox addons 的有用資訊 (由firefox 0.5至firefox4.0古舊內容)早己不適用,也不打算寫了。

以上所列舉的寫 Blog 動機就是推動我寫Blog的目的,想像中計劃,會寫一些讀書筆記、程式心得、人生體會、哲學認識,虛無飄渺的自言自語總會寫一點。