

<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ubuntu &#8211; Max的每一天</title>
	<atom:link href="https://max-everyday.com/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>https://max-everyday.com</link>
	<description>認真過每一天、快樂過每一天</description>
	<lastBuildDate>Sun, 09 Nov 2025 05:46:57 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://max-everyday.com/wp-content/uploads/2020/02/ic_launcher_round_2020-003.png</url>
	<title>Ubuntu &#8211; Max的每一天</title>
	<link>https://max-everyday.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>在 Ubuntu 20.04.1 LTS 的終端機改用 Oh My Zsh</title>
		<link>https://max-everyday.com/2020/12/ubuntu-20-04-1-lts-oh-my-zsh/</link>
					<comments>https://max-everyday.com/2020/12/ubuntu-20-04-1-lts-oh-my-zsh/#respond</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Tue, 01 Dec 2020 02:39:18 +0000</pubDate>
				<category><![CDATA[電腦相關應用]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://max-everyday.com/?p=13287</guid>

					<description><![CDATA[這篇文章要分享，如何在Ubuntu 的電腦安裝 Oh My Zsh，會想讀這篇文章的可能是電腦人吧。 如果你家的電腦，只有拿來做「簡單的文書處理」和「上網」，可以考慮重灌 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>這篇文章要分享，如何在Ubuntu 的電腦安裝  Oh My Zsh，會想讀這篇文章的可能是電腦人吧。</p>



<p>如果你家的電腦，只有拿來做「簡單的文書處理」和「上網」，可以考慮重灌為 Ubuntu 的環境。</p>



<ul class="wp-block-list"><li>在 Windows 電腦，製作可以開機並安裝新系統的USB，參考這篇：<br><a href="https://max-everyday.com/2020/11/windows-10-download-sn/">https://max-everyday.com/2020/11/windows-10-download-sn/</a></li><li>在 Mac 電腦，製作可以開機並安裝新系統的USB，參考這篇：<br><a href="https://max-everyday.com/2020/10/create-a-bootable-usb-stick/">https://max-everyday.com/2020/10/create-a-bootable-usb-stick/</a></li></ul>



<p>Max想開發在Ubuntu上執行的小程式，需要一個Ubuntu 的測試環境，所以使用VirtualBox 安裝了一台 Ubuntu 20.04.1 的虛擬電腦來執行。</p>



<p>新的版本的Ubuntu 似乎和 mac OS 的界面有點像，也開始支援色深模式(Dark Mode)。</p>



<p>在Ubuntu 裡使英文介面似乎效果會比使用中文界面漂亮一點點。</p>



<p>跑在 SSD 上的 Ubuntu 不管是開/關機，還是上網的流暢度都比使用Win10 好很多，相對缺點就是可以用的軟體和遊戲「極少」，因為軟體較少，目前也幾乎沒什麼Linux的電腦病毒。</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="824" src="https://max-everyday.com/wp-content/uploads/2020/12/Screen-Shot-2020-12-01-at-10.25.58-1024x824.png?v=1606789589" alt="" class="wp-image-13293" srcset="https://max-everyday.com/wp-content/uploads/2020/12/Screen-Shot-2020-12-01-at-10.25.58-1024x824.png?v=1606789589 1024w, https://max-everyday.com/wp-content/uploads/2020/12/Screen-Shot-2020-12-01-at-10.25.58-500x402.png?v=1606789589 500w, https://max-everyday.com/wp-content/uploads/2020/12/Screen-Shot-2020-12-01-at-10.25.58-615x495.png?v=1606789589 615w, https://max-everyday.com/wp-content/uploads/2020/12/Screen-Shot-2020-12-01-at-10.25.58.png?v=1606789589 1092w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading">下載 Ubuntu</h2>



<p>建議下載 Ubuntu 最新的 LTS 版本的.iso影像檔。<br><a href="https://releases.ubuntu.com/">https://releases.ubuntu.com/</a></p>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading">在 VirtualBox 裡新增一台虛擬主機</h2>



<p>建議一開始安裝時 VirtualBox 的儲存空間建議先放在實際的硬碟裡，因為在安裝的過程有大量的磁碟存取，如果一開始就把VirtualBox 的儲存空間放在USB外接式硬碟上，受限於USB傳輸速度慢很多，會拉長安裝的時間。</p>



<p>大約 30～40分鐘就安裝完成了。</p>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading">更新 Ubuntu Software</h2>



<p>ubuntu 預設安裝的程式，在之前安裝用的 .iso 影像檔裡的版本較舊，在連上網路後，建議先點「Updates」(更新) 分頁，把內建的軟體都更新為最新版本。</p>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading">安裝 chrome 瀏覽器</h2>



<p>請先使用內建的 Firefox 瀏覽器來安裝chrome 瀏覽器，在 chrome 的網頁裡，點選安裝時，會彈出檔案下載的視窗，建議不要選「執行」而是要選擇「儲存」chrome 的安裝檔，等待下載完成後，使用 Ubuntu 的 Files (檔案總管) 程式去開啟並安裝 chrome 的安裝檔，就可以有chrome 瀏覽器使用。</p>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading">安裝 oh my  zsh</h2>



<p>如果你會下指令的話，建議修改掉Ubuntu 預設的 shell，改用 zsh，max 在用過 oh my zsh 之後，再使用其他的 shell 就覺得用起來不太習慣，oh my zsh安裝方式如下。</p>



<h3 class="wp-block-heading" id="f166">先更新 apt packages</h3>



<pre class="wp-block-preformatted">sudo apt-get update<br>sudo apt upgrade</pre>



<h3 class="wp-block-heading">安裝&nbsp;git</h3>



<p id="f047">預設的 Ubuntu 並沒有git, 安裝&nbsp;git&nbsp;:</p>



<pre class="wp-block-preformatted">$sudo apt-get install git</pre>



<h3 class="wp-block-heading" id="6fa9">安裝 zsh </h3>



<p>oh-my-zsh 就是基於 zsh shell 之上運作</p>



<pre class="wp-block-preformatted">sudo apt install zsh</pre>



<h3 class="wp-block-heading" id="d88e">Clone Oh My Zsh 的 Repo</h3>



<pre class="wp-block-preformatted">git clone <a href="https://github.com/robbyrussell/oh-my-zsh.git">https://github.com/robbyrussell/oh-my-zsh.git</a> ~/.oh-my-zsh</pre>



<h3 class="wp-block-heading" id="94da">建立新的zsh設定文件</h3>



<pre class="wp-block-preformatted">cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc</pre>



<h3 class="wp-block-heading" id="7b3c">修改預設配置</h3>



<pre class="wp-block-preformatted">chsh -s /bin/zsh</pre>



<p id="d2c3">為了使該命令生效，您需要重新啟動系統，是重開機，不是只有重開Terminal。</p>



<p>重開完成後，就可以看到漂亮&amp;簡潔有力的oh my zsh 介面：</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="818" src="https://max-everyday.com/wp-content/uploads/2020/12/Screen-Shot-2020-12-01-at-09.42.25-1024x818.png?v=1606788362" alt="" class="wp-image-13289" srcset="https://max-everyday.com/wp-content/uploads/2020/12/Screen-Shot-2020-12-01-at-09.42.25-1024x818.png?v=1606788362 1024w, https://max-everyday.com/wp-content/uploads/2020/12/Screen-Shot-2020-12-01-at-09.42.25-500x400.png?v=1606788362 500w, https://max-everyday.com/wp-content/uploads/2020/12/Screen-Shot-2020-12-01-at-09.42.25-615x491.png?v=1606788362 615w, https://max-everyday.com/wp-content/uploads/2020/12/Screen-Shot-2020-12-01-at-09.42.25.png?v=1606788362 1220w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading">共用 host 的分享目錄</h2>



<p>讓虛擬主機直接存取宿主(host) 的檔案，比較省空間，也可以省去複製檔案的時間，但預設情況下，ubuntu 的 user （不是 root 權限）無法存取 sf_開頭的 virtualbox 共享目錄，解法請在Terminal 裡執行下面指令，並重新開機：</p>



<pre class="wp-block-preformatted">sudo adduser $USER vboxsf</pre>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading">相關文章</h2>



<p>在 Ubuntu 18.04 LTS / 16.04 LTS 中安裝使用 Oh-My-Zsh<br><a href="https://medium.com/@wifferlin0505/cf92203ca8a2">https://medium.com/@wifferlin0505/cf92203ca8a2</a></p>



<p>Customize your terminal (Oh My Zsh) on Ubuntu 20.04 LTS<br><a href="https://medium.com/@thecaffeinedev/customize-your-terminal-oh-my-zsh-on-ubuntu-18-04-lts-a9b11b63f2">https://medium.com/@thecaffeinedev/customize-your-terminal-oh-my-zsh-on-ubuntu-18-04-lts-a9b11b63f2</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://max-everyday.com/2020/12/ubuntu-20-04-1-lts-oh-my-zsh/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>在MacOS建立可以開機的Ubuntu USB隨身碟</title>
		<link>https://max-everyday.com/2020/10/create-a-bootable-usb-stick/</link>
					<comments>https://max-everyday.com/2020/10/create-a-bootable-usb-stick/#respond</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Wed, 21 Oct 2020 15:42:55 +0000</pubDate>
				<category><![CDATA[電腦相關應用]]></category>
		<category><![CDATA[macOS]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://max-everyday.com/?p=12761</guid>

					<description><![CDATA[Max鄰居家裡的電腦壞了，硬碟有壞軌，去幫他看錯誤訊息是讀取某一個磁區（sector）裡的資料失敗，鄰居其實只有在上網，之前他電腦就壞掉過一次，很神奇第一次遇到有在用電腦 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Max鄰居家裡的電腦壞了，硬碟有壞軌，去幫他看錯誤訊息是讀取某一個磁區（sector）裡的資料失敗，鄰居其實只有在上網，之前他電腦就壞掉過一次，很神奇第一次遇到有在用電腦，但是硬碟幾乎是空的，800GB的硬碟，只使用了 12GB，鄰居問我，是不是該買台電腦，我建議他先試看看，完全沒有硬碟，使用可以開機的USB隨身碟當作業系統用一陣子看看，覺得太慢或不適應的話，再買新新電腦。</p>



<p>要建立可以開機的USB，首先是到ubuntu 下載安裝影像檔（ISO Image），目前最新的穩定版本是 20.04.1 雖然有 2.7G，現在的 4G網路滿快的，一下子就下載好了。</p>



<p>現在有些檔案從網路上下載所需的時間，比自己去外接式硬碟找還快，以前是網路下載的速度很慢，所以如果下載了這種很大的檔案，就會想存一份到外接式硬碟裡，現在進步為直接從網路下載就行了，而且還會是較新的版本，網路快而且穩定省下很多的麻煩，進化後的網路，讓照片和影片的觀看和備份都直接丟到雲端上，追劇、視聽娛樂也方便很多。</p>



<p>隨著網路速度愈來愈快和穩定，有些需要在雲端上儲存檔案而且花錢買過 iCloud,Google Drive,Dropbox 的人，可能會覺得這類服務很方便，而且收費也滿合理，一試成主顧。</p>



<hr class="wp-block-separator has-css-opacity"/>



<p>目前 ubuntu 建議的工具是 <a href="https://www.balena.io/etcher/">balenaEtcher</a>:<br><a href="https://etcher.balena.io/">https://etcher.balena.io/</a></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>For most users we recommend&nbsp;<a href="https://www.balena.io/etcher/">balenaEtcher</a>&nbsp;instead of Rufus which is simpler to use and also available on MacOS and Ubuntu. Instructions are now included in the primary&nbsp;<a href="https://ubuntu.com/tutorials/install-ubuntu-desktop#1-overview">Install Ubuntu Desktop</a>&nbsp;tutorial.</p>
</blockquote>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">下載 iso 檔</h2>



<p>Ubuntu下載網址：<br><a href="https://releases.ubuntu.com/">https://releases.ubuntu.com/</a></p>



<p>安裝影像檔(.ISO)，台灣的下載點：<a href="http://tw.archive.ubuntu.com/ubuntu-cd/">http://tw.archive.ubuntu.com/ubuntu-cd/</a></p>



<p>其他台灣的下載點可以使用 google 來查詢:</p>



<pre class="wp-block-code"><code>ubuntu-24.04.3-desktop-arm64.iso /site:.tw</code></pre>



<p>上面的版本號碼, 請修改成ubuntu 上官方網站 desktop 版本最後的下載版本。</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="525" src="https://max-everyday.com/wp-content/uploads/2020/10/2025-11-09_13-42_e4-1024x525.jpg?v=1762666985" alt="" class="wp-image-22259" srcset="https://max-everyday.com/wp-content/uploads/2020/10/2025-11-09_13-42_e4-1024x525.jpg?v=1762666985 1024w, https://max-everyday.com/wp-content/uploads/2020/10/2025-11-09_13-42_e4-500x256.jpg?v=1762666985 500w, https://max-everyday.com/wp-content/uploads/2020/10/2025-11-09_13-42_e4-615x315.jpg?v=1762666985 615w, https://max-everyday.com/wp-content/uploads/2020/10/2025-11-09_13-42_e4.jpg?v=1762666985 1425w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">下載失敗的問題</h3>



<p>由於 iso 檔案都太大, 如你的的網路常下載失敗, 建議使用支援續傳的用戶端來下載檔案. 如果找的到 ftp 的載點的話, 也可以使用 FileZille 來下載.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="824" src="https://max-everyday.com/wp-content/uploads/2020/10/2025-11-09_13-44_e5-1024x824.jpg?v=1762667072" alt="" class="wp-image-22260" srcset="https://max-everyday.com/wp-content/uploads/2020/10/2025-11-09_13-44_e5-1024x824.jpg?v=1762667072 1024w, https://max-everyday.com/wp-content/uploads/2020/10/2025-11-09_13-44_e5-500x402.jpg?v=1762667072 500w, https://max-everyday.com/wp-content/uploads/2020/10/2025-11-09_13-44_e5-615x495.jpg?v=1762667072 615w, https://max-everyday.com/wp-content/uploads/2020/10/2025-11-09_13-44_e5.jpg?v=1762667072 1186w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>在 google 有查到 ftp.tku.edu.tw 可以下載, 所以直接在 filezilla 裡輸入 ftp.tku.edu.tw 就看到下載點了. </p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">建立可以開機的Ubuntu USB隨身碟</h2>



<p>之前都是使用手動的指令，雖然也有試ubuntu 建議的圖形介面的軟體 Etcher，但都失敗，今天終於成功了，原來是之前少了一個卸載(Unmount)的步驟，今天也是失敗了幾次，最後終於試成功。（開心）</p>



<p>Etcher教學：<br><a href="https://ubuntu.com/tutorials/create-a-usb-stick-on-macos#1-overview">https://ubuntu.com/tutorials/create-a-usb-stick-on-macos#1-overview</a></p>



<p>Etcher下載：<br><a href="https://www.balena.io/etcher/">https://www.balena.io/etcher/</a></p>



<p>Etcher github專案：<br><a href="https://github.com/balena-io/etcher">https://github.com/balena-io/etcher</a></p>



<hr class="wp-block-separator has-css-opacity"/>



<p>其實滿簡單的，3個步驟：</p>



<ul class="wp-block-list">
<li>1：選擇下載的Ubuntu ISO 檔案。</li>



<li>2：選擇目的USB隨身碟。</li>



<li>3：按下Flash。</li>
</ul>



<p>要注意的是：</p>



<ul class="wp-block-list">
<li>在第2步時，似乎沒有先去退出(unmount)會顯示錯誤，建議可以先在 Disk Utility 裡退出 External 的USB隨身碟。</li>



<li>完成時會顯示無法讀取的訊息，是正常的。</li>
</ul>



<p>按下Flash 後的畫面：</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="665" src="https://max-everyday.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-21-at-22.47.21-1024x665.png?v=1603293094" alt="" class="wp-image-12762" srcset="https://max-everyday.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-21-at-22.47.21-1024x665.png?v=1603293094 1024w, https://max-everyday.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-21-at-22.47.21-500x325.png?v=1603293094 500w, https://max-everyday.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-21-at-22.47.21-1536x997.png?v=1603293094 1536w, https://max-everyday.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-21-at-22.47.21-615x399.png?v=1603293094 615w, https://max-everyday.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-21-at-22.47.21.png?v=1603293094 1824w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>製作完成時，會顯示的訊息：</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="497" src="https://max-everyday.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-21-at-22.56.36-1024x497.png?v=1603293108" alt="" class="wp-image-12763" srcset="https://max-everyday.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-21-at-22.56.36-1024x497.png?v=1603293108 1024w, https://max-everyday.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-21-at-22.56.36-500x243.png?v=1603293108 500w, https://max-everyday.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-21-at-22.56.36-615x299.png?v=1603293108 615w, https://max-everyday.com/wp-content/uploads/2020/10/Screen-Shot-2020-10-21-at-22.56.36.png?v=1603293108 1104w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>附註：好神奇的程式，居然也可以在 Linux 的世界裡，直接透過 apt 指令安裝。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://max-everyday.com/2020/10/create-a-bootable-usb-stick/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>燃燒的陰德</title>
		<link>https://max-everyday.com/2019/04/yinde/</link>
					<comments>https://max-everyday.com/2019/04/yinde/#respond</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Fri, 26 Apr 2019 20:47:09 +0000</pubDate>
				<category><![CDATA[生活小事]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[哲學]]></category>
		<guid isPermaLink="false">http://max-everyday.com/?p=7807</guid>

					<description><![CDATA[我寫了一些很簡單、只有一個畫面的小程式App，Google 會給我廣告收入。 2019年3月3日我閒來沒事，就去升級伺服器主機裡的沒有在使用的套件，我的認知是 Pytho [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>我寫了一些很簡單、只有一個畫面的小程式App，Google 會給我廣告收入。</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1024" height="589" src="https://max-everyday.com/wp-content/uploads/2019/04/Screen-Shot-2019-04-27-at-04.12.24-1024x589.jpg" alt="" class="wp-image-7809" srcset="https://max-everyday.com/wp-content/uploads/2019/04/Screen-Shot-2019-04-27-at-04.12.24.jpg 1024w, https://max-everyday.com/wp-content/uploads/2019/04/Screen-Shot-2019-04-27-at-04.12.24-500x288.jpg 500w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>2019年3月3日我閒來沒事，就去升級伺服器主機裡的沒有在使用的套件，我的認知是 Python 2 和 Python 3 應該是獨立的互相不影響，手賤去<a href="http://stackoverflow.max-everyday.com/2019/03/install-python3-7-in-ubuntu-16-04/">把 Python 3.5 升到 Python 3.7</a>，心想也許以後可能用的到，但我萬萬沒想到因為要升級到 Python 3.7 所以更新了伺服器主機裡SSL的設定值，因此造成中斷服務了10天，我在2019年3月13日才發現。</p>



<p>升級完我有簡單的測試 python 3 和 python 2 都可以匯入 ssl 的套件，但我沒有實際去存取外部網站看看，匯入套件不會出錯，實際存取 ssl 網站時就會讓程式掛掉。</p>



<p>3月13日發現服務中斷時心想：「完蛋了，客人應該都把APP刪光光了，因為連續10天APP執行結果都是功能不正常」，而且我自己也沒有在使用自己寫的APP，完全沒發現服務掛掉10天不能運作。</p>



<p>結果神奇的事情居然發生了，3月3日起廣告收入居然增加，因為中斷服務的關係，客人開啟APP後，停留在APP裡的時間變長，我此時深深的體會到：</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>做人要多積點陰德，這些額外的收入應該都是燃燒陰德換來的。</p></blockquote>



<hr class="wp-block-separator"/>



<p>3月13日解決完問題時，我有想一些解法來預防未來再發生類似的問題，例如：</p>



<ul class="wp-block-list"><li>測試驅動開發（Test-Driven Development，簡稱TDD）是一種程式開發的技巧，簡單來說就是先寫測試程式，然後才實作功能。</li><li>alarm機制，要寫程式定時排程去監督每個環節的產出，遇到異常時，要主動寄送Email通知。</li></ul>



<p>3月13日解決完SSL的錯誤後，已事隔 1個月又14天，在目前服務正常的情況下，去寫自動測試的程式，實在無關痛癢，因此一直遲遲尚未動工。</p>



<p>追劇的人生，每天的時間都過的好快，沒做什麼又過了一天。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://max-everyday.com/2019/04/yinde/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Max的KKTIX搶上車機器人</title>
		<link>https://max-everyday.com/2018/12/kktix-bot/</link>
					<comments>https://max-everyday.com/2018/12/kktix-bot/#comments</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Tue, 11 Dec 2018 15:11:36 +0000</pubDate>
				<category><![CDATA[電腦相關應用]]></category>
		<category><![CDATA[macOS]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[免費]]></category>
		<guid isPermaLink="false">http://max-everyday.com/?p=6799</guid>

					<description><![CDATA[目前搶票機制，就是在比誰的網路快、電腦配備好、手速快，或是在比誰的機器人跑的快。期待未來熱門演唱會可以使用「實名制」+「抽籤制」，來讓更多民眾可以公平地購買到門票。 目前 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>目前搶票機制，就是在比誰的網路快、電腦配備好、手速快，或是在比誰的機器人跑的快。期待未來熱門演唱會可以使用「實名制」+「抽籤制」，來讓更多民眾可以公平地購買到門票。</p>



<p>目前MaxBot 改名為：Max蛋黃酥上車機器人。</p>



<p>台灣藝文活動的文創法第十條中的「不正方式」由於沒有明確定義，代表的是所有軟體都涉嫌違反。故在此呼籲大家，勿以身試法。</p>



<p>作者沒有意圖要他人購得的票券進行加價轉售或是使用在違法的事情上，他人的行為並不在作者的意識支配範圍之內，作者不對他人的相關的非法行為負責。</p>



<p>使用此儲存庫或與之相關的任何程式碼，即表示您同意<a href="https://github.com/max32002/tixcraft_bot/blob/master/LEGAL_NOTICE.md">法律聲明</a>。作者不對該儲存庫的使用負責與背書，也不對其他使用者所做的任何副本、分叉、重新上傳或與 MaxBot 相關的任何其他內容負責。 這是作者唯一的帳戶和儲存庫。 為了防止假冒或不負責任的行為，請遵守此儲存庫使用的 GNU GPL 授權。</p>



<ul class="wp-block-list">
<li>Max搶票程式免費下載。</li>



<li>使用機器人搶票有被官方鎖帳號的風險，請評估後再進行使用，後果請自行承擔。</li>



<li>以下文章出現的「搶票」指的是「非台灣的藝文活動或車票」。</li>
</ul>



<p>聲明：</p>



<ul class="wp-block-list">
<li>Max的拓元蛋黃酥機器人聲明<br><a href="https://max-everyday.com/2024/04/maxbot-20240418/">https://max-everyday.com/2024/04/maxbot-20240418/</a></li>



<li>Max「偽造身份證字號」後續處理及「沒有收費搶票」聲明<br><a href="https://max-everyday.com/2024/04/max-fake-id/">https://max-everyday.com/2024/04/max-fake-id/</a></li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">文章索引：</h2>



<ul style="background-color:#ffee99" class="wp-block-list round_corner has-background">
<li><a href="https://max-everyday.com/2018/12/kktix-bot/#product">軟體特色</a></li>



<li><a href="https://max-everyday.com/2018/12/kktix-bot/#download">檔案下載</a></li>



<li><a href="https://max-everyday.com/2018/12/kktix-bot/#feature">主要功能</a></li>



<li><a href="https://max-everyday.com/2018/12/kktix-bot/#recaptcha">目前無解的 reCaptcha</a></li>



<li><a href="#why">售票系統架構猜測與搶票建議</a></li>



<li><a href="#headless">KKTIX 無視窗搶票</a></li>



<li><a href="#status">KKTIX 的什麼售票狀態才可以刷清票</a></li>



<li><a href="#finding">KKTIX帳號購票時異常</a></li>



<li><a href="#ban">如何避免帳號被鎖</a></li>



<li><a href="https://max-everyday.com/2018/12/kktix-bot/#suggestion">搶票建議</a></li>



<li><a href="https://max-everyday.com/2018/12/kktix-bot/#usage">使用方法</a></li>



<li><a href="https://max-everyday.com/2018/12/kktix-bot/#config">參數設定說明</a></li>



<li><a href="https://max-everyday.com/2018/12/kktix-bot/#config_ex">設定值舉例說明</a></li>



<li><a href="https://max-everyday.com/2018/12/kktix-bot/#qa">Q&amp;A 常見問題</a></li>
</ul>



<a name="product"></a>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading">軟體特色：</h2>



<ul class="wp-block-list">
<li><strong>急速搶票</strong><br>優化購票流程。</li>



<li><strong>自動填寫</strong><br>搶票不再手忙腳亂心慌慌。</li>



<li><strong>合法購票</strong><br>本系統僅代為填寫購票資訊，無任何入侵、取得、刪除或變更售票系統其電磁紀錄。</li>



<li><strong>多系統支援</strong><br>支援 Windows 和（Mac, Linux 請直接執行原始碼）</li>



<li><strong>無時間或次數限制</strong><br>如果官方網站沒有改版，可以在多台電腦且無使用時間或次數限制。</li>



<li><strong>無病毒/惡意/間碟程式</strong><br>開放主程式的原始碼，雖然原始碼的檔案可以執行，但需要在<a href="https://stackoverflow.max-everyday.com/2018/03/selenium-chrome-webdriver/">相依元件</a>都安裝的環境下，建議下載執行檔，會簡單很多。</li>
</ul>



<a name="download"></a>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading">檔案下載：</h2>



<p><strong>Windows 的執行檔下載：</strong><br>(沒有下載點)</p>



<p><strong>.zip 壓縮檔案說明：</strong></p>



<ol class="wp-block-list">
<li>chrome_tixcraft_xxoo.zip<br>
<ul class="wp-block-list">
<li><strong>適用於：</strong>Windows&nbsp;平台。</li>



<li><strong>執行方式：</strong>執行 settings.exe 應用程式。</li>



<li><strong>附註：</strong>請在 zip 檔按右鍵，選「解壓縮全部&#8230;」完整地解壓縮zip檔案，而不是直接點2下的開啟zip 檔。<br></li>
</ul>
</li>
</ol>



<p>透過原始碼在macOS 上執行MaxBot, 教學影片： <a href="https://youtu.be/HpVG91j0lbI">https://youtu.be/HpVG91j0lbI</a></p>



<p>新的 Arm 架構CPU (M1/M2) 的 Mac 電腦，需要參考這篇作法，模擬執行環境為 INTEL CPU:<br><a href="https://github.com/max32002/tixcraft_bot/issues/82">https://github.com/max32002/tixcraft_bot/issues/82</a></p>



<p>以Linux 虛擬主機來示範搶票：<br><a href="https://max-everyday.com/2023/11/buy-ticket-by-vm">https://max-everyday.com/2023/11/buy-ticket-by-vm</a><br>附註：在 Windows / macOS / Linux 平台裡的 python 操作方式幾乎相同。</p>



<p>下載檔案前，建議將你的 chrome 瀏覽器升級到最新的版本。更新chrome瀏覽器的方式是：「設定」-&gt;「關於Chrome」，這時候，通常就會自動更新chrome 瀏覽器為新的版本。</p>



<p>目前的搶票機器人<strong>不需要</strong>另外再下載「瀏覽器元件」(ChromeDriver)，除非是發生特例的異常情況，才需要人工手動去下載 ChromeDriver。手動下載請參考:<br><a href="https://max-everyday.com/2023/11/maxbot-troubleshooting/#chromedriver">https://max-everyday.com/2023/11/maxbot-troubleshooting/#chromedriver</a></p>



<p><strong>附註：</strong></p>



<ul class="wp-block-list">
<li>KKTIX／拓元／ibon &#8230; 售票的網站所用的機器人是同一個程式。</li>



<li>目前搶票程式沒有寫的很好，執行時有錯誤或臭蟲（Bug）是正常的，如果遇到程式掛掉，請提供黑色視窗裡的除錯用訊息給Max，這樣才有辦法得程式掛掉的原因，才能有效率地除錯。</li>



<li>每次按「搶票」按鈕後，所開出新的 chrome 瀏覽器是全新的未登入狀態，所以在每個開出的視窗都需要在搶票前先登入你的售票系統的會員帳號。</li>



<li>實際搶票前10分鐘（如果時間允許），請使用其他已經開賣中的活動測試功能是否正常：建議，先去購買其他已開放活動購票，並取消該購票，再回到倒數中搶票的活動頁面，這樣做可以先快取後面購買網頁所使用的外部資源，有助於搶票。這一點，沒去做也沒差。</li>



<li>實際搶票前10分鐘（如果時間允許），建議<strong>「重開機」</strong>一次（這一點，沒去做也沒差），重開機完成後，建議關閉沒在使用的應用程式，只運行搶票程式，這樣子可以讓電腦發揮較好的效能。</li>



<li>目前搶票程式在設計上的架構不是很好，長時間執行，程式可能會異常中止。</li>
</ul>



<p><strong>檔案說明：</strong></p>



<ul class="wp-block-list">
<li><strong>chrome_tixcraft</strong>.py : 搶票機器人主程式, 用來自動化網頁的操作。</li>



<li><strong>config_launcher</strong>.py : 設定檔管理, 方便對多個設定檔案搶票。</li>



<li><strong>settings</strong>.py : 編輯 settings.json 的 GUI 介面。提供圖片OCR功能給chrome擴充功能。支援定時啟用/停用MaxBot。</li>
</ul>



<a name="feature"></a>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading">主要功能：</h2>



<ul class="wp-block-list">
<li>1：依照「票價」自動輸入想要的票「張數」，票價和張數可以參數調整。</li>



<li>2：自動打勾「我已經閱讀並同意 授權條款 與 隱私權政策」。</li>



<li>3：自動點選「下一步」，要不要自動點也可以參數調整。</li>
</ul>



<a name="suggestion"></a>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading">搶票建議：</h2>



<ul class="wp-block-list">
<li>請先「手動」用滑鼠點選自己要買票的活動。</li>



<li>請先登入購票系統的會員，以加速購票流程。展示影片目的是在示範不使用滑鼠的情況下透過機器人選取想購買的日期、票價和張數。</li>



<li>門票的「限量」是很殘酷的，建議不要用破舊的電腦或連線不穩的手機網路來搶票，因為只要比別人慢個 0.1 秒，票可能就沒了。為了要搶到限量的票建議去網咖或找一個網路連線穩定且快的地方並使用硬體不差的電腦來搶票。如果在使用網咖或別人的別人的電腦，請先確定已經安裝了chrome瀏覽器並更新到最新版本。</li>



<li>搶票機器人可能會因為搶票系統繁忙而比手動的慢，請勿過份依賴搶票機器人，在第一時間還是可能會需要使用滑鼠手動去點。</li>



<li>搶票程式可能會執行到一半就掛掉，建議實際在搶票時，請開啟出2個瀏覽器，一個是透過搶票機器人。另一個是傳統無外掛手動去搶票，因為如果遇到「搶票的程式掛了」、「官方網站影示錯誤訊息是無連續坐位」或「官方網站改版」，還可以搶看看第二輪或清票。</li>
</ul>



<h2 class="wp-block-heading" id="recaptcha">目前無解的 reCaptcha</h2>



<p>KKtix 有分2種的場次：「有reCaptcha符號」(無緣)和「無reCaptcha符號」(有緣)二種，參考下圖。</p>



<p>無緣的場次，還沒有試出解決的方法，建議不要用MaxBot搶票程式在無緣(有reCaptcha符號)的場次上。這當然也是有例外，如果遇到國際級的巨星，或預計超過20萬人次以上同時搶票的活動，即使有 reCaptcha 符號也是可以去搶, 因為有很高的機率, reCaptcha 不會彈出來。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="764" height="1024" src="https://max-everyday.com/wp-content/uploads/2019/12/Screen-Shot-2019-12-15-at-01.38.35-compare-764x1024.jpg?v=1576349660" alt="" class="wp-image-9789" srcset="https://max-everyday.com/wp-content/uploads/2019/12/Screen-Shot-2019-12-15-at-01.38.35-compare-764x1024.jpg?v=1576349660 764w, https://max-everyday.com/wp-content/uploads/2019/12/Screen-Shot-2019-12-15-at-01.38.35-compare-373x500.jpg?v=1576349660 373w, https://max-everyday.com/wp-content/uploads/2019/12/Screen-Shot-2019-12-15-at-01.38.35-compare.jpg?v=1576349660 1064w" sizes="auto, (max-width: 764px) 100vw, 764px" /></figure>



<p>建議您手動搶票用的IP與電腦, 要跟有使用機器人搶票的IP與電腦, 使用不同台電腦與不同的IP, 避免實際在手動搶票時, 彈出圖片驗證。</p>



<p>KKTIX 有 reCaptcha 圖示的場次, 可能需要手動搶票….。reCaptcha 會彈出圖片驗證，使用機器人搶票反而會變更慢。</p>



<p>可以透過「人海戰術」來提升買到票的機率，因此建議大家可以麻煩親朋好友去註冊售票系統的帳號。注意，在借用他人帳號前，一定要告知用途當事人，並徵詢同意與授權。</p>



<p>前幾次在kktix的大型活動，大部份的人說沒彈 reCaptcha, 小部份的人反應會彈出。建議您可以創多個帳號來搶票，依照您對風險承受度來決定那些帳號使用機器人搶，那些帳號手動搶。</p>



<p>KKTIX 有 reCaptcha 圖示的場次，平時的搶票前就不用去測試了，因為是離峰時間，怎麼測試 reCaptcha 都不會掛掉，而且去測試會讓連線的 IP 被伺服器判定為高機率被汙染的IP。</p>



<p>當IP或帳號被 reCaptcha 伺服器判定為汙染的IP或帳號時，會造成使用正常的瀏覽器也會固定彈出圖片驗證。</p>



<p><strong>Q：如果搶票系統有recaptcha，使用搶票機器人來購票會比較快嗎？</strong><br>A：這個問題取決於搶票的人有多少，數量大於 reCaptcha 瞬間的支援上限，就相當於沒有 reCaptcha，當然用搶票機器人快。相反的，搶票的人不多時，一定是用手動來搶比較快。</p>



<p><strong>Ｑ：那如果到時候跳出recaptcha也可以手動進去嗎？</strong><br>Ａ：您只有一雙眼，因為KKTIX也可能會出驗證問題，最好是可以有二台電腦一台純手工搶票，一台就用機器人搶。</p>



<p>如果您有多個帳號，依照您對風險承受度來決定那些帳號使用機器人搶，那些帳號手動搶。</p>



<p>如果您使用虛擬主機來搶票，請搶票先試買看看已開賣的場次，看看虛擬主機的IP是否有被售票網站阻擋。</p>



<p><strong>Q：KKTIX 按了程式搶票後 自動輸入完帳密後 他就卡在選日期不動了。</strong><br>A：KKTIX 目前沒有支援日期自動選擇，請把搶票最後的網址，貼在搶票程式的網址裡。</p>



<p><strong>Q：請問KKTIX售票的場次有兩天，要怎麼讓機器人自己操作？</strong><br>A：雙開視窗。</p>



<p><strong>Q：我還需要架虛擬主機才能實現多開帳號嗎？</strong><br>A：虛擬主機就是一台電腦，一般電腦也可以帳號多開。</p>



<p><strong>Q：想請問遇到圖片驗證的話，還是得手動點選對嗎？</strong><br>A：門票會秒殺的場次，在搶票時遇到彈出圖片驗證，應該就跟門票無緣了。這時候可以選擇關閉瀏覽器去做其他事，或流著眼淚慢慢找圖片驗證裡的項目。</p>



<p><strong>Q：搶票的網頁出現無法連線到reCAPTCHA是什麼原因呢? 長達兩三分鐘。</strong><br>A：reCAPTCHA的保護服務有瞬間的連線數上限，超過之後會出現錯誤訊息，或是可以進入沒有 reCAPTCHA保護(阻斷服務)的狀態, 就可以正常地使用搶票機器人。</p>



<p>下圖觸發：無法連至 reCAPTCHA 服務。請檢查你的網際網路連線，並重新載入頁面以取得 reCAPTCHA 驗證問題。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="719" height="346" src="https://max-everyday.com/wp-content/uploads/2024/03/51805.jpg?v=1709775192" alt="" class="wp-image-19926" srcset="https://max-everyday.com/wp-content/uploads/2024/03/51805.jpg?v=1709775192 719w, https://max-everyday.com/wp-content/uploads/2024/03/51805-500x241.jpg?v=1709775192 500w, https://max-everyday.com/wp-content/uploads/2024/03/51805-615x296.jpg?v=1709775192 615w" sizes="auto, (max-width: 719px) 100vw, 719px" /></figure>



<p>目前網路連線的機制之下，所有的網路服務都有瞬間的服務數上限，面對70萬人次瞬間的高連線數需求，KKTIX可以事先加開網頁伺服器來因應。但kktix 無法調整reCaptcha 瞬間的服務數上限。</p>



<p>也許可以使用的解法：</p>



<ul class="wp-block-list">
<li>使用手機熱點分享網路，讓電腦切換為行動網路。</li>



<li>使用proxy 或 vpn 切換 IP.</li>



<li>使用虛擬主機來搶票。</li>
</ul>



<p>實際測試了幾場活動，發現reCAPTCHA事實上可以支援不同的網頁而且分開的情況正常的運作，但目前的reCAPTCHA遇到同一個網址，無法在瞬間支援高的連線數。</p>



<p>搶票的網頁出現「無法連線至 reCAPTCHA服務」、「卡在查詢空位中」的解法只有創新帳號來解決，售票用的網頁伺服器也有單一伺服器連線上限的問題，所以售票系統會加開更多的伺服器來因該大量的連線需求，而用來疏散流量的技術叫負載平衡，萬一你的搶票需求被分配到一個忙錄的節點，你搶到票的機率就會大大降低，反之，你運氣好分配到人少的節點，也許因此增加搶到票的機率。</p>



<p>另外一個避卡 reCAPTCHA 造成問題的解法, 是延後1秒才開始搶票，可以在某一隻的分身使用的電腦，設定開始搶票時間為實際搶票時間, 例如: 13:00:00 開始搶, 就設成 13:00:00, 雖然慢了一秒才去搶，但是被 reCAPTCHA 擋的機率相對會低一點。</p>



<p>針對「第一波進去的轉圈轉到顯示沒票，慢慢進去的可能反而有票」，最佳解法就是狂創帳號，部份帳號第一波進去，部份帳號，整點之後再開始刷票。</p>



<p>設定開始搶票時間範例影片: <a href="https://youtu.be/eETZTajxBnY">https://youtu.be/eETZTajxBnY</a></p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">reCAPTCHA 活動搶票心得</h2>



<ul class="wp-block-list">
<li>建議畫面查詢坐位按鈕卡住太久（約10秒），需要手動F5重整頁面。</li>



<li>已無坐位的無限狂跳對話框，是因為用戶端的網頁是舊版坐位清單，搶票程式有幫我們按送出按鈕，伺服器立刻回傳已無坐位，就產生無限循環。解法：重新整理網頁就可以更新可買的坐位清單。使用手動搶票，也是一樣會遇到這個鬼打牆情況。</li>
</ul>



<p><strong>Q：KKTIX雖然有自動點擊下一步，但卡在尋找座位，畫面沒有自動刷新的問題，想請問原因為何？以及如何解決？</strong><br>A：（個人猜測）原因為存放座位資料庫同時太多人在排隊等候，部份要進行排隊的人已拿不到等候範圍內的號碼牌，同時再加上網頁伺服器上的程式缺少重送的機制，最後在你的畫面上看起來就是卡住。</p>



<p></p>



<p><strong>Q：我發現不能辦兩個帳號欸要驗證手機</strong><img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f97a.png" alt="🥺" class="wp-smiley" style="height: 1em; max-height: 1em;" /><br>A：跟長輩借簡訊的驗證, 沒有長輩就找邊緣人。也可以去申辦 0月租費的門號。</p>



<p>在借用別人的簡訊驗證或借用帳號前, 請先徵詢當事人同意, 並告知用途。</p>



<p><strong>Q：為什麼不使用Buster 擴充功能來解決 reCAPTCHA?</strong></p>



<p>A：2023年的某些版本號碼裡有預設加入 Buster, 使用 Buster 有好處, 也有缺點, 我個人的猜測缺點大於優點, 所以暫時拿掉了, 缺點有：</p>



<ol class="wp-block-list">
<li>容易讓用戶端的IP/帳號被 reCAPTCHA 判斷為已污染, 進而觸發 reCAPTCHA.</li>



<li>搶票時, 彈出的 reCAPTCHA 遇到同時被大量用戶呼叫時, 一樣無效, 只能慢慢選答案。</li>
</ol>



<p>最後, 由於需要搶票程式的大型活動, reCAPTCHA 經常性失效, 聽說單一網頁在短時間內的存取額度是6萬次, 以 60萬人次搶票, 有 54萬人不會遇到, 而且 reCAPTCHA 掛掉之後，就會變成60萬人次都可以正常在沒有 reCAPTCHA 情況下購買票券, 所以不需要使用到 Buster.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading" id="why">售票系統架構猜測與搶票建議</h2>



<p>影片: <a href="https://youtu.be/alpy9HX6aRw">https://youtu.be/alpy9HX6aRw</a></p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<div class="gutenbee-responsive-embed"><iframe loading="lazy" title="MaxBot 售票系統架構猜測與搶票建議" width="885" height="498" src="https://www.youtube.com/embed/alpy9HX6aRw?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe></div>
</div></figure>



<p>希望未來熱門場次的票券可以改成抽籤制。<br>比較拓元與KKTIX轉圈圈的實作方法不同。</p>



<ul class="wp-block-list">
<li>同一帳號多開有被鎖帳號的風險。</li>



<li>建議多帳號開在多台電腦，以便在IP hash的負荷平衡時可以分配到不同的節點。</li>



<li>建議畫面查詢座位按鈕卡住太久（約10秒），需要手動F5重整頁面。</li>
</ul>



<p><strong>Q：想問一下kktix帳號多開不使用虛擬主機是可以的嗎？</strong><br>A：虛擬主機和一般電腦差不多。主要差在虛擬主機租用費用比較便宜，還有網路會較快，缺點是入門需要會一些簡單的指令。</p>



<p><strong>Q：使用同一台電腦多開會有不妥嗎? 比如IP一樣之類的。</strong><br>A：使用不同IP才能更有效地送出需求給更多負載平衡的節點，有效地降低卡住的機率。<br>如果在拓元售票系統在短時間內, 同一個IP 大量連線, 會顯示 403 錯誤, IP 會被擋。</p>



<p><strong>Q：機器人在KKTIX搶到，遇到按「下一步」停住是什麼原因？</strong><br>A：由於同一個座位不能賣給多個人，同一時間大家去搶票前都是看到同空位，按下送出時只有一個人會成功，其他排隊在後面的都會成失敗，理論上網頁伺服器會在幫忙送新查詢之後，在新的資料庫伺服器上排隊要求，網頁轉圈圈停很久可能是還在重試中。</p>



<p></p>



<p><strong>Q：為什麼我太太搶到8張(他就一個帳號+一台破電腦)？</strong><br>A：<a href="https://youtu.be/d3JxIk4hLsw">https://youtu.be/d3JxIk4hLsw</a></p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<div class="gutenbee-responsive-embed"><iframe loading="lazy" title="2024-03-31 為什麼我太太搶到8張(他就一個帳號+一台破電腦)？" width="885" height="498" src="https://www.youtube.com/embed/d3JxIk4hLsw?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>
</div></figure>



<p></p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading" id="headless">KKTIX 無視窗搶票</h2>



<p>搶票過程是無視窗, 搶到票之後, 會自動開出視窗方便填寫資料。</p>



<ul class="wp-block-list">
<li>如果遇到的售票活動不需要填寫個人基本資料，請在其他瀏覽器登入帳號後，可以在訂單裡看到該筆記錄。</li>



<li>由於程式沒寫好, 建議使用無視窗模式前, 還有使用後, 記得重開電腦, 因為會有神奇的chrome瀏覽器在電腦記憶體中, 由於沒有視窗也無法關閉。如果你會使用工作管理員的話, 也可以關的到程式, 不需重新開機。</li>
</ul>



<p>我實際測試, 購票結帳畫面有分2種,</p>



<ul class="wp-block-list">
<li>情況1: 不需額外輸入資料.</li>



<li>情況2: 需要額外輸入基本資料,</li>
</ul>



<p>現在無視窗模式在確定有票之後, 固定會開啟新視窗提供輸入資料的介面, 遇到情況1的話, 是會多開出一個視窗, 而且有登入帳號。</p>



<p><strong>Q：使用無視窗搶票時，該如何知道是用哪一個帳號做搶票呢?</strong><br>A：搶票成功, 會顯示在黑黑視窗, 而且也會使用買到票的帳號開出新的可以輸入資料的視窗。</p>



<p><strong>Q：多開但很容易三個網頁都癱瘓最終誰也搶不到?</strong><br>A：每個人使用中的電腦規格不同, 用古董電腦是會遇到你說的情況, 只能認了. 如果要多開, 請視配備來決定要按幾下搶票按鈕。</p>



<p>怕被發現上班中在搶票，可以勾選無視窗模式。</p>



<p>掛2場的話，要分別按「搶票」一次，才會套用到不同設定值。</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading" id="status">KKTIX 的什麼售票狀態才可以刷清票</h2>



<p>每一場次的KKTIX活動狀態在 register_info 的網址裡, 想知道狀態內容, 可以按F12 叫出瀏覽器 DevTools, 在 Network 分頁就可以看到伺服器的回傳值。</p>



<p>KKTIX的2個沒有票的狀態, OUT_OF_STOCK / SOLD_OUT, 可以確定的是看到橘底的畫面(There&#8217;s no ticket available), 還可以挑戰刷票看看, 可能還有票被清出。</p>



<p>SOLD_OUT 可不可以去刷清票, 這個答案需要去問KKTIX官方。</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">機台購票與機器人搶票的選擇</h2>



<p><strong>Q：購票該選擇去機台, 還是透過電腦？</strong><br>Ａ：用 reCAPTCHA 場次目前無解。</p>



<p>如果要在電腦上搶，你可以先在電腦裡安裝不常用的瀏覽器，並在瀏覽器裡登入你的 KKTIX 帳號，在非搶票機器人情況下，試著購買看看其他場有 reCAPTCHA 保護的場次, 如果你的電腦環境(IP + 帳號) 「會」彈出圖片驗證，而這場活動不是「超級多人」去搶的場次，建議去機台購票搶到票的機率會較高。</p>



<p>如果是「超級多人」去搶的場次，可以多開帳號與電腦來搶票，增加中獎機率。</p>



<p>搶的人較少的場次，以場地在北流來說，坐席數目在3100~5000個，再加上聽的懂客語歌的人較少，在售票網頁有 reCAPTCHA 保護情況下,  使用機器人搶票幾乎都會彈圖片驗證, 因此在超商機台上搶, 搶到的機率比較高。</p>



<p><strong>Q：reCAPTCHA驗證過後不是會有一段時間的空窗期免驗證嗎？</strong><br>A：在 KKTIX 的 reCAPTCHA, 每一個活動網頁, 驗證過活動1, 切到活動2, 需要重新驗證一次, 而且驗證過的活動1, 在短時間內不需要重覆驗證, 但也有逾期時間, 可能是10分鐘, 確切多久逾期沒有實際去驗證。</p>



<p><strong>Q：每次都彈reCAPTCHA圖片驗證，代表我的IP位址被汙染的機率很高了？</strong><br>A：你去借帳號, 登登看, 也許是帳號被 reCAPTCHA 拉黑。</p>



<p>如果連用手機裡的瀏覽器在KKTIX, 也固定彈出 reCAPTCHA, 應該是KKTIX帳號被reCAPTCHA拉黑了。</p>



<p><strong>Q：如果帳號被拉黑了, 帳號是不是不能變回正常呢？</strong><br>A：創新的帳號就會變正常。如果帳號還可以購票的話, 其實沒差, 因為大型活動, 目前的 reCAPTCHA 常常會壞掉。</p>



<p>透過「人海戰術」來提升買到票的機率，因此建議大家可以麻煩親朋好友去註冊售票系統的帳號。注意，在借用他人帳號前，一定要告知用途當事人，並徵詢同意與授權。</p>



<p></p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading" id="finding">KKTIX帳號購票時異常</h2>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="960" height="746" src="https://max-everyday.com/wp-content/uploads/2024/04/434939272_929944702256290_7573479973124399150_n.jpg?v=1712114939" alt="" class="wp-image-20159" srcset="https://max-everyday.com/wp-content/uploads/2024/04/434939272_929944702256290_7573479973124399150_n.jpg?v=1712114939 960w, https://max-everyday.com/wp-content/uploads/2024/04/434939272_929944702256290_7573479973124399150_n-500x389.jpg?v=1712114939 500w, https://max-everyday.com/wp-content/uploads/2024/04/434939272_929944702256290_7573479973124399150_n-615x478.jpg?v=1712114939 615w" sizes="auto, (max-width: 960px) 100vw, 960px" /></figure></div>


<p>如果你的kktix 帳號在正常瀏覽器登入的情況下，購買其他已開賣場次，卻轉圈圈超久，卡在「查詢空位中，請勿重新讀取或關閉此頁」。</p>



<p>正常帳號, 應該不會超過3秒, 如果你都連到 30秒以上, 就是帳號有出問題.</p>



<ul class="wp-block-list">
<li><strong>解法1：</strong><br>先跟朋友借手機門號的簡訊認證，24小時內，先切換為其他門號，等過24小時候再簡訊認證一次，切回原本門號，一按下簡訊認證，帳號可能就會變正常，且立即可以刷票。</li>



<li><strong>解法2：</strong><br>在kktix 選擇刪除帳號並註冊新帳號，手機門號可以拿到新帳號使用，缺點是，24小時內無法購票，舊email 和帳號名稱無法再使用。</li>



<li><strong>解法3：</strong><br>回報給 KKTIX 客服, 問看看為什麼會卡住。有網友回報：請KKTIX幫忙重置帳號之後，就好了。</li>
</ul>



<p></p>



<p><strong>Q：這是帳號被鎖帳了嗎？</strong><br>Ａ：我不是KKTIX工程師，猜測可能是「相同一帳號活動購票上限最多4張」的檢查功能出問題。(純臆測)</p>



<p></p>



<p>客服的「提交請求」傳送門：<br><a href="https://support.kktix.com/hc/zh-tw/requests/new">https://support.kktix.com/hc/zh-tw/requests/new</a></p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading" id="ban">如何避免帳號被鎖</h2>



<p>網友傳來帳號被 KKTIX鎖的截圖，對應到中文版的訊息：</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>您的帳號已被鎖定。</p>
</blockquote>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="960" height="570" src="https://max-everyday.com/wp-content/uploads/2024/04/434963947_932826461968114_7652957467151314994_n.jpg?v=1712551647" alt="" class="wp-image-20181" srcset="https://max-everyday.com/wp-content/uploads/2024/04/434963947_932826461968114_7652957467151314994_n.jpg?v=1712551647 960w, https://max-everyday.com/wp-content/uploads/2024/04/434963947_932826461968114_7652957467151314994_n-500x297.jpg?v=1712551647 500w, https://max-everyday.com/wp-content/uploads/2024/04/434963947_932826461968114_7652957467151314994_n-615x365.jpg?v=1712551647 615w" sizes="auto, (max-width: 960px) 100vw, 960px" /></figure>



<p>由於之前 MaxBot 刷 KKTIX 網站效率太好, 會被檢測為機器人, 。</p>



<p>Maxbot 在2024-03-28版之後，預設不使用「KKTIX狀態API」, 理論上可降低帳號被鎖的機率。</p>



<p>請減少使用(非搶票程式的)同一個瀏覽器，登入多個帳號。有必要在同一個電腦登入的話,</p>



<ul class="wp-block-list">
<li>解法1: 請安裝多款不同廠牌瀏覽器,</li>



<li>解法2: 登出KKTIX帳號之後, Windows 平台按 Ctrk + Shift + Del, macOS 平台請按 Cmd + Shift + Del, 把瀏覽器快取 cookie 清除之後, 再登入其他帳號。<br></li>
</ul>



<p>請避免使用同一個IP，登入太多不同帳號。</p>



<p>非人為的操作，容易被判定為機器人，就容易被官方鎖帳號，這是一個2難的問題，因為刷的慢，門票會被別人買走，刷的快，會被系統判定為機器人，這個問題無解，只能在被鎖帳號後，想辦法創新帳號。</p>



<p>長時間刷清票，建議開小號來刷，並建議微微地拉大延遲間隔。</p>



<p>刷票延遲時間, 建議使用 1.0秒以上,人類肉眼的處理速度差不多是這個數字。</p>



<p>搶開賣，請先設定MaxBot 為暫停搶票狀態，設定「接續關鍵字」為開賣的前5~10秒，並按下「存檔」，減少程式在網頁伺服器重刷次數。</p>



<p>相關影片: KKTIX 定時啟動+帳號多開<br><a href="https://youtu.be/eETZTajxBnY">https://youtu.be/eETZTajxBnY</a></p>



<p>不建議同一個帳號多開，開愈多，會愈像機器人。</p>



<p>最好多創一些帳號，每個帳號都單開。</p>



<p>在創立新的KKTIX帳號時，要用不同IP 去創，可以借朋友的手機網路來創帳號，或暫時VPN 到不同的IP, 或用洋蔥瀏覽器，同一個IP創出的帳號會一起被鎖。</p>



<p>取票聯絡人與電話，建議填寫真實資料，因為只要是領到實體票就可以追的到人，不必填寫假資料。</p>



<p>透過「人海戰術」來提升買到票的機率，因此建議大家可以麻煩親朋好友去註冊售票系統的帳號。注意，在借用他人帳號前，一定要告知當事人用途，並徵詢同意與授權。</p>



<a name="usage"></a>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading">使用方法：</h2>



<p>1：請先確定電腦裡有安裝 chrome 瀏覽器。<br>2：請先確認您的 chrome 有更新或降低到到目前程式可以支援的指定版本。<br>附註：如果搶票機器人的自動化的腳本已經可以執行，請不要隨意升級chrome瀏覽器的版本，要升級chrome瀏覽器之前，請先檢查看看沒有和您你chrome瀏覽器相符的自動化的腳本可以下載，如果沒有的話，請再手動安裝指定版本的chrome瀏覽器。</p>



<p>太舊的 chrome 執行起來會有問題，請先更新chrome瀏覽器為最近的版本，更新方式為：「設定」-&gt;「關於Chrome」。</p>



<figure class="wp-block-image"><img decoding="async" src="http://stackoverflow.max-everyday.com/wp-content/uploads/2018/03/Screenshot-2018-11-09-16.55.07.jpg" alt="" class="wp-image-2470"/></figure>



<p><br>3：Windows用戶請先對zip檔進行「解壓縮」的動作，不能直接開啟壓縮檔，在預覽壓縮檔的環境下執行。MacOS用戶，點2下zip檔就可以取得MaxBot 的 app，點2下即可執行。<br>4：Windows用戶請執行「settings.exe」，進行設定後，再按 Run 開出一個搶票用的chrome 瀏覽器。</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1024" height="692" src="https://max-everyday.com/wp-content/uploads/2019/04/Screen-Shot-2019-04-14-at-03.27.43-1024x692.jpg" alt="" class="wp-image-7693" srcset="https://max-everyday.com/wp-content/uploads/2019/04/Screen-Shot-2019-04-14-at-03.27.43.jpg 1024w, https://max-everyday.com/wp-content/uploads/2019/04/Screen-Shot-2019-04-14-at-03.27.43-500x338.jpg 500w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Windows用戶在解壓縮後，要找的檔案名稱是「settings.exe」 不是「<strong>.</strong>settings.exe」</figcaption></figure>



<p>macOS 的用戶請改點2下 MaxBot app .</p>



<a name="config"></a>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading">參數設定說明：</h2>



<p>Window 版可以執行 settings.exe 來修改設定檔，macOS 是執行 MaxBot。</p>



<p>執行畫面如下：</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="482" height="577" src="https://max-everyday.com/wp-content/uploads/2018/12/2023-05-24-14_01_56-MaxBot-2023.05.22.jpg" alt="" class="wp-image-17921" srcset="https://max-everyday.com/wp-content/uploads/2018/12/2023-05-24-14_01_56-MaxBot-2023.05.22.jpg?v=1684908208 482w, https://max-everyday.com/wp-content/uploads/2018/12/2023-05-24-14_01_56-MaxBot-2023.05.22-418x500.jpg?v=1684908208 418w" sizes="auto, (max-width: 482px) 100vw, 482px" /></figure></div>


<p><strong>按鈕說明：</strong></p>



<ul class="wp-block-list">
<li>1：&nbsp;「Run」 的按鈕，按下後 就會去&#8221;存檔&#8221; 和 &#8220;執行&#8221; chrome_tixcraft.exe。每按一次 Run 都會開出一個獨立記憶體空間的chrome 瀏覽器。請記得在搶票前先登入好會員帳號，部份太熱門的活動，會因為太熱門而在開搶後無法登入會員。</li>



<li>2：「Save」按鈕，會把設定值存檔。</li>



<li>3：「?」按鈕，連到使用教學網頁。</li>



<li>4：「Exit」按鈕，離開。</li>
</ul>



<p><strong>參數說明：</strong></p>



<ul class="wp-block-list">
<li>“<strong>Homepage</strong>”: 設定機器人一開始開出那一個網址。</li>



<li>“<strong>Browser</strong>”: 設定機器人用那一個瀏覽器，目前支援 “firefox” 和 “chrome”</li>



<li>“<strong>Ticket Number</strong>”: 設定票數</li>



<li><strong>&#8220;Auto Press Next Step Button&#8221;</strong>: 設定要不要自動點選「下一步」。<br>要啟用這個功能請修改打勾。<br>當設定為啟用自動點選「下一步」，但如果該場次有彈出「驗證問題」，這一個設定值將會不被採用，因為沒回答問題也沒辦法點下一步。</li>



<li>&#8220;<strong>Auto fill ticket number</strong>&#8220;: 設定自動輸入想要的票「張數」。要停用這個功能請取消勾選。</li>



<li>“<strong>Area&nbsp;select&nbsp;order</strong>“: 自動點選的排序方式，”from_top_to_down” 是由上往下找，大多數的場次由上向下找等於先選貴的票價，”from_down_to_top” 是由下往上找，大多數的場次由下向上找等於先選便宜的票。”Random”是隨機挑一筆，是先用「關鍵字」裡過濾出符合資格的超連結，再從中隨機挑一個。如果都沒有關鍵字，就是全部超連結裡挑一個。</li>



<li>“<strong>Area Keyword</strong>”: 區域的關鍵字。如果使用空字串，代表搶第一個「可被點選」的區域。緊連的2個關鍵字之間的邏輯是且(And)，代表同時要存在同一列裡。<br>關鍵字有#1 到 #2。這2組欄位之間的關係接近於「或」(OR)的關係，而且有順位的特性。</li>



<li>&#8220;<strong>Guess Options in Question</strong>&#8220;: 設定自動猜測驗證問題可能的「選項」。要停用這個功能請取消勾選。<br>
<ul class="wp-block-list">
<li><strong>注意1：</strong><br>啟用這個功能有風險，程式可能會誤判（不一定能猜對選項），去猜一些錯誤的選項，一旦猜錯，應該就與入場券無緣了。</li>



<li><strong>注意2：</strong><br>可以自動去猜測「選項」的定義為：驗證問題是「選擇題」。程式目前無法回答「開放性的問題」。</li>



<li><strong>注意3：</strong><br>啟用這個功能，可以猜測出部份簡易的開放性問題，例如：演出日期。</li>
</ul>
</li>
</ul>



<p class="has-vivid-red-color has-text-color">目前程式執行時的邏輯是：關鍵字第2組沒輸入，只有輸入關鍵字第1組，會先用關鍵字第1組的設定去搶票，當第1組沒票時，比照沒輸入關鍵字，所有的票都會去搶。</p>



<a name="config_ex"></a>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading">設定值舉例說明：</h2>



<p><strong>設定範例1號：</strong></p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="882" height="212" src="http://max-everyday.com/wp-content/uploads/2018/12/Screen-Shot-2018-12-27-at-13.11.13.jpg" alt="" class="wp-image-6931" srcset="https://max-everyday.com/wp-content/uploads/2018/12/Screen-Shot-2018-12-27-at-13.11.13.jpg 882w, https://max-everyday.com/wp-content/uploads/2018/12/Screen-Shot-2018-12-27-at-13.11.13-500x120.jpg 500w" sizes="auto, (max-width: 882px) 100vw, 882px" /></figure>



<p>說明：</p>



<ul class="wp-block-list">
<li>會自動點「下一步」按鈕，</li>



<li>會自動填入張數，</li>



<li>目標的票價是$1,000。</li>
</ul>



<p>附註：</p>



<p>關鍵字欄位的設定值為：「1000」與「1,000」在電腦的世界中是絕對不相同的，4個字元完全不相等於5個字元。目前的版本已優化關鍵字比對，修改為不區分逗號、空格與大小寫。</p>



<p>由於常常會發生「不可預期」的情況，像是購票網站伺服器改版，或是Max搶票程式沒寫好，所以搶不到票是正常的，要避開上面這2個不可預期的情況，搶票當日，請先使用搶票程式測試其他活動，看看是否功能正常，還是正式開搶前 10分鐘，請先重開電腦。</p>



<hr class="wp-block-separator has-css-opacity"/>



<p><strong>設定範例2號：</strong></p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="882" height="222" src="http://max-everyday.com/wp-content/uploads/2018/12/Screen-Shot-2018-12-27-at-13.12.02.jpg" alt="" class="wp-image-6932" srcset="https://max-everyday.com/wp-content/uploads/2018/12/Screen-Shot-2018-12-27-at-13.12.02.jpg 882w, https://max-everyday.com/wp-content/uploads/2018/12/Screen-Shot-2018-12-27-at-13.12.02-500x126.jpg 500w" sizes="auto, (max-width: 882px) 100vw, 882px" /></figure>



<p><strong>說明：</strong></p>



<p>這個設定值，可以幫我們自動打勾「我已經閱讀並同意 授權條款 與 隱私權政策」，省下一點點的時間。</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>設定範例3號</strong></p>



<p><strong>Q：為什麼設定 Area Keyword 輸入「12/23」且(And)「1000」沒有自動搶票？</strong><br>A：因為 12/23 並沒有出現在「票種」的清單裡。參考下圖的紅色區塊：</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="849" height="260" src="https://max-everyday.com/wp-content/uploads/2018/12/Screen-Shot-2022-11-05-at-12.53.58-PM.jpg" alt="" class="wp-image-20300" srcset="https://max-everyday.com/wp-content/uploads/2018/12/Screen-Shot-2022-11-05-at-12.53.58-PM.jpg 849w, https://max-everyday.com/wp-content/uploads/2018/12/Screen-Shot-2022-11-05-at-12.53.58-PM-500x153.jpg 500w, https://max-everyday.com/wp-content/uploads/2018/12/Screen-Shot-2022-11-05-at-12.53.58-PM-615x188.jpg 615w" sizes="auto, (max-width: 849px) 100vw, 849px" /></figure>



<p>由於目前的關鍵字邏輯是「且」以上圖為例，如果同時輸入了2個不同的價格，例如「1000」與「1200」來說，是無法比對成功，因為紅色框框裡，並沒有同時在同一列裡出現這2個數字，最後造成的是無法自動輸入票數。</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>設定範例4號</strong></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="865" height="967" src="https://max-everyday.com/wp-content/uploads/2023/04/2023-04-19-17_49_38-Window.jpg" alt="" class="wp-image-17825" srcset="https://max-everyday.com/wp-content/uploads/2023/04/2023-04-19-17_49_38-Window.jpg?v=1681898215 865w, https://max-everyday.com/wp-content/uploads/2023/04/2023-04-19-17_49_38-Window-447x500.jpg?v=1681898215 447w, https://max-everyday.com/wp-content/uploads/2023/04/2023-04-19-17_49_38-Window-615x688.jpg?v=1681898215 615w" sizes="auto, (max-width: 865px) 100vw, 865px" /></figure>



<p>都是花 NT$5,800, 可以在 2D 看, 一定比 2A 看還讚, </p>



<p><strong>Q: 可以在搶票機器人裡只搶 2D 的票嗎? 要怎麼設定才能只搶2D 的票?</strong><br>A: 很抱歉, KKtix 的網頁, 並沒有提供單獨搶 2D 的票, 要搶2D, 請直接下關鍵字 5800 即可, 但可能會搶到 2A 或 2G.<br>附註: kktix 的網頁裡, 並沒有出現 2D, 你下了關鍵字2D, 只會讓你搶不到票.</p>



<p></p>



<p><strong>關鍵字設定範例：</strong></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="839" height="216" src="https://max-everyday.com/wp-content/uploads/2023/05/2023-05-24-14_01_20-Window.jpg" alt="" class="wp-image-17922" srcset="https://max-everyday.com/wp-content/uploads/2023/05/2023-05-24-14_01_20-Window.jpg?v=1684908259 839w, https://max-everyday.com/wp-content/uploads/2023/05/2023-05-24-14_01_20-Window-500x129.jpg?v=1684908259 500w, https://max-everyday.com/wp-content/uploads/2023/05/2023-05-24-14_01_20-Window-615x158.jpg?v=1684908259 615w" sizes="auto, (max-width: 839px) 100vw, 839px" /></figure>



<ul class="wp-block-list">
<li><strong><code>"2樓 2D區"</code></strong><br>&#8220;2樓&#8221; 且 &#8220;2D區&#8221;, 如果網頁裡出現 &#8220;2樓2D區&#8221;,&#8221;2樓-2D區&#8221;,&#8221;2D區2樓&#8221;,&#8221;2D區-2樓&#8221;, 這些都算符合&#8221;且&#8221; 的條件.</li>



<li><code><strong>"3800",""</strong></code><br>第一順位搶關鍵字3800, 第二順位所有可以選擇的票都符合條件.</li>



<li><strong><code>"80","F",""</code></strong><br>代表先找有關鍵字 80 的票種, 以上圖來說 3880,3280,2880 都符合, 如果排序是由上往下, 則會選取 3880 的票. </li>



<li><strong><code>"80 F","F",""</code></strong>
<ul class="wp-block-list">
<li>第1順位, 先找 80 而且有 F 的票種, 以上圖來說會先選到 2880, 因為該列中有 2樓F 的關鍵字. </li>



<li>第2順位, 找關鍵字F.</li>



<li>第3順位, 全部都符合, 有票即搶.<br></li>
</ul>
</li>
</ul>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading">搶票機器人原理：</h2>



<p>我是使用 python + selenium 來實作，除了python 程式語言可以使用 selenium，也可以用 c#, java, ruby, perl。參考看看我的心得：</p>



<p>Selenium 使用 Chrome 瀏覽器 webdriver<br><a href="http://stackoverflow.max-everyday.com/2018/03/selenium-chrome-webdriver/">http://stackoverflow.max-everyday.com/2018/03/selenium-chrome-webdriver/</a></p>



<hr class="wp-block-separator has-css-opacity"/>



<p>機器人程式是跨平台的，可以執行在 Linux / Mac OS / Windows 這 3個平台上。上面影片是使用 FireFox，除了使用 FireFox 瀏覽器也可以 Chrome 瀏覽器。<br></p>



<a name="qa"></a>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading">Q&amp;A 常見問題：</h2>



<p>建議先去看看另一篇比較完整的 Q&amp;A:<br><a href="https://max-everyday.com/2018/03/tixcraft-bot/#qa">https://max-everyday.com/2018/03/tixcraft-bot/#qa</a></p>



<p></p>



<p><strong>Q：這個搶票程式有違法KKTIX相關法律嗎？<br></strong>A：台灣藝文活動的文創法第十條中的「不正方式」由於沒有明確定義，代表的是所有軟體都涉嫌違反。故在此呼籲大家，勿以身試法。</p>



<p></p>



<p><strong>Q：這程式可確保會搶到票嗎？<br></strong>A：不會。</p>



<p></p>



<p><strong>Q：MAX搶票程式該如何取得？<br></strong>A：網頁最上面有附下載點。</p>



<p>程式的<a href="http://stackoverflow.max-everyday.com/2018/03/selenium-chrome-webdriver/">實作方法</a>可以自行挑戰看看。</p>



<p></p>



<p><strong>Q：那下載程式後要怎麼操作，有教學嗎？不然怎麼使用？<br></strong>A：有網頁說明和Youtube 影片。</p>



<p></p>



<p><strong>Q：操做的問題都可請問您嗎？<br></strong>A：可以。請先參考看看教學的文章。</p>



<p></p>



<p><strong>Q：所有購票系統都可以執行嗎？</strong><br>A：沒有這麼神奇哦，只有特定的網站，而且網站一改版之後，可能就無法使用。</p>



<p></p>



<p><strong>Q：可以用永久嗎？</strong><br>A：如果官方網站沒改版的話，可以一直使用。</p>



<p></p>



<p><strong>Q：你都會一直更新嗎？</strong><br>A：不一定會更新。</p>



<p></p>



<p><strong>Q：若是遇到售票網頁改版，後續執行檔程式碼的更新是要重新購買，還是有其他的更新方式?</strong><br>A：不確定有沒有辦法更新，也許賣票的平台請到更厲害的工程師。</p>



<p></p>



<p><strong>Q：請問搶票程式不會被售票網擋下來嗎？</strong><br>A：理論上擋的下來，目前還沒有擋，未來很難說。</p>



<p></p>



<p><strong>Q：有電腦安裝數的限制嗎? (多台電腦OK?)<br></strong>A：沒有限制。<br>附註：你可以取得並修改我所寫的程式碼，但是要讓Python程式碼可以執行，有<a href="http://stackoverflow.max-everyday.com/2018/03/selenium-chrome-webdriver/">前置條件</a>，需要(1)安裝python，(2)安裝 pip， (3)安裝 selenium 套件，(4)下載 webdriver(或ChromeDriver) 到程式碼的資料夾下。</p>



<p></p>



<p><strong>Q：只能用電腦嗎還是手機也可以？<br></strong>A：只限電腦，並限定於 Windows/MacOS/Linux 平台。</p>



<p></p>



<p><strong>Q：請問會包含使用說明嗎？</strong><br>A：請參考看看網頁上附的資料，如果還有不懂的地方請與我聯絡，我會再補充和更新到網頁裡。</p>



<p></p>



<p><strong>Q：想請問能否幫忙搶票？</strong><br>A：沒有提供代搶票的服務，因為沒搶到票，不好意思跟你拿錢。萬一跟你拿了錢又沒搶到票，可能被說是我偷懶沒做事還收錢。</p>



<p></p>



<p><strong>Q：可以直接幫我搶票嗎？<br></strong>A：沒有提供代搶票的服務，因為沒搶到票，不好意思跟你拿錢。萬一跟你拿了錢又沒搶到票，可能被說是我偷懶沒做事還收錢。</p>



<p></p>



<p><strong>Q：我想指定第二場 要如何設定？</strong><br>A：先看官方給的PDF或網頁, 裡面會有該「場次」的關鍵字，如果是一天一場，請輸入日期的關鍵字即可。如果是一天多場，請輸入想搶的場次才有出現的關鍵字。如果不知道怎麼設，日期這個請設為不要透過機器人來幫忙自動選取，手動選場次不會相差太多時間，但建議還是透過程式自動選場次，因為比別人點的快，搶到票的機率就會比別人高。</p>



<p></p>



<p><strong>Q：只求有票，怎麼設定比較好？<br></strong>A：我也不清楚，我猜測也許關鍵字使用低票價的再使用隨機(random)方式選取，機率會高一點。</p>



<p></p>



<p><strong>Q：關鍵字可以輸入「中英數」？<br></strong>A：可以輸入中文/英文/符號和數字。</p>



<p></p>



<p><strong>Q：我一直掛在購買票那邊，時間到會自己進去吧。</strong><br>A：要自己按重新整理。特定的頁面會自動重新整理，「特定頁面」的定義在不同的售票系統會不一樣。在拓元是「挑日期」和「挑區域」的這2個頁面。kktix 是在「挑區域」的頁面。</p>



<p></p>



<p><strong>Q：Windows平台，顯示錯誤訊息：此檔案的版本與您執行的Windows版本不相容，請檢查電腦的系統資訊，判斷您需要x86(32 位元)或x64(64 位元)版本的程式，然後連線軟體發行者。<br></strong>A：</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="572" height="142" src="https://max-everyday.com/wp-content/uploads/2019/08/69477698_2985182521552916_4479263281814437888_n.png" alt="" class="wp-image-8814" srcset="https://max-everyday.com/wp-content/uploads/2019/08/69477698_2985182521552916_4479263281814437888_n.png 572w, https://max-everyday.com/wp-content/uploads/2019/08/69477698_2985182521552916_4479263281814437888_n-500x124.png 500w" sizes="auto, (max-width: 572px) 100vw, 572px" /></figure>



<p>1：目前程式是「只有」支援64 位元，理論上也是可以支援32 位元，所以如果你是32位元，請去借台64位元的電腦來搶票。</p>



<p>2：Windows用戶，請執行解開 zip 檔案後裡第一層目錄下的 settings.exe，而不是 .settings.exe 或 \_MACOSX\settings.exe。謝謝。</p>



<p></p>



<p><strong>Q：Mac OS，按了 run 按鈕後，沒有反應</strong><br>A：請幫忙執行下列的步驟，並提供最後終端機(Terminal，下指令視窗)的執行畫面。</p>



<p>Step 1：在 MaxBot.app 按右鍵，選 &#8220;Show Package Contents&#8221;</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1024" height="591" src="https://max-everyday.com/wp-content/uploads/2019/07/Screen-Shot-2019-07-29-at-01.02.23_result-1024x591.jpg" alt="" class="wp-image-8570" srcset="https://max-everyday.com/wp-content/uploads/2019/07/Screen-Shot-2019-07-29-at-01.02.23_result.jpg 1024w, https://max-everyday.com/wp-content/uploads/2019/07/Screen-Shot-2019-07-29-at-01.02.23_result-500x289.jpg 500w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Step 2：點2下去開啟 &#8220;Contents&#8221; 目錄下的 &#8220;MacOS&#8221; 目錄下的 MaxBot 執行檔，喜歡按右鍵的朋友，也可以按右鍵再選&#8221;Open&#8221;。</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1024" height="158" src="https://max-everyday.com/wp-content/uploads/2019/07/Screen-Shot-2019-07-29-at-01.03.19_result-1024x158.jpg" alt="" class="wp-image-8571" srcset="https://max-everyday.com/wp-content/uploads/2019/07/Screen-Shot-2019-07-29-at-01.03.19_result.jpg 1024w, https://max-everyday.com/wp-content/uploads/2019/07/Screen-Shot-2019-07-29-at-01.03.19_result-500x77.jpg 500w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Step 3：按下 Open 後的畫面如下，請提供按下 Run 按鈕後，終端機(Terminal，下指令視窗)的執行畫面。</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1024" height="672" src="https://max-everyday.com/wp-content/uploads/2019/07/Screen-Shot-2019-07-29-at-01.04.05_result-1024x672.jpg" alt="" class="wp-image-8572" srcset="https://max-everyday.com/wp-content/uploads/2019/07/Screen-Shot-2019-07-29-at-01.04.05_result.jpg 1024w, https://max-everyday.com/wp-content/uploads/2019/07/Screen-Shot-2019-07-29-at-01.04.05_result-500x328.jpg 500w, https://max-everyday.com/wp-content/uploads/2019/07/Screen-Shot-2019-07-29-at-01.04.05_result-380x250.jpg 380w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p></p>



<p><strong>Q：請問按下run能控制多個視窗？</strong><br>A：每一個按下Run跑出來的視窗都是獨立的，需要一一去登入。</p>



<p></p>



<p><strong>Q：run按幾次就跑出幾個視窗，是否只會執行最新出來的視窗？</strong><br>A：每一個按下Run跑出來的視窗都是獨立的，每一個都會跑，每一個執行中的視窗可以使用不一樣的設定值。</p>



<p></p>



<p><strong>Q：那如果我有兩個帳號可以買票，有辦法在同一台電腦run嗎？</strong><br>A：可以。但實際上沒有辦法，因為拓元還有KKtix針對熱門的活動幾乎都會提問額外的問題，同一台電腦「作用中的視窗」都只有一個，所以沒有辦法「同時」去買票，只能依序買票，就是帳號1號買完，點帳號2號的視窗改用帳號2號來買，但熱門活動，錯過了第一時間搶票，買到票的機率很低。</p>



<p></p>



<p><strong>Q：我想要搶某活動的 &#8220;特一區&#8221;+&#8221;第1排11號.12號&#8221;那我能用你的程式去搶票嗎？(手動的一定會被淘汰.因為速度太慢.對吧)<br></strong>A：不一定，要看運氣，理論上來說，使用程式去搶到票的機率可能只有高一點點而。參考下一個問題。第1排11號.12號，是手動選位，通常熱門的活動，都沒有開放手動選位，意思是，可以手動選位的活動，其實用不到搶票程式。</p>



<p></p>



<p><strong>Q：我如果有指定要哪區域的第幾排的位子 是不是要手動選擇？<br></strong>A：通常，可以自己挑位子的活動，不需要使用到搶票的程式，熱門活動都是電腦劃位。</p>



<p></p>



<p><strong>Q：在購票的畫面，程式沒有自動跑，需要自己手動點，但是等到第二回，程式又可以自動跑，為什麼？</strong><br>A：這估情況是可能發生的，目前程式需要網頁完全載入(loaded)，在這情況下程式因為網頁元件都初始化完成了，程式腳本跑起來問題才會比較少，有些情況會造成購票的畫面已經都顯示出來了，但網頁有些圖片可能因為您被分流到的伺服器比較忙碌，有些圖片或元素還沒被下載完成，造成網頁的狀態還是「下載中」。針對這個可能的突發情況，建議您：</p>



<ul class="wp-block-list">
<li>搶票前：請先登入會員帳號，並先試買其他的活動，並取消，然後再回到準備要搶的活動頁面去重新整理頁面。</li>



<li>搶票中：所以如果程式沒有自動跑的時候，請趕快自己手動去點。</li>
</ul>



<p></p>



<p><strong>Q：使用機器人腳本自動輸入欄位有機會會搶輸手動的嗎？<br></strong>A：有些情況下，手動是可能比機器人腳本快。機器人腳本的原理是透過程式預先針對判斷網頁已出現的元素(element)來決定要自動操作網頁的項目是什麼，目前程式需要網頁完全載入(loaded)，在這情況下程式因為網頁元件都初始化完成了，程式腳本跑起來問題才會比較少，缺點就是慢了一到二秒，另一方面在程式腳本在自動選票數、打勾同意和對焦到驗證碼的輸入框會比手動快，所以使用機器人和用手動搶票不會差太多，結論：當網頁完整載入速度比較慢的這個情況之下，機器人自動化腳本和手動搶票不會差很多，也有可能會搶輸手動；如果網頁載入速度快或一般的情況下，使用機器人腳本自動填值在理論上會比手動搶票快一到二秒。</p>



<p></p>



<p><strong>Q：為什麼會卡在立即訂購的頁面5~6秒才跳進去選購頁面呢？是程式卡住了嗎?<br></strong>A：有些情況下，手動是可能比機器人腳本快。參考上面的解答。遇到這個情況，請挑戰自行手動去搶票。</p>



<p></p>



<p><strong>Q：它為什麼會自己選擇2張+會自己打勾?<br></strong>A：因為有寫程式去自動輸入和打勾。參考實作原理：<br><a href="http://stackoverflow.max-everyday.com/2018/03/selenium-chrome-webdriver/">http://stackoverflow.max-everyday.com/2018/03/selenium-chrome-webdriver/</a></p>



<p></p>



<p><strong>Q：當我設定想購買的日期價格和數量，執行程式後我還需要手動做什麼嗎？ </strong><br>A：除了目前程式所提供的功能，其他都需要自己手動操作。</p>



<p></p>



<p><strong>Q：付款的信用卡資訊是否輸要手動輸入？</strong><br>A：除了目前程式所提供的功能，其他都需要自己手動操作。</p>



<p></p>



<p><strong>Q：如果設定想購買的門票種類售罄，程式會自動輸換其他日期或價格嗎？ 還是會停留在網頁待使用者自行再選。</strong><br> A：會停留在網頁待使用者自行再選。</p>



<p></p>



<p><strong>Q：請問我用kktix怎麼不會自動輸入答案，我看你網頁有寫會自動輸入。<br></strong>A：很多問題都沒辦法自動去猜測，非結構（開放）性問題是一定沒辦法，需要在問題裡提供答案選項，而且問題使用的格式要程式已知的才行，只要kktix每次都使用不一樣格式，每次都沒辦法去猜測。</p>



<p></p>



<p><strong>Q：我的搶票程式是就直接停住了，我這時候是能做什麼動作挽救嗎？</strong><br>A：不用挽救，比照手動搶票，人工去點擊就好了。</p>



<p></p>



<p><strong>Q：使用搶票程式，還是要自己去按幾張票嗎</strong><br>A：運氣好時是不用自己按，你可以預期程式不會去按，要自己去按票數。</p>



<p></p>



<p><strong>Q：請問kktix無圖形介面搶到後 視窗好像跳不出來&#8230;</strong><br>A：你可以先不要勾, 去看同一場活動, 為什麼繼續.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="555" height="227" src="https://max-everyday.com/wp-content/uploads/2023/02/333406358_1200993493869188_4088690368797952292_n.png" alt="" class="wp-image-17668" srcset="https://max-everyday.com/wp-content/uploads/2023/02/333406358_1200993493869188_4088690368797952292_n.png?v=1677308658 555w, https://max-everyday.com/wp-content/uploads/2023/02/333406358_1200993493869188_4088690368797952292_n-500x205.png?v=1677308658 500w" sizes="auto, (max-width: 555px) 100vw, 555px" /></figure>



<p></p>



<p><strong>Q：請教，KKTIX無法鍵入日期，讓機器人自動點選嗎?</strong><br>A：因為，無需鍵入日期。參考看看這部影片，Max搶票機器人 (2023-02-24)：KKTix，無視窗模式，多設定檔管<br><a href="https://youtu.be/QgLAHkJbhqQ">https://youtu.be/QgLAHkJbhqQ</a></p>



<p></p>



<p><strong>Q：KKTIX的活動有reCAPTCHA標誌 那這樣適合用搶票機器人搶嗎?</strong><br>A：reCaptcha 的問題目前無解, 預期機器人應該會被reCaptcha檢測到, 只能希望並挑戰在大量且多人搶票的時候, reCaptcha 會沒動作.</p>



<p></p>



<p><strong>Q：KKTIX狀態API 這有開跟沒開對搶票由什麼影響嗎?</strong><br>A：有勾的話, 搶票應該會快個 0.4 秒左右, 差異很大! 為了求有票, 帳號被鎖再創就好, 可以勇敢地勾下去。</p>



<p></p>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading">相關文章：</h2>



<p>台灣：</p>



<ul class="wp-block-list">
<li>Max的拓元搶票機器人<br><a href="http://max-everyday.com/2018/03/tixcraft-bot/">http://max-everyday.com/2018/03/tixcraft-bot/</a></li>



<li>Max的KKTIX搶票機器人<br><a href="http://max-everyday.com/2018/12/kktix-bot/">http://max-everyday.com/2018/12/kktix-bot/</a></li>



<li>Max的FamiTicket搶票機器人<br><a href="http://max-everyday.com/2019/01/maxbot-famiticket/">http://max-everyday.com/2019/01/maxbot-famiticket/</a></li>



<li>Max的ibon搶票機器人<br><a href="https://max-everyday.com/2023/01/ibon-bot/">https://max-everyday.com/2023/01/ibon-bot/</a></li>
</ul>



<p>香港：</p>



<ul class="wp-block-list">
<li>Max的城市售票網搶票機器人<br><a href="http://max-everyday.com/2019/02/urbtix-bot/">http://max-everyday.com/2019/02/urbtix-bot/</a></li>



<li>Max的cityline搶票機器人<br><a href="https://max-everyday.com/2019/03/cityline-bot/">https://max-everyday.com/2019/03/cityline-bot/</a></li>



<li>Max的快達票搶票機器人<br><a href="https://max-everyday.com/2023/01/hkticketing-bot/">https://max-everyday.com/2023/01/hkticketing-bot/</a></li>
</ul>



<p>韓國：</p>



<ul class="wp-block-list">
<li>Max interpark 搶票機器人<br><a href="https://max-everyday.com/2023/08/interpark-bot/">https://max-everyday.com/2023/08/interpark-bot/</a></li>
</ul>



<p>其他：</p>



<ul class="wp-block-list">
<li>Max自動掛號機器人<br><a href="http://max-everyday.com/2018/08/max-auto-reg-bot/">http://max-everyday.com/2018/08/max-auto-reg-bot/</a></li>



<li>inline 填表單機器人<br><a href="https://max-everyday.com/2022/09/inline-bot/">https://max-everyday.com/2022/09/inline-bot/</a></li>



<li>[MaxBot]請問新加坡的 ticketmaster 怎麼輸入選區呢?<br><a href="https://max-everyday.com/2023/10/ticketmaster-area-auto-select/">https://max-everyday.com/2023/10/ticketmaster-area-auto-select/</a></li>



<li>Max 學習 selenium<br><a href="http://stackoverflow.max-everyday.com/tag/selenium/">http://stackoverflow.max-everyday.com/tag/selenium/</a></li>



<li>Max搶票機器人Facebook粉絲團：<br><a href="https://www.facebook.com/maxbot.ticket/">https://www.facebook.com/maxbot.ticket/</a></li>



<li>香港的售票網站的等待10秒後重試<br><a href="https://max-everyday.com/2023/01/cityline-wait-10-seconds-retry/">https://max-everyday.com/2023/01/cityline-wait-10-seconds-retry/</a></li>



<li>拓元的搶票，要多少的網路頻寬才夠？<br><a href="https://max-everyday.com/2023/02/how-many-band-width-you-need-to-buy-ticket/">https://max-everyday.com/2023/02/how-many-band-width-you-need-to-buy-ticket/</a></li>



<li>Max 搶票機器人的故障排除<br><a href="https://max-everyday.com/2023/11/maxbot-troubleshooting/">https://max-everyday.com/2023/11/maxbot-troubleshooting/</a></li>



<li>搶票常見問題整理<br><a href="https://max-everyday.com/2023/02/common-problem-when-you-buy-ticket/">https://max-everyday.com/2023/02/common-problem-when-you-buy-ticket/</a></li>



<li>如何用虛擬主機搶拓元的門票<br><a href="https://max-everyday.com/2023/11/buy-ticket-by-vm/">https://max-everyday.com/2023/11/buy-ticket-by-vm/</a></li>



<li>如何透過Python自行架設代理伺服器 (Proxy Server)<br><a href="https://stackoverflow.max-everyday.com/2023/11/python-proxy-server/">https://stackoverflow.max-everyday.com/2023/11/python-proxy-server/</a></li>
</ul>



<p>[Python] 如何取出字串中的選項<br><a href="http://stackoverflow.max-everyday.com/2018/12/python-regular-expression-findall/">http://stackoverflow.max-everyday.com/2018/12/python-regular-expression-findall/</a><br>這篇文章目是透過程式取得「驗證問題」裡的選項，再用程式來自動把選項用來回答問題。<a href="http://stackoverflow.max-everyday.com/2018/03/selenium-chrome-webdriver/"></a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://max-everyday.com/2018/12/kktix-bot/feed/</wfw:commentRss>
			<slash:comments>68</slash:comments>
		
		
			</item>
		<item>
		<title>網頁報稅20分鐘內完成</title>
		<link>https://max-everyday.com/2018/05/tax-online/</link>
					<comments>https://max-everyday.com/2018/05/tax-online/#respond</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Sun, 06 May 2018 05:27:57 +0000</pubDate>
				<category><![CDATA[生活小事]]></category>
		<category><![CDATA[macOS]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[理財]]></category>
		<guid isPermaLink="false">http://max-everyday.com/?p=5832</guid>

					<description><![CDATA[今年報稅真的很方便耶，其實我沒報稅很多年了，今天特地用MacOS ＋健保卡體驗新的報稅流程，資料（讀卡機、健保卡和戶號）都準備齊全的情況下，其實10分鐘就報完了。 家裡窮 [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>今年報稅真的很方便耶，其實我沒報稅很多年了，今天特地用MacOS ＋健保卡體驗新的報稅流程，資料（讀卡機、健保卡和戶號）都準備齊全的情況下，其實10分鐘就報完了。</p>
<p>家裡窮，運氣真好，還可以退稅，一個人的標準扣除額長大到 30.6萬，扶養一個可以扣 8.8萬。</p>
<p><a href="http://max-everyday.com/wp-content/uploads/2018/05/Screenshot-2018-05-06-12.56.34.jpg" data-lightbox="gal[5832]"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-5833" src="http://max-everyday.com/wp-content/uploads/2018/05/Screenshot-2018-05-06-12.56.34.jpg" alt="" width="1024" height="348" srcset="https://max-everyday.com/wp-content/uploads/2018/05/Screenshot-2018-05-06-12.56.34.jpg 1024w, https://max-everyday.com/wp-content/uploads/2018/05/Screenshot-2018-05-06-12.56.34-500x170.jpg 500w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></p>
<p>&nbsp;</p>
<p>我已申報成功1次，是可以申報成功很多次嗎？科科。</p>
<p><a href="http://max-everyday.com/wp-content/uploads/2018/05/Screenshot-2018-05-06-12.57.47.jpg" data-lightbox="gal[5832]"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-5834" src="http://max-everyday.com/wp-content/uploads/2018/05/Screenshot-2018-05-06-12.57.47.jpg" alt="" width="1024" height="363" srcset="https://max-everyday.com/wp-content/uploads/2018/05/Screenshot-2018-05-06-12.57.47.jpg 1024w, https://max-everyday.com/wp-content/uploads/2018/05/Screenshot-2018-05-06-12.57.47-500x177.jpg 500w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></p>
<p>&nbsp;</p>
<p>之前用在 Windows 的讀卡機，在MacOS 居然可以直接用耶，真方便。</p>
<h4>Step 1：先設定一組密碼給健保卡</h4>
<p>(如果健保卡已經綁過一組密碼，請跑過這一步)</p>
<p>健保局的網站：<br />
<a href="https://cloudicweb.nhi.gov.tw/cloudic/system/mlogin.aspx">https://cloudicweb.nhi.gov.tw/cloudic/system/mlogin.aspx</a></p>
<p>圖文攻略：<br />
<a href="https://www.ntbca.gov.tw/etwmain/web/ETW118W/CON/1590/6632901159805696133">https://www.ntbca.gov.tw/etwmain/web/ETW118W/CON/1590/6632901159805696133</a></p>
<p>安裝必要元件：<br />
<a href="https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/mEventesting.htm">https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/mEventesting.htm</a></p>
<hr />
<h4>Step 2：手動地去<a href="https://iccert.nhi.gov.tw:7777/">設定伺服器為可信任服務</a></h4>
<p><a href="https://iccert.nhi.gov.tw:7777/">https://iccert.nhi.gov.tw:7777/</a><br />
這點滿奇怪的，為何要民眾去點，這個理論上，應該可以請網站管理員去增加合法SSL憑證。</p>
<hr />
<h4>Step 3：進到到「網頁版的綜合所得稅電子結算申報繳稅」網頁</h4>
<p><a href="https://efile.tax.nat.gov.tw/irxw/index.jsp">https://efile.tax.nat.gov.tw/irxw/index.jsp</a><br />
<a href="https://efile.tax.nat.gov.tw/irxw/index.jsp" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-5835 size-full" src="http://max-everyday.com/wp-content/uploads/2018/05/IRXM.png" alt="" width="226" height="149" /></a></p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://max-everyday.com/2018/05/tax-online/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>免費中文字體 NotoSans 思源黑體</title>
		<link>https://max-everyday.com/2018/03/noto-font/</link>
					<comments>https://max-everyday.com/2018/03/noto-font/#respond</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Mon, 12 Mar 2018 08:57:05 +0000</pubDate>
				<category><![CDATA[電腦相關應用]]></category>
		<category><![CDATA[macOS]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">http://max-everyday.com/?p=5564</guid>

					<description><![CDATA[這是一個很棒的免費字型，每台電腦應該安裝一下這個字型，顯示上很會比較漂亮，字型可以運用在很多地方，除了繪圖軟體/影片編輯/影片播放/文書處理/上網都用的到。檔案下載：ht [&#8230;]]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image alignnone"><a href="http://max-everyday.com/wp-content/uploads/2018/03/noto_font.jpg" data-lightbox="gal[5564]"><img loading="lazy" decoding="async" width="800" height="600" src="http://max-everyday.com/wp-content/uploads/2018/03/noto_font.jpg" alt="" class="wp-image-5568" srcset="https://max-everyday.com/wp-content/uploads/2018/03/noto_font.jpg 800w, https://max-everyday.com/wp-content/uploads/2018/03/noto_font-500x375.jpg 500w" sizes="auto, (max-width: 800px) 100vw, 800px" /></a><figcaption>Noto Sans</figcaption></figure>



<p>這是一個很棒的免費字型，每台電腦應該安裝一下這個字型，顯示上很會比較漂亮，字型可以運用在很多地方，除了繪圖軟體/影片編輯/影片播放/文書處理/上網都用的到。檔案下載：<a href="https://www.google.com/get/noto/">https://www.google.com/get/noto/</a></p>



<p>Google 下載點2:<br><a href="https://github.com/googlefonts/noto-cjk">https://github.com/googlefonts/noto-cjk</a></p>



<p>Adobe 的版本，有改版為 2.0，針對辶部及注音符號重新設計，檔案下載：<br><a href="https://github.com/adobe-fonts/source-han-sans">https://github.com/adobe-fonts/source-han-sans</a></p>



<p>應該是選「Noto Sans CJK TC」和 「Noto Serif CJK TC」 這2組 115MB/130MB 的下載即可。Noto Serif 是 「思源宋體」。</p>



<p>思源黑體、思源宋體的英文在兩家公司間分別有不同的名稱，Google 稱為 Noto Sans / Serif，Adobe 則為 Source Han Sans / Serif，但基本上是一模一樣的。</p>



<p>中日韓表意文字版的後方加有 CJK 字樣，以語言分成四種版本 JP（日文）、KR（韓文）、SC（簡體中文）、TC（正體中文）。地區子集化（Region-specific Subset）也分四種版本 JP（日本）、KR（韓國）、CN（中國）、TW（臺灣）。</p>



<p>以思源宋體為例，在不同語言中「曜」的在畫寫的細節有所不同。</p>



<p>Noto Sans屬於「無襯線黑體」，Noto Serif屬於「襯線體」。</p>



<p>專業的黑體介紹和比較：<br><a href="https://medium.com/@jt.type.tw/繁體中文常見的黑體字型-43433ae68f7f">https://medium.com/@jt.type.tw/繁體中文常見的黑體字型-43433ae68f7f</a></p>



<hr class="wp-block-separator"/>



<p>如何安裝思源黑體字型：<br><a href="https://www.google.com/get/noto/help/install/">https://www.google.com/get/noto/help/install/</a></p>



<p><strong>Windows</strong></p>



<ol class="wp-block-list"><li><a href="https://noto-website-2.storage.googleapis.com/pkgs/Noto-hinted.zip">Download</a>&nbsp;the font package (.zip)</li><li>Uncompress the package</li><li>Search for “fonts” in the Start Menu or go to Start → Control Panel → Appearance and Personalization → Fonts</li><li>Select all fonts and drag them into the Fonts folder</li></ol>



<p><strong>macOS</strong></p>



<ol class="wp-block-list"><li><a href="https://noto-website-2.storage.googleapis.com/pkgs/Noto-unhinted.zip">Download</a>&nbsp;the font package (.zip)</li><li>Double click on the package to uncompress it</li><li>Open Font Book (Go to Finder → Applications → Font Book)</li><li>Select all of the font files and drag them to the Font column (i.e., the second column) of Font Book</li></ol>



<p><strong>Linux</strong></p>



<ul class="wp-block-list"><li>Command-line:
<code>cd ~/Downloads   # or wherever you downloaded a font pack.
unzip &lt;font package&gt;.zip
# for a single user
mkdir -p ~/.fonts
cp *otf *otc ~/.fonts
fc-cache -f -v # optional
# for all users
sudo mkdir -p /usr/share/fonts/opentype/noto
sudo cp *otf *otc /usr/share/fonts/opentype/noto
sudo fc-cache -f -v # optional</code>
</li><li>Gnome desktop for a single user
<ol><li><a href="https://noto-website-2.storage.googleapis.com/pkgs/Noto-hinted.zip">Download</a>&nbsp;and uncompress a font package</li><li>Make&nbsp;<code>.fonts</code>&nbsp;directory in your home directory if it&#8217;s not present.</li><li>Make a folder named &#8220;<code>noto</code>&#8221; (optional)</li><li>Drag and drop fonts to either&nbsp;<code>.fonts</code>&nbsp;or&nbsp;<code>.fonts/noto</code></li></ol>
</li><li>Gnome desktop for all users
<ol><li><a href="https://noto-website-2.storage.googleapis.com/pkgs/Noto-hinted.zip">Download</a>&nbsp;and uncompress a font package</li><li>Press Alt-F2 and type &#8220;<code>gksu nautilus /usr/share/fonts</code>&#8220;</li><li>Make a folder named &#8220;<code>opentype</code>&#8221; if not present and open it</li><li>Make a folder &#8220;<code>noto</code>&#8221; in &#8220;<code>opentype</code>&#8221; folder.</li><li>Drag and drop fonts obtained in step a to &#8220;<code>noto</code>&#8221; folder.</li></ol>
</li><li>Using fonts
<ol><li>Some programs will recognize newly installed fonts as soon as font-cache is updated. It can take a while to update the fontcache in case of super-otc.</li><li>Other programs such as Chrome requires restart.</li><li>Chrome on Linux cannot recognize more than 2 weights. See&nbsp;<a href="http://crbug.com/368442">http://crbug.com/368442</a></li></ol>
</li></ul>



<hr class="wp-block-separator"/>



<p>思源宋體也滿好看的</p>



<figure class="wp-block-image alignnone"><a href="http://max-everyday.com/wp-content/uploads/2018/03/source_han_serif.jpg" data-lightbox="gal[5564]"><img loading="lazy" decoding="async" width="800" height="600" src="http://max-everyday.com/wp-content/uploads/2018/03/source_han_serif.jpg" alt="" class="wp-image-5569" srcset="https://max-everyday.com/wp-content/uploads/2018/03/source_han_serif.jpg 800w, https://max-everyday.com/wp-content/uploads/2018/03/source_han_serif-500x375.jpg 500w" sizes="auto, (max-width: 800px) 100vw, 800px" /></a><figcaption>Source Han Serif</figcaption></figure>



<p>安裝思源宋體會比較麻煩一點點，需要一個一個去手動下載檔案，如果「整包」下載需要 2GB, 但實際上你只需要 40MB，檔案下載：</p>



<figure class="wp-block-embed"><div class="wp-block-embed__wrapper">
https://github.com/adobe-fonts/source-han-serif/tree/release/SubsetOTF/TW
</div></figure>



<p>下載完上面網址裡的 8個檔案，安裝方式就和思源黑體一樣。</p>



<hr class="wp-block-separator"/>



<p>下載完字型，我們要來認識字型世界裡的專有名詞「&nbsp;無襯線字體」：</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>無襯線體專指西文中沒有襯線的字體，與漢字等東亞字體中的黑體相對應。與襯線字體相反，完全拋棄裝飾襯線，只剩下主幹，造型簡明有力，更具現代感。適用於標題、廣告，瞬間的識別性高。<a href="https://zh.wikipedia.org/zh-tw/%E6%97%A0%E8%A1%AC%E7%BA%BF%E4%BD%93">維基百科</a></p></blockquote>



<p>在字體排版學裡，襯線指的是字母結構筆劃之外的裝飾性筆劃。有襯線的字體叫襯線體（serif）；沒有襯線的字體，則叫做無襯線體（sans-serif）。</p>



<figure class="wp-block-image"><a href="http://max-everyday.com/wp-content/uploads/2018/03/1-150Z91TZ6437.jpg" data-lightbox="gal[5564]"><img loading="lazy" decoding="async" width="500" height="375" src="http://max-everyday.com/wp-content/uploads/2018/03/1-150Z91TZ6437.jpg" alt="" class="wp-image-5574"/></a></figure>



<p>Google 的新LOGO也採用了「無襯線字體」設計。這幾年下來，無數大牌公司都換了無襯線字體LOGO！</p>



<figure class="wp-block-image"><a href="http://max-everyday.com/wp-content/uploads/2018/03/1-150Z91U330S2.png" data-lightbox="gal[5564]"><img loading="lazy" decoding="async" width="547" height="517" src="http://max-everyday.com/wp-content/uploads/2018/03/1-150Z91U330S2.png" alt="" class="wp-image-5576" srcset="https://max-everyday.com/wp-content/uploads/2018/03/1-150Z91U330S2.png 547w, https://max-everyday.com/wp-content/uploads/2018/03/1-150Z91U330S2-500x473.png 500w" sizes="auto, (max-width: 547px) 100vw, 547px" /></a></figure>



<p>現在的人們越來越喜歡用無襯線體，因為無襯線體看上去「更乾淨」，給人一種休閒輕鬆的感覺。</p>



<hr class="wp-block-separator"/>



<p>日本的自家製フォント工房就把思源黑體改成了思源柔體，同樣也免費商用，適用於可愛、少女、日系風格。</p>



<p>檔案下載：<a href="http://jikasei.me/font/genjyuu/">http://jikasei.me/font/genjyuu/</a></p>



<p>Q：下載檔後面的X跟L是甚麼意思@@?</p>



<p>A：是圓角度數不同，可以3個版本都下載。</p>



<figure class="wp-block-image"><a href="http://max-everyday.com/wp-content/uploads/2018/03/21743456_1670742142959792_3044118713641019882_o.jpg" data-lightbox="gal[5564]"><img loading="lazy" decoding="async" width="1373" height="389" src="http://max-everyday.com/wp-content/uploads/2018/03/21743456_1670742142959792_3044118713641019882_o.jpg" alt="" class="wp-image-6256" srcset="https://max-everyday.com/wp-content/uploads/2018/03/21743456_1670742142959792_3044118713641019882_o.jpg 1373w, https://max-everyday.com/wp-content/uploads/2018/03/21743456_1670742142959792_3044118713641019882_o-500x142.jpg 500w, https://max-everyday.com/wp-content/uploads/2018/03/21743456_1670742142959792_3044118713641019882_o-1024x290.jpg 1024w" sizes="auto, (max-width: 1373px) 100vw, 1373px" /></a></figure>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading">相關文章</h2>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<p><strong>花園家族</strong></p>



<ul class="wp-block-list"><li>B2花園 B2 Hana&nbsp;<a href="https://max-everyday.com/2020/08/b2-hana-font/">https://max-everyday.com/2020/08/b2-hana-font/</a></li><li>花園肉丸 Hana Meatball&nbsp;<a href="https://max-everyday.com/2020/08/hana-meatball/">https://max-everyday.com/2020/08/hana-meatball/</a></li></ul>



<p><strong>簡體/繁體轉換家族</strong></p>



<ul class="wp-block-list"><li>獅尾簡腿黑體 Swei Jay Leg&nbsp;<a href="https://max-everyday.com/2020/11/swei-jay-leg/">https://max-everyday.com/2020/11/swei-jay-leg/</a></li><li>獅尾簡中黑體 Swei Jay Sans&nbsp;<a href="https://max-everyday.com/2020/11/swei-jay-sans/">https://max-everyday.com/2020/11/swei-jay-sans/</a></li><li>獅尾簡中宋體 Swei Jay Serif&nbsp;<a href="https://max-everyday.com/2020/11/swei-jay-serif/">https://max-everyday.com/2020/11/swei-jay-serif/</a></li><li>獅尾繁腿黑體 Swei Fan Leg&nbsp;<a href="https://max-everyday.com/2020/11/swei-fan-leg/">https://max-everyday.com/2020/11/swei-fan-leg/</a></li><li>獅尾繁中黑體 Swei Fan Sans&nbsp;<a href="https://max-everyday.com/2020/11/swei-fan-sans/">https://max-everyday.com/2020/11/swei-fan-sans/</a></li><li>獅尾繁中宋體 Swei Fan Serif&nbsp;<a href="https://max-everyday.com/2020/11/swei-fan-serif/">https://max-everyday.com/2020/11/swei-fan-serif/</a></li></ul>



<p><strong>獅尾黑體家族</strong></p>



<ul class="wp-block-list"><li>獅尾右下腿黑體 Swei Right Bottom Leg <a href="https://max-everyday.com/2021/08/swei-right-bottom-leg/">https://max-everyday.com/2021/08/swei-right-bottom-leg/</a></li><li>獅尾右下圓黑體 Swei Right Bottom Sans <a href="https://max-everyday.com/2021/08/swei-right-bottom-sans/">https://max-everyday.com/2021/08/swei-right-bottom-sans/</a></li><li>獅尾飛腿黑體 Swei Dart Leg <a href="https://max-everyday.com/2020/11/swei-dart-leg/">https://max-everyday.com/2020/11/swei-dart-leg/</a></li><li>獅尾飛鏢黑體 Swei Dart Sans <a href="https://max-everyday.com/2020/11/swei-dart-sans/">https://max-everyday.com/2020/11/swei-dart-sans/</a></li><li>獅尾火腿黑體 Swei Match Leg <a href="https://max-everyday.com/2020/11/swei-match-leg/">https://max-everyday.com/2020/11/swei-match-leg/</a></li><li>獅尾火柴黑體 Swei Match Sans <a href="https://max-everyday.com/2020/11/swei-match-sans/">https://max-everyday.com/2020/11/swei-match-sans/</a></li><li>獅尾骨腿黑體 Swei Bone Leg <a href="https://max-everyday.com/2020/11/swei-bone-leg/">https://max-everyday.com/2020/11/swei-bone-leg/</a></li><li>獅尾骨頭黑體 Swei Bone Sans <a href="https://max-everyday.com/2020/11/swei-bone-sans/">https://max-everyday.com/2020/11/swei-bone-sans/</a></li><li>獅尾斧腿黑體 Swei Ax Leg <a href="https://max-everyday.com/2020/11/swei-ax-leg/">https://max-everyday.com/2020/11/swei-ax-leg/</a></li><li>獅尾斧頭黑體 Swei Ax Sans <a href="https://max-everyday.com/2020/11/swei-ax-sans/">https://max-everyday.com/2020/11/swei-ax-sans/</a></li><li>獅尾喇腿黑體 Swei Bell Leg <a href="https://max-everyday.com/2020/11/swei-bell-leg/">https://max-everyday.com/2020/11/swei-bell-leg/</a></li><li>獅尾喇叭黑體 Swei Bell Sans <a href="https://max-everyday.com/2020/11/swei-bell-sans/">https://max-everyday.com/2020/11/swei-bell-sans/</a></li><li>獅尾惡腿黑體 Swei Devil Leg <a href="https://max-everyday.com/2020/11/swei-devil-leg/">https://max-everyday.com/2020/11/swei-devil-leg/</a></li><li>獅尾惡魔黑體 Swei Devil Sans <a href="https://max-everyday.com/2020/11/swei-devil-sans/">https://max-everyday.com/2020/11/swei-devil-sans/</a></li><li>獅尾麥腿黑體 Swei Marker Leg <a href="https://max-everyday.com/2020/10/swei-marker-leg/">https://max-everyday.com/2020/10/swei-marker-leg/</a></li><li>獅尾麥克黑體 Swei Marker Sans <a href="https://max-everyday.com/2020/10/swei-marker-sans/">https://max-everyday.com/2020/10/swei-marker-sans/</a></li><li>獅尾詠腿黑體 Swei Fist Leg <a href="https://max-everyday.com/2020/10/swei-fist-leg/">https://max-everyday.com/2020/10/swei-fist-leg/</a></li><li>獅尾詠春黑體 Swei Fist Sans <a href="https://max-everyday.com/2020/10/swei-fist-sans/">https://max-everyday.com/2020/10/swei-fist-sans/</a></li><li>獅尾鋸腿黑體 Swei Alias Leg <a href="https://max-everyday.com/2020/10/swei-alias-leg/">https://max-everyday.com/2020/10/swei-alias-leg/</a></li><li>獅尾鋸齒黑體 Swei Alias Sans <a href="https://max-everyday.com/2020/10/swei-alias-sans/">https://max-everyday.com/2020/10/swei-alias-sans/</a></li><li>獅尾尖刺黑體 Swei Spike Sans <a href="https://max-everyday.com/2020/10/swei-spike-sans/">https://max-everyday.com/2020/10/swei-spike-sans/</a></li><li>獅尾福腿黑體 Swei Gospel Leg <a href="https://max-everyday.com/2020/09/swei-gospel-leg/">https://max-everyday.com/2020/09/swei-gospel-leg/</a></li><li>獅尾福音黑體 Swei Gospel Sans <a href="https://max-everyday.com/2020/09/swei-gospel-sans/">https://max-everyday.com/2020/09/swei-gospel-sans/</a></li><li>獅尾D滷腿黑體 Swei Del Luna Leg <a href="https://max-everyday.com/2020/09/swei-del-luna-leg/">https://max-everyday.com/2020/09/swei-del-luna-leg/</a></li><li>獅尾德魯納黑體 Swei Del Luna Sans <a href="https://max-everyday.com/2020/09/swei-del-luna-sans">https://max-everyday.com/2020/09/swei-del-luna-sans</a></li><li>獅尾彎腿黑體 Swei Curve Leg <a href="https://max-everyday.com/2020/09/swei-curve-leg/">https://max-everyday.com/2020/09/swei-curve-leg/</a></li><li>獅尾彎黑體 Swei Curve Sans <a href="https://max-everyday.com/2020/09/swei-curve-sans/">https://max-everyday.com/2020/09/swei-curve-sans/</a></li><li>獅尾霓腿黑體 Swei Bow Leg <a href="https://max-everyday.com/2020/09/swei-bow-leg/">https://max-everyday.com/2020/09/swei-bow-leg/</a></li><li>獅尾霓黑體 Swei Bow Sans <a href="https://max-everyday.com/2020/09/swei-bow-sans/">https://max-everyday.com/2020/09/swei-bow-sans/</a></li><li>獅尾蝙蝠圓體 Swei Bat Sans <a href="https://max-everyday.com/2020/09/swei-bat-sans/">https://max-everyday.com/2020/09/swei-bat-sans/</a></li><li>獅尾牙膏圓體 Swei Toothpaste <a href="https://max-everyday.com/2020/09/swei-toothpaste/">https://max-everyday.com/2020/09/swei-toothpaste/</a></li><li>獅尾三角黑體 Swei 3T Sans <a href="https://max-everyday.com/2020/08/swei-3t-sans/">https://max-everyday.com/2020/08/swei-3t-sans/</a></li><li>獅尾螺帽腿黑體 Swei Nut Leg <a href="https://max-everyday.com/2020/08/swei-nut-leg/">https://max-everyday.com/2020/08/swei-nut-leg/</a></li><li>獅尾螺帽黑體 Swei Nut Sans <a href="https://max-everyday.com/2020/08/swei-nut-sans/">https://max-everyday.com/2020/08/swei-nut-sans/</a></li><li>獅尾B2腿黑體 Swei B2 Leg <a href="https://max-everyday.com/2020/07/swei-b2-leg/">https://max-everyday.com/2020/07/swei-b2-leg/</a></li><li>獅尾B2黑體 Swei B2 Sans <a href="https://max-everyday.com/2020/07/swei-b2-sans/">https://max-everyday.com/2020/07/swei-b2-sans/</a></li><li>獅尾腿圓 Swei Gothic Leg <a href="https://max-everyday.com/2020/08/swei-gothic-leg/">https://max-everyday.com/2020/08/swei-gothic-leg/</a></li><li>獅尾彩虹腿 Swei Rainbow Leg <a href="https://max-everyday.com/2020/08/swei-rainbow-leg/">https://max-everyday.com/2020/08/swei-rainbow-leg/</a></li><li>獅尾XD珍珠 Swei XD Pearl <a href="https://max-everyday.com/2020/07/swei-xd-pearl/">https://max-everyday.com/2020/07/swei-xd-pearl/</a></li><li>獅尾D露西 Swei D Lucy <a href="https://max-everyday.com/2020/07/swei-d-lucy/">https://max-everyday.com/2020/07/swei-d-lucy/</a></li><li>獅尾半月字體 Swei Gothic <a href="https://max-everyday.com/2020/04/swei-half-moon/">https://max-everyday.com/2020/04/swei-half-moon/</a></li><li>台灣圓體 TaiwanPearl <a href="https://max-everyday.com/2020/06/taiwanpearl/">https://max-everyday.com/2020/06/taiwanpearl/</a></li><li>獅尾圓體 Swei Gothic <a href="https://max-everyday.com/2020/04/swei-gothic/">https://max-everyday.com/2020/04/swei-gothic/</a></li><li>獅尾黑體 Swei Sans <a href="https://max-everyday.com/2020/03/swei-sans/">https://max-everyday.com/2020/03/swei-sans/</a></li></ul>



<p><strong>獅尾宋體家族</strong></p>



<ul class="wp-block-list"><li>獅尾加糖宋體 Swei Sugar <a href="https://max-everyday.com/2020/11/swei-sugar/">https://max-everyday.com/2020/11/swei-sugar/</a></li><li>獅尾B2宋朝 Swei B2 Serif&nbsp;<a href="https://max-everyday.com/2020/07/swei-b2-serif/">https://max-everyday.com/2020/07/swei-b2-serif/</a></li><li>獅尾肉丸 Swei Meatball&nbsp;<a href="https://max-everyday.com/2020/06/swei-meatball/">https://max-everyday.com/2020/06/swei-meatball/</a></li><li>獅尾四季春字體 Swei Spring&nbsp;<a href="https://max-everyday.com/2020/04/swei-spring/">https://max-everyday.com/2020/04/swei-spring/</a></li></ul>



<p><strong>其他字體</strong></p>



<ul class="wp-block-list"><li>馬路口圓體 Maruko Gothic <a href="https://max-everyday.com/2021/07/maruko-gothic/">https://max-everyday.com/2021/07/maruko-gothic/</a></li><li>苦累蛙圓體 Kurewa Gothic <a href="https://max-everyday.com/2021/06/kurewa-gothic/">https://max-everyday.com/2021/06/kurewa-gothic/</a></li><li>何某手寫體 Nani Font&nbsp;<a href="https://max-everyday.com/2020/09/nanifont/">https://max-everyday.com/2020/09/nanifont/</a></li><li>內海字體 Naikai Font&nbsp;<a href="https://max-everyday.com/2020/03/naikaifont/">https://max-everyday.com/2020/03/naikaifont/</a></li><li>莫大毛筆字體 Bakudai Font&nbsp;<a href="https://max-everyday.com/2020/03/bakudaifont/">https://max-everyday.com/2020/03/bakudaifont/</a></li><li>正風毛筆字體 Masa Font&nbsp;<a href="https://max-everyday.com/2020/05/masafont/">https://max-everyday.com/2020/05/masafont/</a></li><li><span style="font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, sans-serif;">假粉圓體 Fake Pearl </span><a href="https://max-everyday.com/2020/03/open-huninn-font/">https://max-everyday.com/2020/03/open-huninn-font/</a></li><li>俊羽圓體&nbsp;Yu Pearl <a href="https://max-everyday.com/2020/03/yupearl/">https://max-everyday.com/2020/03/yupearl/</a></li></ul>



<p><strong>其他網站</strong></p>
</div></div>



<ul class="wp-block-list"><li>清松手寫體 Jason Hand Writing&nbsp;<a href="https://jasonfonts.max-everyday.com/">https://jasonfonts.max-everyday.com/</a></li><li>Max學習字體的筆記&nbsp;<a href="https://codereview.max-everyday.com/font-readme/">https://codereview.max-everyday.com/font-readme/</a></li></ul>



<hr class="wp-block-separator"/>



<p>free and carefree: 可以免費商用的中文或漢字字型<br><a href="https://tips.justfont.com/post/113397509827/freeandcarefreefonts">https://tips.justfont.com/post/113397509827/freeandcarefreefonts</a></p>



<p>免費字型新手包：<br><a href="https://www.facebook.com/lovefonts/posts/1495452330534286">https://www.facebook.com/lovefonts/posts/1495452330534286</a></p>



<figure class="wp-block-embed-facebook wp-block-embed is-type-rich is-provider-facebook"><div class="wp-block-embed__wrapper">
https://www.facebook.com/lovefonts/posts/1495452330534286
</div></figure>



<p>好心人利用思源宋體/圓體/黑體調整了一系列的免費字型：<br><a href="https://github.com/ButTaiwan?tab=repositories">https://github.com/ButTaiwan?tab=repositories</a></p>



<p>「源雲明體」<br><a href="https://github.com/ButTaiwan/genwan-font">https://github.com/ButTaiwan/genwan-font</a><br>在筆劃交接處都做了朦朧處理，彷彿墨暈或是稍微過曝的效果。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://max-everyday.com/2018/03/noto-font/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Max的拓元蛋黃酥機器人</title>
		<link>https://max-everyday.com/2018/03/tixcraft-bot/</link>
					<comments>https://max-everyday.com/2018/03/tixcraft-bot/#comments</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Thu, 01 Mar 2018 09:36:09 +0000</pubDate>
				<category><![CDATA[電腦相關應用]]></category>
		<category><![CDATA[macOS]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[免費]]></category>
		<guid isPermaLink="false">http://max-everyday.com/?p=5484</guid>

					<description><![CDATA[目前MaxBot 改名為：Max蛋黃酥上車機器人。 搶票機制，是在比誰更快送出訂單，機器人一定比人工點擊或輸入快，一般民眾在資訊技術的落差下，是被欺凌的弱勢族群，相信分享 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>目前MaxBot 改名為：Max蛋黃酥上車機器人。</p>



<p>搶票機制，是在比誰更快送出訂單，機器人一定比人工點擊或輸入快，一般民眾在資訊技術的落差下，是被欺凌的弱勢族群，相信分享MaxBot原始碼有助於改變搶票機制，是對公眾有利益的一件事。。期待未來熱門演唱會可以使用「實名制」+「抽籤制」，來讓更多民眾可以公平地購買到門票。</p>



<ul class="wp-block-list">
<li>Max搶票程式免費下載。</li>



<li>文創法第十條中的「不正方式」由於沒有明確定義，代表的是所有軟體都涉嫌違反。故在此呼籲大家，勿以身試法。</li>



<li>作者沒有意圖要他人購得的票券進行加價轉售或是使用在違法的事情上，他人的行為並不在作者的意識支配範圍之內，作者不對他人的相關的非法行為負責。</li>
</ul>



<p>讓AI成為你的學習夥伴！ChatGPT、DeepSeek、Gemini、xAI，它們能耐心指導你解決各種問題。</p>



<p>聲明：</p>



<ul class="wp-block-list">
<li>Max的拓元蛋黃酥機器人聲明<br><a href="https://max-everyday.com/2024/04/maxbot-20240418/">https://max-everyday.com/2024/04/maxbot-20240418/</a></li>



<li>Max「偽造身份證字號」後續處理及「沒有收費搶票」聲明<br><a href="https://max-everyday.com/2024/04/max-fake-id/">https://max-everyday.com/2024/04/max-fake-id/</a></li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>
]]></content:encoded>
					
					<wfw:commentRss>https://max-everyday.com/2018/03/tixcraft-bot/feed/</wfw:commentRss>
			<slash:comments>279</slash:comments>
		
		
			</item>
		<item>
		<title>最強的網路影片/mp3下載工具 Youtube-dl-gui</title>
		<link>https://max-everyday.com/2017/11/youtube-dl-gui/</link>
					<comments>https://max-everyday.com/2017/11/youtube-dl-gui/#respond</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Thu, 09 Nov 2017 03:28:36 +0000</pubDate>
				<category><![CDATA[生活小事]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">http://max-everyday.com/?p=4851</guid>

					<description><![CDATA[針對完全不懂電腦的人來說最好的解法，是使用有擋廣告功能瀏覽器來取得 Youtube 影片中的mp3，在google 使用關鍵字：youtube mp3 download  [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>針對完全不懂電腦的人來說最好的解法，是使用有擋廣告功能瀏覽器來取得 Youtube 影片中的mp3，在google 使用關鍵字：youtube mp3 download ，建議使用 yt1s 提供的服務來下載 mp3. </p>



<p>這一個透過線上取得 mp3 的解法的問題在，很多網頁下載方式不同，除了會彈出很多廣告之外，下載用的按鈕也可能寫英文，部份民眾無法理解。</p>



<p>如果你手邊有電腦，建議使用 youtube-dl 或 yt-dlp 來取得 mp3, 取得 yt-dlp , 要先下載python, 然後在提示字元環境下, 執行 python 指令：</p>



<pre class="wp-block-code"><code>python -m pip install yt-dlp</code></pre>



<p>要把影片轉 mp3 可以下載 ffmpeg, 下載傳送門:<br><a href="https://github.com/BtbN/FFmpeg-Builds/releases">https://github.com/BtbN/FFmpeg-Builds/releases</a></p>



<p>把下載的 ffmpeg.exe 放在可以被執行的 path 變數裡的項目之一, 會比較方便下指令時被存取, 例如, 把 zip 解開的 \bin\ 目錄裡的檔案都複製到 \Max\bin\  目錄之下.</p>



<p>建議新增一個 dl.bat 檔, 並把 bat 檔加入到 path 上, bat 內容:</p>



<pre class="wp-block-code"><code>yt-dlp -x --no-check-certificate --audio-format mp3 --embed-thumbnail %1</code></pre>



<p>下載 youtube 上的影片, 可以使用 dl + youtube url 或 dl + youtube 影片ID.</p>



<hr class="wp-block-separator has-css-opacity"/>



<p>透過Youtube-dl-gui 圖形化的介面，可以直接下載到網路上的 mp3 或 影片，支援的網站：facebook/youtube/pronhub/thisav &#8230;</p>



<p>「Youtube-dl」是一套強大的影音下載工具，但是需要輸入指令，才能使用，對於不知道怎麼開啟「終端機」(Ternimal)都不會的民眾來說非常的不方便，Youtube-dl-gui就解決了這個問題。</p>



<p>記得要下載或安裝 FFMpeg, 醬子才能自動轉換 mp3：<br><a href="https://ffmpeg.org/download.html">https://ffmpeg.org/download.html</a></p>



<p>youtube-dl-gui 檔案下載：</p>



<p><a href="https://github.com/MrS0m30n3/youtube-dl-gui">https://github.com/MrS0m30n3/youtube-dl-gui</a></p>



<p>youtube-dl-gui 的教學：</p>



<figure class="wp-block-image"><img decoding="async" src="https://raw.githubusercontent.com/MrS0m30n3/youtube-dl-gui/gh-pages/images/ydlg_ui.gif" alt=""/></figure>



<p>youtube-dl-gui 執行畫面截圖：</p>



<figure class="wp-block-image"><a href="http://max-everyday.com/wp-content/uploads/2017/11/Screenshot-2017-11-09-11.26.01.jpg" data-lightbox="gal[4851]"><img loading="lazy" decoding="async" width="904" height="591" src="http://max-everyday.com/wp-content/uploads/2017/11/Screenshot-2017-11-09-11.26.01.jpg" alt="" class="wp-image-4852" srcset="https://max-everyday.com/wp-content/uploads/2017/11/Screenshot-2017-11-09-11.26.01.jpg 904w, https://max-everyday.com/wp-content/uploads/2017/11/Screenshot-2017-11-09-11.26.01-500x327.jpg 500w" sizes="auto, (max-width: 904px) 100vw, 904px" /></a></figure>



<hr class="wp-block-separator has-css-opacity"/>



<h4 class="wp-block-heading" id="相關文章">相關文章：</h4>



<p>如何轉換/剪接自己上傳的 Youtube影片為 mp3<br><a href="http://max-everyday.com/2017/08/youtube-mp3/">http://max-everyday.com/2017/08/youtube-mp3/</a></p>



<figure class="wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-max的每一天"><div class="wp-block-embed__wrapper">
<blockquote class="wp-embedded-content" data-secret="CbRdb9T5CZ"><a href="https://max-everyday.com/2017/08/youtube-mp3/">如何轉換/剪接自己上傳的 Youtube影片為 mp3</a></blockquote><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="如何轉換/剪接自己上傳的 Youtube影片為 mp3 &#8212; Max的每一天" src="https://max-everyday.com/2017/08/youtube-mp3/embed/#?secret=CbRdb9T5CZ" data-secret="CbRdb9T5CZ" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
</div></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://max-everyday.com/2017/11/youtube-dl-gui/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>如何取得/轉換/剪接/合併自己上傳的 Youtube影片為 mp3</title>
		<link>https://max-everyday.com/2017/08/youtube-mp3/</link>
					<comments>https://max-everyday.com/2017/08/youtube-mp3/#respond</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Thu, 24 Aug 2017 03:17:43 +0000</pubDate>
				<category><![CDATA[生活小事]]></category>
		<category><![CDATA[macOS]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">http://max-everyday.com/?p=4389</guid>

					<description><![CDATA[這篇文章，分成4個重點，取得/轉換/剪接/合併，還有分享如何幫mp3 檔案增加封面圖片。 最好的解法，還是使用有瀏覽器＋擋廣告功能，在google 使用關鍵字：youtu [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>這篇文章，分成4個重點，取得/轉換/剪接/合併，還有分享如何幫mp3 檔案增加封面圖片。</p>



<p>最好的解法，還是使用有瀏覽器＋擋廣告功能，在google 使用關鍵字：youtube mp3 download ，建議使用 yt1s 提供的服務來下載 mp3.</p>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="1-取得youtube-上的影片">1：取得youtube 上的影片</h2>



<p>透過 youtube-dl 指令，可以取得 youtube 上的影片。</p>



<h2 class="wp-block-heading" id="2-轉換-youtube-上的影片為-mp3"><meta charset="utf-8">2：轉換 youtube 上的影片為 mp3</h2>



<p>這個功能，除了可以使用 youtube-dl 指令，一次直取得並轉換之外，如果你想要手機上取得youtube 上的影片為mp3, 也可以使用很多免費的網站，有提供線上下載的服務。</p>



<p>先在手機的YouTube 的官方 app 裡去輸入關鍵字，找到想要的歌曲或合輯。</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1024" height="553" src="https://max-everyday.com/wp-content/uploads/2021/11/13140-side-2-1024x553.jpg?v=1637555197" alt="" class="wp-image-15000" srcset="https://max-everyday.com/wp-content/uploads/2021/11/13140-side-2-1024x553.jpg?v=1637555197 1024w, https://max-everyday.com/wp-content/uploads/2021/11/13140-side-2-500x270.jpg?v=1637555197 500w, https://max-everyday.com/wp-content/uploads/2021/11/13140-side-2-1536x830.jpg?v=1637555197 1536w, https://max-everyday.com/wp-content/uploads/2021/11/13140-side-2-615x332.jpg?v=1637555197 615w, https://max-everyday.com/wp-content/uploads/2021/11/13140-side-2.jpg?v=1637555197 1951w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>再使用手機瀏覽器，在google 輸入關鍵字 youtube mp3 去查，然後在任一個查出來的網頁裡的輸入框裡貼上剛才YouTube 的網址，就可以開始轉換（或下載）該首歌的mp3 檔案在手機裡。</p>



<p>建議使用brave 瀏覽器來操作，會比較不會看到廣告，也可以使用brave瀏覽器去YouTube 網站，<meta charset="utf-8">brave 瀏覽器除了可以背景播放音樂之外，而且還不會有廣告，超讚的！</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="647" src="https://max-everyday.com/wp-content/uploads/2021/11/13142-side-1024x647.jpg?v=1637555716" alt="" class="wp-image-15001" srcset="https://max-everyday.com/wp-content/uploads/2021/11/13142-side-1024x647.jpg?v=1637555716 1024w, https://max-everyday.com/wp-content/uploads/2021/11/13142-side-500x316.jpg?v=1637555716 500w, https://max-everyday.com/wp-content/uploads/2021/11/13142-side-1536x971.jpg?v=1637555716 1536w, https://max-everyday.com/wp-content/uploads/2021/11/13142-side-615x389.jpg?v=1637555716 615w, https://max-everyday.com/wp-content/uploads/2021/11/13142-side.jpg?v=1637555716 1668w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>透過手機備份自己所拍攝的影片很方便，如果想在電腦裡下載自己行上的影片，可以透過外部指令 youtube-dl + youtube 網址即可下載到自己上傳的影片，進而可以剪輯影片內容。</p>



<hr class="wp-block-separator"/>



<p>youtube-dl的指令，也可以把「自己上傳」到網路上的影片轉成 mp3:</p>



<pre class="wp-block-preformatted">youtube-dl -x --no-check-certificate --audio-format mp3 -f 'bestaudio[ext=m4a]' --embed-thumbnail --no-check-certificate &lt;video URL&gt;</pre>



<hr class="wp-block-separator"/>



<p>如果覺得上面指令太長，就寫一個 shell script（批次檔）如下：</p>



<p>Mac OS/Linux:</p>



<pre class="wp-block-preformatted">#!/bin/bash
youtube-dl -x <meta charset="utf-8">--no-check-certificate --audio-format mp3 -f 'bestaudio[ext=m4a]' --embed-thumbnail --no-check-certificate ${1}</pre>



<p>Windows</p>



<pre class="wp-block-preformatted">@youtube-dl -x <meta charset="utf-8">--no-check-certificate --audio-format mp3 -f 'bestaudio[ext=m4a]' --embed-thumbnail --no-check-certificate %1</pre>



<p>Linux 之下，要記得執行：</p>



<pre class="wp-block-preformatted">chmod +x dl.sh</pre>



<p>這樣子，檔案才能被執行。</p>



<hr class="wp-block-separator"/>



<p>youtube-dl 的關於解碼聲音的說：</p>



<pre class="wp-block-preformatted">Post-processing Options:
 -x, --extract-audio Convert video files to audio-only files (requires ffmpeg or avconv and
 ffprobe or avprobe)
 --audio-format FORMAT Specify audio format: "best", "aac", "flac", "mp3", "m4a", "opus",
 "vorbis", or "wav"; "best" by default; No effect without -x
 --audio-quality QUALITY Specify ffmpeg/avconv audio quality, insert a value between 0 (better)
 and 9 (worse) for VBR or a specific bitrate like 128K (default 5)</pre>



<hr class="wp-block-separator"/>



<p>建議的作法：(以 Mac OS X 為例）</p>



<p><strong>1： 安裝 youtube-dl</strong><br><a href="https://rg3.github.io/youtube-dl/download.html">https://rg3.github.io/youtube-dl/download.html</a></p>



<pre class="wp-block-preformatted">brew install&nbsp;youtube-dl</pre>



<p>使用方法：</p>



<p>youtube-dl ＋ URL</p>



<p>附註：</p>



<p>youtube-dl 比你想像中的還強，除了可以備份自己上傳到 youtube 或 facebook 之外，你所上傳到其他知名「影音」網站上公開的影片都可以備份下載。</p>



<p><strong>2：安裝 ffmpeg</strong><br><a href="https://www.ffmpeg.org/download.html">https://www.ffmpeg.org/download.html</a></p>



<pre class="wp-block-preformatted">brew install ffmpeg</pre>



<p>使用方法：</p>



<pre class="wp-block-code"><code>ffmpeg -i input.mp4 output.mp3</code></pre>



<p>附註：由於 ffmpeg 和  youtube 定前都會更新版本，所以建議遇到有問題的時候，先升級到最新版本試看看，更新方法：</p>



<pre class="wp-block-preformatted">brew update
brew upgrade</pre>



<p>錯誤排除的方法，如果遇到顯示這個錯誤：</p>



<p>[debug] ffmpeg command line: ffprobe -show_streams &#8216;file:The Chainsmokers 老菸槍 &amp; Coldplay 酷玩樂團 _. Something Just Like This&nbsp; 如此而已 中文字幕-WslMtygxznQ.mp4&#8217;</p>



<p>ERROR: WARNING: unable to obtain file audio codec with ffprobe</p>



<p>請先下指令：</p>



<pre class="wp-block-preformatted">youtube-dl <strong>-v</strong> -x URL</pre>



<p>透過-v 參數來輸出 debug 資訊，可以看到實際下載的影片網址，結果點進去，真的就沒有聲音的版本，所以透過下列的指令，也無法把youtube-dl 下載下來的 mp4  轉成 mp3：</p>



<pre class="wp-block-preformatted">ffmpeg -i 檔名.mp4 檔名.mp3</pre>



<p>如果想知道，youtube 上面提供了那一些的格式，可以使用指令：</p>



<pre class="wp-block-preformatted">youtube-dl -x --no-check-certificate -F URL</pre>



<p>結果：</p>



<pre class="wp-block-preformatted">[info] Available formats for WslMtygxznQ:
 format code  extension  resolution note
 249          webm       audio only DASH audio   60k , opus @ 50k, 1.47MiB
 250          webm       audio only DASH audio   78k , opus @ 70k, 1.95MiB
 140          m4a        audio only DASH audio  128k , m4a_dash container, mp4a.40.2@128k, 3.75MiB
 394          mp4        audio only 144p  134k , 30fps, 1.80MiB
 171          webm       audio only DASH audio  137k , vorbis@128k, 3.78MiB
 251          webm       audio only DASH audio  144k , opus @160k, 3.83MiB
 395          mp4        audio only 240p  152k , 30fps, 1.72MiB
 396          mp4        audio only 360p  252k , 30fps, 2.97MiB
 397          mp4        audio only 480p  391k , 30fps, 4.93MiB
 398          mp4        audio only 720p  772k , 30fps, 11.77MiB
 160          mp4        256x144    144p   41k , avc1.4d400c, 30fps, video only, 859.74KiB
 278          webm       256x144    144p   91k , webm container, vp9, 30fps, video only, 2.19MiB
 133          mp4        426x240    240p   95k , avc1.4d4015, 30fps, video only, 1.80MiB
 242          webm       426x240    240p  119k , vp9, 30fps, video only, 2.29MiB
 134          mp4        640x360    360p  188k , avc1.4d401e, 30fps, video only, 3.71MiB
 243          webm       640x360    360p  213k , vp9, 30fps, video only, 4.06MiB
 244          webm       854x480    480p  309k , vp9, 30fps, video only, 6.18MiB
 135          mp4        854x480    480p  317k , avc1.4d401f, 30fps, video only, 6.04MiB
 136          mp4        1280x720   720p  594k , avc1.4d401f, 30fps, video only, 10.78MiB
 247          webm       1280x720   720p  601k , vp9, 30fps, video only, 10.37MiB
 18           mp4        640x360    medium , avc1.42001E, mp4a.40.2@ 96k, 10.63MiB (best)</pre>



<p>可以發現，畫質最佳的 1280&#215;720 webm 格式是沒有聲音的，也是造成預設參數的情況下，取得無聲影片的結果。</p>



<p>-F 會列出所以格式(format code)，-f 是去下載特定的格式。如果想要下載特定的格式。</p>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="mp3-轉成-amr">.mp3 轉成 .amr</h2>



<p>透過 ffmpeg 也可以把聲音轉換為 .amr 格式。</p>



<p>The Adaptive Multi-Rate (AMR) codec is an audio compression format enhanced for speech coding.<br><a href="https://en.wikipedia.org/wiki/Adaptive_Multi-Rate_audio_codec">https://en.wikipedia.org/wiki/Adaptive_Multi-Rate_audio_codec</a></p>



<p>只是透過 ffmpeg 所轉換的 .amr sample rate &#8220;只有&#8221; 8000, 音質快吐血，而且只支援單聲道。轉成 .amr 的指令：</p>



<pre class="wp-block-preformatted">ffmpeg -i mfile.mp3 -ar 8000 -ac 1 audio.amr</pre>



<hr class="wp-block-separator"/>



<p>下面是 youtube-dl 的官方英文說明：</p>



<h1 class="wp-block-heading" id="format-selection">FORMAT SELECTION</h1>



<p>By default youtube-dl tries to download the best available quality, i.e. if you want the best quality you&nbsp;<strong>don&#8217;t need</strong>&nbsp;to pass any special options, youtube-dl will guess it for you by&nbsp;<strong>default</strong>.</p>



<p>But sometimes you may want to download in a different format, for example when you are on a slow or intermittent connection. The key mechanism for achieving this is so-called&nbsp;<em>format selection</em>&nbsp;based on which you can explicitly specify desired format, select formats based on some criterion or criteria, setup precedence and much more.</p>



<p>The general syntax for format selection is&nbsp;<code>--format FORMAT</code>&nbsp;or shorter&nbsp;<code>-f FORMAT</code>&nbsp;where&nbsp;<code>FORMAT</code>&nbsp;is a&nbsp;<em>selector expression</em>, i.e. an expression that describes format or formats you would like to download.</p>



<p><strong>tl;dr:</strong>&nbsp;<a href="https://github.com/ytdl-org/youtube-dl/blob/master/README.md#format-selection-examples">navigate me to examples</a>.</p>



<p>The simplest case is requesting a specific format, for example with&nbsp;<code>-f 22</code>&nbsp;you can download the format with format code equal to 22. You can get the list of available format codes for particular video using&nbsp;<code>--list-formats</code>&nbsp;or&nbsp;<code>-F</code>. Note that these format codes are extractor specific.</p>



<p>You can also use a file extension (currently&nbsp;<code>3gp</code>,&nbsp;<code>aac</code>,&nbsp;<code>flv</code>,&nbsp;<code>m4a</code>,&nbsp;<code>mp3</code>,&nbsp;<code>mp4</code>,&nbsp;<code>ogg</code>,&nbsp;<code>wav</code>,&nbsp;<code>webm</code>&nbsp;are supported) to download the best quality format of a particular file extension served as a single file, e.g.&nbsp;<code>-f webm</code>&nbsp;will download the best quality format with the&nbsp;<code>webm</code>&nbsp;extension served as a single file.</p>



<p>You can also use special names to select particular edge case formats:</p>



<ul class="wp-block-list"><li><code>best</code>: Select the best quality format represented by a single file with video and audio.</li><li><code>worst</code>: Select the worst quality format represented by a single file with video and audio.</li><li><code>bestvideo</code>: Select the best quality video-only format (e.g. DASH video). May not be available.</li><li><code>worstvideo</code>: Select the worst quality video-only format. May not be available.</li><li><code>bestaudio</code>: Select the best quality audio only-format. May not be available.</li><li><code>worstaudio</code>: Select the worst quality audio only-format. May not be available.</li></ul>



<p>For example, to download the worst quality video-only format you can use&nbsp;<code>-f worstvideo</code>.</p>



<p>If you want to download multiple videos and they don&#8217;t have the same formats available, you can specify the order of preference using slashes. Note that slash is left-associative, i.e. formats on the left hand side are preferred, for example&nbsp;<code>-f 22/17/18</code>&nbsp;will download format 22 if it&#8217;s available, otherwise it will download format 17 if it&#8217;s available, otherwise it will download format 18 if it&#8217;s available, otherwise it will complain that no suitable formats are available for download.</p>



<p>If you want to download several formats of the same video use a comma as a separator, e.g.&nbsp;<code>-f 22,17,18</code>&nbsp;will download all these three formats, of course if they are available. Or a more sophisticated example combined with the precedence feature:&nbsp;<code>-f 136/137/mp4/bestvideo,140/m4a/bestaudio</code>.</p>



<p>You can also filter the video formats by putting a condition in brackets, as in&nbsp;<code>-f "best[height=720]"</code>&nbsp;(or&nbsp;<code>-f "[filesize&gt;10M]"</code>).</p>



<p>The following numeric meta fields can be used with comparisons&nbsp;<code>&lt;</code>,&nbsp;<code>&lt;=</code>,&nbsp;<code>&gt;</code>,&nbsp;<code>&gt;=</code>,&nbsp;<code>=</code>&nbsp;(equals),&nbsp;<code>!=</code>&nbsp;(not equals):</p>



<ul class="wp-block-list"><li><code>filesize</code>: The number of bytes, if known in advance</li><li><code>width</code>: Width of the video, if known</li><li><code>height</code>: Height of the video, if known</li><li><code>tbr</code>: Average bitrate of audio and video in KBit/s</li><li><code>abr</code>: Average audio bitrate in KBit/s</li><li><code>vbr</code>: Average video bitrate in KBit/s</li><li><code>asr</code>: Audio sampling rate in Hertz</li><li><code>fps</code>: Frame rate</li></ul>



<p>Also filtering work for comparisons&nbsp;<code>=</code>&nbsp;(equals),&nbsp;<code>^=</code>&nbsp;(starts with),&nbsp;<code>$=</code>&nbsp;(ends with),&nbsp;<code>*=</code>&nbsp;(contains) and following string meta fields:</p>



<ul class="wp-block-list"><li><code>ext</code>: File extension</li><li><code>acodec</code>: Name of the audio codec in use</li><li><code>vcodec</code>: Name of the video codec in use</li><li><code>container</code>: Name of the container format</li><li><code>protocol</code>: The protocol that will be used for the actual download, lower-case (<code>http</code>,&nbsp;<code>https</code>,&nbsp;<code>rtsp</code>,&nbsp;<code>rtmp</code>,&nbsp;<code>rtmpe</code>,&nbsp;<code>mms</code>,&nbsp;<code>f4m</code>,&nbsp;<code>ism</code>,&nbsp;<code>http_dash_segments</code>,&nbsp;<code>m3u8</code>, or&nbsp;<code>m3u8_native</code>)</li><li><code>format_id</code>: A short description of the format</li></ul>



<p>Any string comparison may be prefixed with negation&nbsp;<code>!</code>&nbsp;in order to produce an opposite comparison, e.g.&nbsp;<code>!*=</code>&nbsp;(does not contain).</p>



<p>Note that none of the aforementioned meta fields are guaranteed to be present since this solely depends on the metadata obtained by particular extractor, i.e. the metadata offered by the video hoster.</p>



<p>Formats for which the value is not known are excluded unless you put a question mark (<code>?</code>) after the operator. You can combine format filters, so&nbsp;<code>-f "[height &lt;=? 720][tbr&gt;500]"</code>&nbsp;selects up to 720p videos (or videos where the height is not known) with a bitrate of at least 500 KBit/s.</p>



<p>You can merge the video and audio of two formats into a single file using&nbsp;<code>-f &lt;video-format&gt;+&lt;audio-format&gt;</code>(requires ffmpeg or avconv installed), for example&nbsp;<code>-f bestvideo+bestaudio</code>&nbsp;will download the best video-only format, the best audio-only format and mux them together with ffmpeg/avconv.</p>



<p>Format selectors can also be grouped using parentheses, for example if you want to download the best mp4 and webm formats with a height lower than 480 you can use&nbsp;<code>-f '(mp4,webm)[height&lt;480]'</code>.</p>



<p>Since the end of April 2015 and version 2015.04.26, youtube-dl uses&nbsp;<code>-f bestvideo+bestaudio/best</code>&nbsp;as the default format selection (see&nbsp;<a href="https://github.com/ytdl-org/youtube-dl/issues/5447">#5447</a>,&nbsp;<a href="https://github.com/ytdl-org/youtube-dl/issues/5456">#5456</a>). If ffmpeg or avconv are installed this results in downloading&nbsp;<code>bestvideo</code>&nbsp;and&nbsp;<code>bestaudio</code>&nbsp;separately and muxing them together into a single file giving the best overall quality available. Otherwise it falls back to&nbsp;<code>best</code>&nbsp;and results in downloading the best available quality served as a single file.&nbsp;<code>best</code>&nbsp;is also needed for videos that don&#8217;t come from YouTube because they don&#8217;t provide the audio and video in two different files. If you want to only download some DASH formats (for example if you are not interested in getting videos with a resolution higher than 1080p), you can add&nbsp;<code>-f bestvideo[height&lt;=?1080]+bestaudio/best</code>&nbsp;to your configuration file. Note that if you use youtube-dl to stream to&nbsp;<code>stdout</code>&nbsp;(and most likely to pipe it to your media player then), i.e. you explicitly specify output template as&nbsp;<code>-o -</code>, youtube-dl still uses&nbsp;<code>-f best</code>&nbsp;format selection in order to start content delivery immediately to your player and not to wait until&nbsp;<code>bestvideo</code>&nbsp;and&nbsp;<code>bestaudio</code>&nbsp;are downloaded and muxed.</p>



<p>If you want to preserve the old format selection behavior (prior to youtube-dl 2015.04.26), i.e. you want to download the best available quality media served as a single file, you should explicitly specify your choice with&nbsp;<code>-f best</code>. You may want to add it to the&nbsp;<a href="https://github.com/ytdl-org/youtube-dl/blob/master/README.md#configuration">configuration file</a>&nbsp;in order not to type it every time you run youtube-dl.</p>



<h4 class="wp-block-heading" id="format-selection-examples"><a href="https://github.com/ytdl-org/youtube-dl/blob/master/README.md#format-selection-examples"></a>Format selection examples</h4>



<p>Note that on Windows you may need to use double quotes instead of single.</p>



<pre class="wp-block-preformatted"># Download best mp4 format available or any other best if no mp4 available
$ youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'

# Download best format available but no better than 480p
$ youtube-dl -f 'bestvideo[height&lt;=480]+bestaudio/best[height&lt;=480]'

# Download best video only format but no bigger than 50 MB
$ youtube-dl -f 'best[filesize&lt;50M]'

# Download best format available via direct link over HTTP/HTTPS protocol
$ youtube-dl -f '(bestvideo+bestaudio/best)[protocol^=http]'

# Download the best video format and the best audio format without merging them
$ youtube-dl -f 'bestvideo,bestaudio' -o '%(title)s.f%(format_id)s.%(ext)s'</pre>



<p>Note that in the last example, an output template is recommended as bestvideo and bestaudio may have the same file name.</p>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="3-剪接-mp3">3：剪接 mp3</h2>



<p>我們想要取影片中的一小段時&#8230; 可以利用ffmpeg下個指令就好了</p>



<pre class="wp-block-preformatted">ffmpeg -ss 00:20:48.500 -t 00:01:00 -i INPUT.mp4 OUTPUT.mp4</pre>



<ul class="wp-block-list"><li><strong>-ss</strong> 是指影片的第幾分幾秒開始剪</li><li><strong>-t</strong> 是指要剪多少時間, 如果不使用就會直接到檔案最後。</li><li><strong>-acodec copy -vcodec copy</strong> 這個參數不是預設值，沒有下的話會變成預設的編碼，會很慢。</li></ul>



<p>較佳解法：</p>



<pre class="wp-block-preformatted">ffmpeg -ss 開始時間 -t 長度 -i 原來檔案.mp4 -acodec copy -vcodec copy 輸出檔案.mp4</pre>



<p class="has-luminous-vivid-amber-background-color has-background">服用了參數 <strong>-acodec copy -vcodec copy</strong> ，剪接即使是 2～3小時的mp3，幾乎都是一秒內搞定。如果來源檔是mp3就不用加上面這個參數，反正一下子就處理完了，是為了要處理超長的影片才需要使用。</p>



<p>附註：-acode copy 的參數，要「夾在」第二個檔案的前面，沒辦法在最前面加，或加在最後面，這一點有點怪怪的！</p>



<hr class="wp-block-separator"/>



<p><strong>範例1：直接全部內容轉mp3</strong></p>



<pre class="wp-block-preformatted">ffmpeg -i video.mp4 audio.mp3</pre>



<p><strong>範例2：mp3第10秒起,剪下6秒</strong></p>



<pre class="wp-block-preformatted">ffmpeg -ss 10 -i input.mp3 -t 6 output.mp3</pre>



<p><strong>範例3：mp3去掉前30秒</strong></p>



<pre class="wp-block-preformatted">ffmpeg -ss 30 -i inputfile.mp3 outputfile.mp3</pre>



<p>-ss 是指影片的第幾分幾秒開始剪<br>-t 是指要剪多少時間</p>



<p>要去掉尾部的秒數，直接使用 -t 參數。</p>



<p><strong>範例4：mp3 增加縮圖</strong></p>



<p>詳細用法參考：<br><a href="https://www.ffmpeg.org/ffmpeg.html#toc-Main-options">https://www.ffmpeg.org/ffmpeg.html#toc-Main-options</a></p>



<pre class="wp-block-preformatted">ffmpeg -i in.mp3 -i in.jpg -map 1 -map 0 -c copy -disposition:0 attached_pic out.mp3</pre>



<p>如果想要取得youtube 影片的縮圖，可以google 關鍵字 download youtube thumbnail ，有很多類似服務的網站，例如：<br><a href="https://youtube-thumbnail-grabber.com/">https://youtube-thumbnail-grabber.com/</a></p>



<hr class="wp-block-separator"/>



<p>例如我有一部影片檔案大小 4.7GB 要分割成 2個小檔案，所以分別執行下面二行指令即可完成任務：</p>



<ul class="wp-block-list"><li>前1小時，切成一個獨立檔案：
ffmpeg -t 01:00:00 -i 蟻人1.Ant.Man.\(2015\).mp4 -acodec copy -vcodec copy output1.mp4
</li><li>
第2個小時到最後，切成一個獨立檔案：<br>ffmpeg -ss 01:00:00&nbsp; -i 蟻人1.Ant.Man.\(2015\).mp4 -acodec copy -vcodec copy output2.mp4
</li></ul>



<hr class="wp-block-separator"/>



<p>剪輯多音軌範例：</p>



<pre class="wp-block-preformatted"># fmpeg -i input.mkv

ffmpeg version ... Copyright (c) 2000-2012 the FFmpeg developers
...
Input #0, matroska,webm, from 'input.mkv':
  Duration: 01:39:44.02, start: 0.000000, bitrate: 5793 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x800, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0:1(ger): Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 1536 kb/s (default)
    Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 1536 kb/s
    Stream #0:3(ger): Subtitle: text (default)
At least one output file must be specified</pre>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="Example1">Example 1</h2>



<p>Now, let&#8217;s say we want to:</p>



<ul class="wp-block-list"><li>copy video stream</li><li>encode german audio stream to mp3 (128kbps) and aac (96kbps) (creating 2 audio streams in the output)</li><li>drop english audio stream</li><li>copy subtitle stream</li></ul>



<p>This can be done using the following FFmpeg command line:</p>



<pre class="wp-block-preformatted">ffmpeg -i input.mkv \
    -map 0:0 -map 0:1 -map 0:1 -map 0:3 \
    -c:v copy \
    -c:a:0 libmp3lame -b:a:0 128k \
    -c:a:1 libfaac -b:a:1 96k \
    -c:s copy \
    output.mkv
</pre>



<p><em>Note there is no &#8220;-map 0:2&#8221; and that &#8220;-map 0:1&#8221; has been specified twice.</em></p>



<p>Using &#8220;-map 0:0 -map 0:1 -map 0:1 -map 0:3&#8221; we told FFmpeg to select/map specified input streams to output in that order.</p>



<p>So, our output will now have the following streams:</p>



<pre class="wp-block-preformatted">Output #0, matroska, to 'output.mkv':
    Stream #0:0(eng): Video ...
    Stream #0:1(ger): Audio ...
    Stream #0:2(ger): Audio ...
    Stream #0:3(ger): Subtitle ...
</pre>



<p>After we selected which streams we would like in our output, using &#8220;-map&#8221; option, we specified codecs for each stream in our output.</p>



<p>Video and subtitle stream have just been copied and german audio stream has been encoded to 2 new audio streams, mp3 and aac.</p>



<p>We used &#8220;-c:a:0&#8221; to specify codec for the output&#8217;s first AUDIO stream and &#8220;-c:a:1&#8221; to specify codec for the output&#8217;s second AUDIO stream.</p>



<p><em>Note that &#8220;a:0&#8221; refers to the output&#8217;s first AUDIO stream (#0:1 in our case), &#8220;a:1&#8221; refers to the output&#8217;s 2nd AUDIO stream (which is also mapped to the input stream&nbsp;#0:1), etc.</em></p>



<p>The result will be:</p>



<pre class="wp-block-preformatted">Output #0, matroska, to 'output.mkv':
    Stream #0:0(eng): Video ...
    Stream #0:1(ger): Audio ...
    Stream #0:2(ger): Audio ...
    Stream #0:3(ger): Subtitle ...
Stream mapping:
  Stream #0:0 -&gt; #0:0 (copy)
  Stream #0:1 -&gt; #0:1 (dca -&gt; libmp3lame)
  Stream #0:2 -&gt; #0:2 (dca -&gt; libfaac)
  Stream #0:3 -&gt; #0:3 (copy)
</pre>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="Example2">Example 2</h2>



<p>Let&#8217;s say that we want to reorder input streams backwards, so that we have output like this:</p>



<pre class="wp-block-preformatted">    Stream #0:0(ger): Subtitle: text (default)
    Stream #0:1(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 1536 kb/s
    Stream #0:2(ger): Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 1536 kb/s (default)
    Stream #0:3(eng): Video: h264 (High), yuv420p, 1920x800, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
</pre>



<p>This can simply be done using the following command line:</p>



<pre class="wp-block-preformatted">ffmpeg -i input.mkv -map 0:3 -map 0:2 -map 0:1 -map 0:0 -c copy output.mkv
</pre>



<p><em>Note that we specified all the input streams, but in the reverse order, which causes that order to be respected in the output.</em></p>



<p>The option &#8220;-c copy&#8221; tells FFmpeg to use &#8220;copy&#8221; on all streams.</p>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="Example3">Example 3</h2>



<p>If we want to extract only audio streams, from the same input file, then we can do it like this:</p>



<pre class="wp-block-preformatted">ffmpeg -i input.mkv -map 0:1 -map 0:2 -c copy output.mkv
</pre>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="Example4">Example 4</h2>



<p>If we want to re-encode just the video streams, but copy all the other streams (like audio, subtitles, attachments, etc), we might use something like this:</p>



<pre class="wp-block-preformatted">ffmpeg -i input.mkv -map 0 -c copy -c:v mpeg2video output.mkv
</pre>



<p>It will tell ffmpeg to:</p>



<ul class="wp-block-list"><li>read the input file &#8216;input.mkv&#8217;</li><li>select all the input streams (first input = 0) to be processed (using &#8220;-map 0&#8221;)</li><li>mark all the streams to be just copied to the output (using &#8220;-c copy&#8221;)</li><li>mark just the video streams to be re-encoded (using &#8220;-c:v mpeg2video&#8221;)</li><li>write the output file &#8216;output.mkv&#8217;</li></ul>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="Example5">Example 5</h2>



<p>You can use the &#8220;-map&#8221; command in creating multiple output files, ex:</p>



<pre class="wp-block-preformatted">ffmpeg -i input.mkv -map 0:1 -map 0:2 audios_only.mkv -map 0:0 video_only.mkv
</pre>



<p>The default is to map the &#8220;highest quality video&#8221; and &#8220;highest quality audio&#8221; to each output file (basically reuses it for each output), see also&nbsp;<a href="http://trac.ffmpeg.org/wiki/Creating%20multiple%20outputs">Creating multiple outputs</a>.</p>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="Example6">Example 6</h2>



<p>You can use the named output of a filtergraph as a mapping parameter, ex:</p>



<pre class="wp-block-preformatted">ffmpeg -i INPUT -filter_complex "[0] scale=100x100[smaller_sized]"  -map "[smaller_sized]" out.mp4
</pre>



<p>which (in our example) is the same as specifying the stream more precisely, and equivalent to this</p>



<pre class="wp-block-preformatted">ffmpeg -i INPUT -filter_complex "[0:0] scale=100x100[smaller_sized]"  -map "[smaller_sized]" out.mp4
</pre>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="Example7">Example 7</h2>



<p>There are stream selection shortcuts you can also use like &#8220;0:v&#8221;</p>



<pre class="wp-block-preformatted">ffmpeg -i input -map 0:v -map 0:a output.mkv # chooses video and audio from input 0
</pre>



<p>See&nbsp;<a href="http://ffmpeg.org/ffmpeg.html#Stream-specifiers">​stream specifiers</a>&nbsp;for details.</p>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="Example8">Example 8</h2>



<p>MPEG stream selection:</p>



<p>The tricky part with selecting from MPEG TS is it may contain multiple streams/channels, and if you are receiving &#8220;live data&#8221; just specifying an index might not work because it can change from run to run, so</p>



<pre class="wp-block-preformatted">ffmpeg -i INPUT -map 0:6 OUTPUT # might not work the same every run, DO NOT USE THIS WAY!
</pre>



<p>Assuming your file is MPEG, you can run &#8220;ffmpeg -i INPUT&#8221; (not specify an output) to see what program id&#8217;s and stream id&#8217;s it contains, like this example (probesize and analyzeduration specified to help &#8220;make sure&#8221; it picks up all the streams in it, may not be always needed)</p>



<pre class="wp-block-preformatted">$ ffmpeg -probesize 50M -analyzeduration 50M -i INPUT
...
Input #0, mpegts, from 'INPUT':
  Duration: N/A, start: 22159.226833, bitrate: N/A
  Program 1344
    Metadata:
      service_name    : 7 Digital
      service_provider: Seven Network
    Stream #0:0[0x401]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max. 14950 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x402](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 256 kb/s
  Program 1346
    Metadata:
      service_name    : 7TWO
      service_provider: Seven Network
    Stream #0:3[0x406]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:6[0x421]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max. 14950 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:7[0x422](eng): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 192 kb/s
    Stream #0:8[0x424](eng): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
    Stream #0:4[0x499]: Unknown: none ([11][0][0][0] / 0x000B)
</pre>



<p>you could specify desired streams by program id:</p>



<pre class="wp-block-preformatted">ffmpeg -i INPUT -map 0:p:1344 OUTPUT # pulls in both inputs from program 1344, channel "7 Digital" in this case
</pre>



<p>or specify a child stream:</p>



<pre class="wp-block-preformatted">ffmpeg -i INPUT -map i:0x401 OUTPUT # pulls in the single input stream with PID (MPEG Packet ID [stream identifier]) 0x401 from wherever it is found, in this case its a video stream in "7 Digital"
</pre>



<p>or similar, see other specifier examples. Note if you have &#8220;unknown&#8221; streams in there you may need to add the -ignore_unknown flag as well.</p>



<p>Also note that if your input stream contains multiple program id&#8217;s, you can record simultaneously from various of them, using the same FFmpeg instance and the map commands described here.</p>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="Example9">Example 9</h2>



<p>Include &#8220;all&#8221; inputs to the output. The default behavior is to copy only one audio and one video channel. If you want to copy &#8216;all&#8217; channels, use &#8220;-map&#8221;</p>



<pre class="wp-block-preformatted"># re encodes all video and audio channels from input one
ffmpeg -i input -map 0 output.mp4 

# copies all video and audio channels from input one to output, not just one video
ffmpeg -i input -map 0 -c copy output.mp4 </pre>



<p>範例9 號滿實用的，因為使用參數：-acodec copy -vcodec copy 只會輸出第一個音軌, 如果使用&nbsp;-map 0 -c copy 則可以輸出所有音軌出來。</p>



<p>要知道多媒體檔案的資訊，可以「不放輸出檔案的參數」，即可取得所有 stream 的資訊。</p>



<hr class="wp-block-separator"/>



<p>轉檔，透過 bitrate 縮小檔案:</p>



<p>The typical example would be something like this:</p>



<pre class="wp-block-preformatted">ffmpeg -i input -c:v libx264 -b:v 2M -maxrate 2M -bufsize 1M output.mp4</pre>



<hr class="wp-block-separator"/>



<p>由於youtube 會有很多個編碼格式，youtube-dl 可能猜測的不是最佳的，或是最佳的格式並不適合你的播放器，你可以先用參數 &#8211;list-formats (或使用 -F)去取得最佳格式：</p>



<pre class="wp-block-preformatted">--list-formats</pre>



<p>針對 resolution note 選取偏愛的 format code 再使用參數 &#8211;format (或使用 -f)去取得影片：</p>



<pre class="wp-block-preformatted">--format</pre>



<hr class="wp-block-separator"/>



<p>增加音軌到影片檔案：</p>



<p>FFMPEG add additional audio track in video (mix 2 audio)</p>



<pre class="wp-block-preformatted">ffmpeg -i video.mp4 -i audio.wav -c:v copy -c:a copy -strict experimental output.mp4</pre>



<p>Here, we assume that the video file does not contain any audio stream yet, and that you want to have the same output format (here, MP4) as the input format.</p>



<p>The above command transcodes the audio, since MP4s cannot carry PCM audio streams. You can use any other desired audio codec if you want. See the&nbsp;<a href="http://trac.ffmpeg.org/wiki/AACEncodingGuide">AAC Encoding Guide</a>&nbsp;for more info.</p>



<p>If your audio or video stream is longer, you can add the&nbsp;<code>-shortest</code>&nbsp;option so that ffmpeg will stop encoding once one file ends.</p>



<hr class="wp-block-separator"/>



<h3 class="wp-block-heading" id="copying-the-audio-without-re-encoding">Copying the audio without re-encoding</h3>



<p>If your output container can handle (almost) any codec – like MKV – then you can simply copy both audio and video streams:</p>



<pre class="wp-block-code"><code>ffmpeg -i video.mp4 -i audio.wav -c copy output.mkv
</code></pre>



<h3 class="wp-block-heading" id="replacing-audio-stream">Replacing audio stream</h3>



<p>If your input video already contains audio, and you want to replace it, you need to tell ffmpeg which audio stream to take:</p>



<pre class="wp-block-code"><code>ffmpeg -i video.mp4 -i audio.wav \
-c:v copy -c:a aac -strict experimental \
-map 0:v:0 -map 1:a:0 output.mp4
</code></pre>



<p>The&nbsp;<a href="https://trac.ffmpeg.org/wiki/How%20to%20use%20-map%20option"><code>map</code>&nbsp;option</a>&nbsp;makes ffmpeg only use the first video stream from the first input and the first audio stream from the second input for the output file.</p>



<hr class="wp-block-separator"/>



<p>附註 youtube-dl 完整參數：</p>



<figure class="wp-block-embed"><div class="wp-block-embed__wrapper">
https://github.com/rg3/youtube-dl/blob/master/README.md#options
</div></figure>



<p><strong>youtube-dl</strong>&nbsp;is a command-line program to download videos from YouTube.com and a few more sites. It requires the Python interpreter, version 2.6, 2.7, or 3.2+, and it is not platform specific. It should work on your Unix box, on Windows or on Mac OS X. It is released to the public domain, which means you can modify it, redistribute it or use it however you like.</p>



<pre class="wp-block-code"><code>youtube-dl &#91;OPTIONS] URL &#91;URL...]
</code></pre>



<h1 class="wp-block-heading" id="options">OPTIONS</h1>



<pre class="wp-block-code"><code>-h, --help                       Print this help text and exit
--version                        Print program version and exit
-U, --update                     Update this program to latest version. Make
                                 sure that you have sufficient permissions
                                 (run with sudo if needed)
-i, --ignore-errors              Continue on download errors, for example to
                                 skip unavailable videos in a playlist
--abort-on-error                 Abort downloading of further videos (in the
                                 playlist or the command line) if an error
                                 occurs
--dump-user-agent                Display the current browser identification
--list-extractors                List all supported extractors
--extractor-descriptions         Output descriptions of all supported
                                 extractors
--force-generic-extractor        Force extraction to use the generic
                                 extractor
--default-search PREFIX          Use this prefix for unqualified URLs. For
                                 example "gvsearch2:" downloads two videos
                                 from google videos for youtube-dl "large
                                 apple". Use the value "auto" to let
                                 youtube-dl guess ("auto_warning" to emit a
                                 warning when guessing). "error" just throws
                                 an error. The default value "fixup_error"
                                 repairs broken URLs, but emits an error if
                                 this is not possible instead of searching.
--ignore-config                  Do not read configuration files. When given
                                 in the global configuration file
                                 /etc/youtube-dl.conf: Do not read the user
                                 configuration in ~/.config/youtube-
                                 dl/config (%APPDATA%/youtube-dl/config.txt
                                 on Windows)
--config-location PATH           Location of the configuration file; either
                                 the path to the config or its containing
                                 directory.
--flat-playlist                  Do not extract the videos of a playlist,
                                 only list them.
--mark-watched                   Mark videos watched (YouTube only)
--no-mark-watched                Do not mark videos watched (YouTube only)
--no-color                       Do not emit color codes in output
</code></pre>



<h2 class="wp-block-heading" id="network-options">Network Options:</h2>



<pre class="wp-block-code"><code>--proxy URL                      Use the specified HTTP/HTTPS/SOCKS proxy.
                                 To enable experimental SOCKS proxy, specify
                                 a proper scheme. For example
                                 socks5://127.0.0.1:1080/. Pass in an empty
                                 string (--proxy "") for direct connection
--socket-timeout SECONDS         Time to wait before giving up, in seconds
--source-address IP              Client-side IP address to bind to
-4, --force-ipv4                 Make all connections via IPv4
-6, --force-ipv6                 Make all connections via IPv6
</code></pre>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="geo-restriction">Geo Restriction:</h2>



<pre class="wp-block-code"><code>--geo-verification-proxy URL     Use this proxy to verify the IP address for
                                 some geo-restricted sites. The default
                                 proxy specified by --proxy (or none, if the
                                 options is not present) is used for the
                                 actual downloading.
--geo-bypass                     Bypass geographic restriction via faking
                                 X-Forwarded-For HTTP header (experimental)
--no-geo-bypass                  Do not bypass geographic restriction via
                                 faking X-Forwarded-For HTTP header
                                 (experimental)
--geo-bypass-country CODE        Force bypass geographic restriction with
                                 explicitly provided two-letter ISO 3166-2
                                 country code (experimental)
</code></pre>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="video-selection">Video Selection:</h2>



<pre class="wp-block-code"><code>--playlist-start NUMBER          Playlist video to start at (default is 1)
--playlist-end NUMBER            Playlist video to end at (default is last)
--playlist-items ITEM_SPEC       Playlist video items to download. Specify
                                 indices of the videos in the playlist
                                 separated by commas like: "--playlist-items
                                 1,2,5,8" if you want to download videos
                                 indexed 1, 2, 5, 8 in the playlist. You can
                                 specify range: "--playlist-items
                                 1-3,7,10-13", it will download the videos
                                 at index 1, 2, 3, 7, 10, 11, 12 and 13.
--match-title REGEX              Download only matching titles (regex or
                                 caseless sub-string)
--reject-title REGEX             Skip download for matching titles (regex or
                                 caseless sub-string)
--max-downloads NUMBER           Abort after downloading NUMBER files
--min-filesize SIZE              Do not download any videos smaller than
                                 SIZE (e.g. 50k or 44.6m)
--max-filesize SIZE              Do not download any videos larger than SIZE
                                 (e.g. 50k or 44.6m)
--date DATE                      Download only videos uploaded in this date
--datebefore DATE                Download only videos uploaded on or before
                                 this date (i.e. inclusive)
--dateafter DATE                 Download only videos uploaded on or after
                                 this date (i.e. inclusive)
--min-views COUNT                Do not download any videos with less than
                                 COUNT views
--max-views COUNT                Do not download any videos with more than
                                 COUNT views
--match-filter FILTER            Generic video filter. Specify any key (see
                                 the "OUTPUT TEMPLATE" for a list of
                                 available keys) to match if the key is
                                 present, !key to check if the key is not
                                 present, key &gt; NUMBER (like "comment_count
                                 &gt; 12", also works with &gt;=, &lt;, &lt;=, !=, =) to
                                 compare against a number, key = 'LITERAL'
                                 (like "uploader = 'Mike Smith'", also works
                                 with !=) to match against a string literal
                                 and &amp; to require multiple matches. Values
                                 which are not known are excluded unless you
                                 put a question mark (?) after the operator.
                                 For example, to only match videos that have
                                 been liked more than 100 times and disliked
                                 less than 50 times (or the dislike
                                 functionality is not available at the given
                                 service), but who also have a description,
                                 use --match-filter "like_count &gt; 100 &amp;
                                 dislike_count &lt;? 50 &amp; description" .
--no-playlist                    Download only the video, if the URL refers
                                 to a video and a playlist.
--yes-playlist                   Download the playlist, if the URL refers to
                                 a video and a playlist.
--age-limit YEARS                Download only videos suitable for the given
                                 age
--download-archive FILE          Download only videos not listed in the
                                 archive file. Record the IDs of all
                                 downloaded videos in it.
--include-ads                    Download advertisements as well
                                 (experimental)
</code></pre>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="download-options">Download Options:</h2>



<pre class="wp-block-code"><code>-r, --limit-rate RATE            Maximum download rate in bytes per second
                                 (e.g. 50K or 4.2M)
-R, --retries RETRIES            Number of retries (default is 10), or
                                 "infinite".
--fragment-retries RETRIES       Number of retries for a fragment (default
                                 is 10), or "infinite" (DASH, hlsnative and
                                 ISM)
--skip-unavailable-fragments     Skip unavailable fragments (DASH, hlsnative
                                 and ISM)
--abort-on-unavailable-fragment  Abort downloading when some fragment is not
                                 available
--keep-fragments                 Keep downloaded fragments on disk after
                                 downloading is finished; fragments are
                                 erased by default
--buffer-size SIZE               Size of download buffer (e.g. 1024 or 16K)
                                 (default is 1024)
--no-resize-buffer               Do not automatically adjust the buffer
                                 size. By default, the buffer size is
                                 automatically resized from an initial value
                                 of SIZE.
--playlist-reverse               Download playlist videos in reverse order
--playlist-random                Download playlist videos in random order
--xattr-set-filesize             Set file xattribute ytdl.filesize with
                                 expected file size (experimental)
--hls-prefer-native              Use the native HLS downloader instead of
                                 ffmpeg
--hls-prefer-ffmpeg              Use ffmpeg instead of the native HLS
                                 downloader
--hls-use-mpegts                 Use the mpegts container for HLS videos,
                                 allowing to play the video while
                                 downloading (some players may not be able
                                 to play it)
--external-downloader COMMAND    Use the specified external downloader.
                                 Currently supports
                                 aria2c,avconv,axel,curl,ffmpeg,httpie,wget
--external-downloader-args ARGS  Give these arguments to the external
                                 downloader
</code></pre>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="filesystem-options">Filesystem Options:</h2>



<pre class="wp-block-code"><code>-a, --batch-file FILE            File containing URLs to download ('-' for
                                 stdin)
--id                             Use only video ID in file name
-o, --output TEMPLATE            Output filename template, see the "OUTPUT
                                 TEMPLATE" for all the info
--autonumber-start NUMBER        Specify the start value for %(autonumber)s
                                 (default is 1)
--restrict-filenames             Restrict filenames to only ASCII
                                 characters, and avoid "&amp;" and spaces in
                                 filenames
-w, --no-overwrites              Do not overwrite files
-c, --continue                   Force resume of partially downloaded files.
                                 By default, youtube-dl will resume
                                 downloads if possible.
--no-continue                    Do not resume partially downloaded files
                                 (restart from beginning)
--no-part                        Do not use .part files - write directly
                                 into output file
--no-mtime                       Do not use the Last-modified header to set
                                 the file modification time
--write-description              Write video description to a .description
                                 file
--write-info-json                Write video metadata to a .info.json file
--write-annotations              Write video annotations to a
                                 .annotations.xml file
--load-info-json FILE            JSON file containing the video information
                                 (created with the "--write-info-json"
                                 option)
--cookies FILE                   File to read cookies from and dump cookie
                                 jar in
--cache-dir DIR                  Location in the filesystem where youtube-dl
                                 can store some downloaded information
                                 permanently. By default
                                 $XDG_CACHE_HOME/youtube-dl or
                                 ~/.cache/youtube-dl . At the moment, only
                                 YouTube player files (for videos with
                                 obfuscated signatures) are cached, but that
                                 may change.
--no-cache-dir                   Disable filesystem caching
--rm-cache-dir                   Delete all filesystem cache files
</code></pre>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="thumbnail-images">Thumbnail images:</h2>



<pre class="wp-block-code"><code>--write-thumbnail                Write thumbnail image to disk
--write-all-thumbnails           Write all thumbnail image formats to disk
--list-thumbnails                Simulate and list all available thumbnail
                                 formats
</code></pre>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="verbosity-simulation-options">Verbosity / Simulation Options:</h2>



<pre class="wp-block-code"><code>-q, --quiet                      Activate quiet mode
--no-warnings                    Ignore warnings
-s, --simulate                   Do not download the video and do not write
                                 anything to disk
--skip-download                  Do not download the video
-g, --get-url                    Simulate, quiet but print URL
-e, --get-title                  Simulate, quiet but print title
--get-id                         Simulate, quiet but print id
--get-thumbnail                  Simulate, quiet but print thumbnail URL
--get-description                Simulate, quiet but print video description
--get-duration                   Simulate, quiet but print video length
--get-filename                   Simulate, quiet but print output filename
--get-format                     Simulate, quiet but print output format
-j, --dump-json                  Simulate, quiet but print JSON information.
                                 See the "OUTPUT TEMPLATE" for a description
                                 of available keys.
-J, --dump-single-json           Simulate, quiet but print JSON information
                                 for each command-line argument. If the URL
                                 refers to a playlist, dump the whole
                                 playlist information in a single line.
--print-json                     Be quiet and print the video information as
                                 JSON (video is still being downloaded).
--newline                        Output progress bar as new lines
--no-progress                    Do not print progress bar
--console-title                  Display progress in console titlebar
-v, --verbose                    Print various debugging information
--dump-pages                     Print downloaded pages encoded using base64
                                 to debug problems (very verbose)
--write-pages                    Write downloaded intermediary pages to
                                 files in the current directory to debug
                                 problems
--print-traffic                  Display sent and read HTTP traffic
-C, --call-home                  Contact the youtube-dl server for debugging
--no-call-home                   Do NOT contact the youtube-dl server for
                                 debugging
</code></pre>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="workarounds">Workarounds:</h2>



<pre class="wp-block-code"><code>--encoding ENCODING              Force the specified encoding (experimental)
--no-check-certificate           Suppress HTTPS certificate validation
--prefer-insecure                Use an unencrypted connection to retrieve
                                 information about the video. (Currently
                                 supported only for YouTube)
--user-agent UA                  Specify a custom user agent
--referer URL                    Specify a custom referer, use if the video
                                 access is restricted to one domain
--add-header FIELD:VALUE         Specify a custom HTTP header and its value,
                                 separated by a colon ':'. You can use this
                                 option multiple times
--bidi-workaround                Work around terminals that lack
                                 bidirectional text support. Requires bidiv
                                 or fribidi executable in PATH
--sleep-interval SECONDS         Number of seconds to sleep before each
                                 download when used alone or a lower bound
                                 of a range for randomized sleep before each
                                 download (minimum possible number of
                                 seconds to sleep) when used along with
                                 --max-sleep-interval.
--max-sleep-interval SECONDS     Upper bound of a range for randomized sleep
                                 before each download (maximum possible
                                 number of seconds to sleep). Must only be
                                 used along with --min-sleep-interval.
</code></pre>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="video-format-options">Video Format Options:</h2>



<pre class="wp-block-code"><code>-f, --format FORMAT              Video format code, see the "FORMAT
                                 SELECTION" for all the info
--all-formats                    Download all available video formats
--prefer-free-formats            Prefer free video formats unless a specific
                                 one is requested
-F, --list-formats               List all available formats of requested
                                 videos
--youtube-skip-dash-manifest     Do not download the DASH manifests and
                                 related data on YouTube videos
--merge-output-format FORMAT     If a merge is required (e.g.
                                 bestvideo+bestaudio), output to given
                                 container format. One of mkv, mp4, ogg,
                                 webm, flv. Ignored if no merge is required
</code></pre>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="subtitle-options">Subtitle Options:</h2>



<pre class="wp-block-code"><code>--write-sub                      Write subtitle file
--write-auto-sub                 Write automatically generated subtitle file
                                 (YouTube only)
--all-subs                       Download all the available subtitles of the
                                 video
--list-subs                      List all available subtitles for the video
--sub-format FORMAT              Subtitle format, accepts formats
                                 preference, for example: "srt" or
                                 "ass/srt/best"
--sub-lang LANGS                 Languages of the subtitles to download
                                 (optional) separated by commas, use --list-
                                 subs for available language tags
</code></pre>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="authentication-options">Authentication Options:</h2>



<pre class="wp-block-code"><code>-u, --username USERNAME          Login with this account ID
-p, --password PASSWORD          Account password. If this option is left
                                 out, youtube-dl will ask interactively.
-2, --twofactor TWOFACTOR        Two-factor authentication code
-n, --netrc                      Use .netrc authentication data
--video-password PASSWORD        Video password (vimeo, smotri, youku)
</code></pre>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="adobe-pass-options">Adobe Pass Options:</h2>



<pre class="wp-block-code"><code>--ap-mso MSO                     Adobe Pass multiple-system operator (TV
                                 provider) identifier, use --ap-list-mso for
                                 a list of available MSOs
--ap-username USERNAME           Multiple-system operator account login
--ap-password PASSWORD           Multiple-system operator account password.
                                 If this option is left out, youtube-dl will
                                 ask interactively.
--ap-list-mso                    List all supported multiple-system
                                 operators
</code></pre>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="post-processing-options">Post-processing Options:</h2>



<pre class="wp-block-code"><code>-x, --extract-audio              Convert video files to audio-only files
                                 (requires ffmpeg or avconv and ffprobe or
                                 avprobe)
--audio-format FORMAT            Specify audio format: "best", "aac",
                                 "flac", "mp3", "m4a", "opus", "vorbis", or
                                 "wav"; "best" by default; No effect without
                                 -x
--audio-quality QUALITY          Specify ffmpeg/avconv audio quality, insert
                                 a value between 0 (better) and 9 (worse)
                                 for VBR or a specific bitrate like 128K
                                 (default 5)
--recode-video FORMAT            Encode the video to another format if
                                 necessary (currently supported:
                                 mp4|flv|ogg|webm|mkv|avi)
--postprocessor-args ARGS        Give these arguments to the postprocessor
-k, --keep-video                 Keep the video file on disk after the post-
                                 processing; the video is erased by default
--no-post-overwrites             Do not overwrite post-processed files; the
                                 post-processed files are overwritten by
                                 default
--embed-subs                     Embed subtitles in the video (only for mp4,
                                 webm and mkv videos)
--embed-thumbnail                Embed thumbnail in the audio as cover art
--add-metadata                   Write metadata to the video file
--metadata-from-title FORMAT     Parse additional metadata like song title /
                                 artist from the video title. The format
                                 syntax is the same as --output. Regular
                                 expression with named capture groups may
                                 also be used. The parsed parameters replace
                                 existing values. Example: --metadata-from-
                                 title "%(artist)s - %(title)s" matches a
                                 title like "Coldplay - Paradise". Example
                                 (regex): --metadata-from-title
                                 "(?P&lt;artist&gt;.+?) - (?P&lt;title&gt;.+)"
--xattrs                         Write metadata to the video file's xattrs
                                 (using dublin core and xdg standards)
--fixup POLICY                   Automatically correct known faults of the
                                 file. One of never (do nothing), warn (only
                                 emit a warning), detect_or_warn (the
                                 default; fix file if we can, warn
                                 otherwise)
--prefer-avconv                  Prefer avconv over ffmpeg for running the
                                 postprocessors (default)
--prefer-ffmpeg                  Prefer ffmpeg over avconv for running the
                                 postprocessors
--ffmpeg-location PATH           Location of the ffmpeg/avconv binary;
                                 either the path to the binary or its
                                 containing directory.
--exec CMD                       Execute a command on the file after
                                 downloading, similar to find's -exec
                                 syntax. Example: --exec 'adb push {}
                                 /sdcard/Music/ &amp;&amp; rm {}'
--convert-subs FORMAT            Convert the subtitles to other format
                                 (currently supported: srt|ass|vtt)
</code></pre>



<hr class="wp-block-separator"/>



<p>如果遇到下面的錯誤訊息：</p>



<pre class="wp-block-preformatted">WARNING: Unable to download webpage: &lt;urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)&gt;
[youtube] aa2AhDaK_iY: Downloading API JSON
ERROR: Unable to download API page: &lt;urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)&gt; (caused by URLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')))</pre>



<p>解法：增加參數 &#8211;no-check-certificate</p>



<p>dd the&nbsp;<code>no-check-certificate</code>&nbsp;parameter to the command:</p>



<pre class="wp-block-code"><code>youtube-dl --no-check-certificate</code></pre>



<p>資料來源：<br><a href="https://stackoverflow.com/questions/60158087/youtubedl-certificate-verify-failed">https://stackoverflow.com/questions/60158087/youtubedl-certificate-verify-failed</a></p>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading" id="4-合併mp3">4: 合併mp3</h2>



<p>比較簡單的作法是建立一個文字檔，內容如下：</p>



<pre class="wp-block-preformatted">file '/path/to/first.mp3'<br>file '/path/to/second.mp3'</pre>



<p>再服用 ffmpeg 指令，就可以合併成單一 mp3 檔案：</p>



<pre class="wp-block-preformatted">ffmpeg -f concat -i list.txt -c copy out.mp3</pre>



<p>附註：文字檔不太能使用中文及emoji，建議改用英文或數字，就會沒問題，錯誤訊息如下：</p>



<pre class="wp-block-preformatted">[concat @ 0x7ffae7013a00] Unsafe file name 'A-Lin -《千尋》(電視劇《千古玦塵》插曲）<img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f3b5.png" alt="🎵" class="wp-smiley" style="height: 1em; max-height: 1em;" />『無損高音質｜CC歌詞字幕』-VE3p6-IGKG4.mp3'<br>list.txt: Operation not permitted</pre>



<p>如果想要重新編碼（re-encoding）服用下面指令：</p>



<pre class="wp-block-preformatted">ffmpeg -i first.mp3 -i second.mp3 -filter_complex [0:a][1:a]concat=n=2:v=0:a=1 out.mp3</pre>



<p>另一個範例，FFmpeg combine mp3 files to one mp3 file with delays</p>



<pre class="wp-block-code"><code>ffmpeg -i aaa.mp3 -i aab.mp3 -filter_complex "&#91;0]adelay=10000|10000&#91;a];&#91;1]adelay=10000|10000&#91;b];&#91;a]&#91;b]amix=inputs=2" out.mp3
</code></pre>



<p>aaa.mp3 is input 0</p>



<p>aab.mp3 is input 1</p>



<pre class="wp-block-code"><code>&#91;0]adelay=10000|10000&#91;a]
</code></pre>



<p>Means take input 0 and add a delay of 10000milliseconds on both channel and name the stream specifier &#8216;a&#8217;</p>



<pre class="wp-block-code"><code>&#91;1]adelay=10000|10000&#91;b]
</code></pre>



<p>Take input 1 and add a delay of 10000milliseconds on both channel and the stream specifier &#8216;b&#8217;</p>



<pre class="wp-block-code"><code>&#91;a]&#91;b]amix=inputs=2
</code></pre>



<p>mix the stream specifier called &#8216;a&#8217; and &#8216;b&#8217;.</p>



<p>Here is a video that can help you to understand ffmpeg filter graph.&nbsp;<a href="https://youtu.be/hElDsyuAQDA?t=341">https://youtu.be/hElDsyuAQDA?t=341</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://max-everyday.com/2017/08/youtube-mp3/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Ubuntu 顯示 unable to resolve host 解法</title>
		<link>https://max-everyday.com/2016/06/ubuntu-unable-to-resolve-host/</link>
					<comments>https://max-everyday.com/2016/06/ubuntu-unable-to-resolve-host/#respond</comments>
		
		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Tue, 07 Jun 2016 10:08:02 +0000</pubDate>
				<category><![CDATA[電腦相關應用]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">http://max-everyday.com/?p=773</guid>

					<description><![CDATA[在修改完ubuntu 的電腦名稱之後，使用終端機(Terminal)下的指令，都會先顯示 unable to resolve host，看了覺得怪怪的： &#160; 解 [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>在修改完ubuntu 的電腦名稱之後，使用終端機(Terminal)下的指令，都會先顯示 unable to resolve host，看了覺得怪怪的：<br />
<a href="http://max-everyday.com/wp-content/uploads/2016/06/2016-06-07-15-51-56-的螢幕擷圖.png" data-lightbox="gal[773]"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-770" src="http://max-everyday.com/wp-content/uploads/2016/06/2016-06-07-15-51-56-的螢幕擷圖.png" alt="2016-06-07 15-51-56 的螢幕擷圖" width="730" height="445" /></a></p>
<p>&nbsp;</p>
<p>解法是下在終端機(Terminal) 裡下指令：</p>
<blockquote><p>sudo nano /etc/hosts</p></blockquote>
<p>或是</p>
<blockquote><p>sudo gedit /etc/hosts</p></blockquote>
<p><a href="http://max-everyday.com/wp-content/uploads/2016/06/2016-06-07-16-03-30-的螢幕擷圖.png" data-lightbox="gal[773]"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-774" src="http://max-everyday.com/wp-content/uploads/2016/06/2016-06-07-16-03-30-的螢幕擷圖.png" alt="2016-06-07 16-03-30 的螢幕擷圖" width="746" height="520" /></a></p>
<p>說明：原本電腦名稱是 max-G41T-R3 修改為 max-home-pc（我修改後的新電腦名稱） 之後，問題就解決了。 ^_^</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://max-everyday.com/2016/06/ubuntu-unable-to-resolve-host/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
