跳至主要内容

博文

目前显示的是 二月, 2018的博文

组合使用 you-get 和 ffmpeg

最近对 `you-get` 这个神奇的下载器挺感兴趣的,用它在油管上下了一些MV,顺手下了另一个大名鼎鼎的工具 `ffmpeg` 将歌曲转换为 MP3。 > you-get -o D:\DOWNLOAD http://some-url 假定文件保存为 `'some-mv.mp4'`, > ffmpeg -i D:\DOWNLOAD\some-mv.mp4 -vn -ab 256k some.MP3。 有的时候如果需要截取部分来转换,可以加上两个参数 `-ss` 和 `-to`: > ffmpeg -i D:\DOWNLOAD\some-mv.mp4 -vn -ab 256k -ss 00:03:12 -to 04:15:43 sub-convert.mp3 简单的参数解释: + `-vn` 不要视频,也就是转换为音频格式 + `-ab bitrate` 指定音频的比特率 + `-ss time_offset` 指定从哪个时间点开始 + `-to time_stop` 指定停止的时间点 当然 `ffmpeg` 提供的参数远不止这些,[这里](http://blog.topspeedsnail.com/archives/1699)有一片不错的使用介绍可以参考。

From markdown to PDF using Pandoc

花了点儿时间玩 Pandoc,将一些 Markdown 文档转换为 PDF 文档。 首先参考[官方文档](https://pandoc.org/installing.html)在 Mac OS 上安装了 Pandoc: > You can install pandoc using homebrew: `brew install pandoc`. > > There is a package installer at pandoc’s download page. If you later want to uninstall the package, you can do so by downloading this script and running it with perl uninstall-pandoc.pl. > > We also provide a zip file containing the binaries and man pages, for those who prefer not to use the installer. Simply unzip the file and move the binaries and man pages to whatever directory you like. > > For PDF output, you’ll also need LaTeX. Because a full MacTeX installation takes more than a gigabyte of disk space, we recommend installing BasicTeX (64M) and using the tlmgr tool to install additional packages as needed. If you get errors warning of fonts not found, try `tlmgr install collection-fontsrecommended` 安装了 BasicTex 之后一直在 Apps 里寻找 `LaTex` 或是 `BasicTex` 这样的应用,但是一无所获(?!) 后来跑到 MacTex...