Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu.Wang 2018-10-06 23:39:02 +08:00
commit b8282d07ad
5 changed files with 169 additions and 154 deletions

View File

@ -0,0 +1,84 @@
Linux 下如何创建 M3U 播放列表
======
> 简介关于如何在Linux终端中根据乱序文件创建M3U播放列表实现循序播放的小建议。
![Create M3U playlists in Linux Terminal][1]
我是外国电视连续剧的粉丝,这些连续剧不太容易从 DVD 或像 [Netflix][2] 这样的流媒体上获得。好在,您可以在 YouTube 上找到一些内容并[从 YouTube 下载][3]。
现在出现了一个问题。你的文件可能不是按顺序存储的。在 GNU/Linux中文件不是按数字顺序自然排序的因此我必须创建 .m3u 播放列表,以便 [MPV 视频播放器][4]可以按顺序播放视频而不是乱顺进行播放。
同样的,有时候表示第几集的数字是在文件名中间或结尾的,像这样 “My Web Series S01E01.mkv”。这里的剧集信息位于文件名的中间“S01E01”告诉我们人类这是第一集后面还有其它剧集。
因此我要做的事情就是在视频墓中创建一个 .m3u 播放列表,并告诉 MPV 播放这个 .m3u 播放列表MPV 自然会按顺序播放这些视频.
### 什么是 M3U 文件?
[M3U][5] 基本上就是个按特定顺序包含文件名的文本文件。当类似 MPV 或 VLC 这样的播放器打开 M3U 文件时,它会尝试按给定的顺序播放指定文件。
### 创建 M3U 来按顺序播放音频/视频文件
就我而言, 我使用了下面命令:
```
$/home/shirish/Videos/web-series-video/$ ls -1v |grep .mkv > /tmp/1.m3u && mv /tmp/1.m3u .
```
然我们拆分一下看看每个部分表示什么意思:
`ls -1v` = 这就是用普通的 `ls` 来列出目录中的内容. 其中 `-1` 表示每行显示一个文件。而 `-v` 表示根据文本中的数字(版本)进行自然排序。
`| grep .mkv` = 基本上就是告诉 `ls` 寻找那些以 `.mkv` 结尾的文件。它也可以是 `.mp4` 或其他任何你想要的媒体文件格式。
通过在控制台上运行命令来进行试运行通常是个好主意:
```
ls -1v |grep .mkv
My Web Series S01E01 [Episode 1 Name] Multi 480p WEBRip x264 - xRG.mkv
My Web Series S01E02 [Episode 2 Name] Multi 480p WEBRip x264 - xRG.mkv
My Web Series S01E03 [Episode 3 Name] Multi 480p WEBRip x264 - xRG.mkv
My Web Series S01E04 [Episode 4 Name] Multi 480p WEBRip x264 - xRG.mkv
My Web Series S01E05 [Episode 5 Name] Multi 480p WEBRip x264 - xRG.mkv
My Web Series S01E06 [Episode 6 Name] Multi 480p WEBRip x264 - xRG.mkv
My Web Series S01E07 [Episode 7 Name] Multi 480p WEBRip x264 - xRG.mkv
My Web Series S01E08 [Episode 8 Name] Multi 480p WEBRip x264 - xRG.mkv
```
结果显示我要做的是正确的。现在下一步就是让输出以 `.m3u` 播放列表的格式输出。
```
ls -1v |grep .mkv > /tmp/web_playlist.m3u && mv /tmp/web_playlist.m3u .
```
这就在当前目录中创建了 .m3u 文件。这个 .m3u 播放列表只不过是一个 .txt 文件,其内容与上面相同,扩展名为 .m3u 而已。 你也可以手动编辑它,并按照想要的顺序添加确切的文件名。
之后你只需要这样做:
```
mpv web_playlist.m3u
```
一般来说MPV 和播放列表的好处在于你不需要一次性全部看完。 您可以一次看任意长时间,然后在下一次查看其余部分。
我希望写一些有关 MPV 的文章,以及如何制作在媒体文件中嵌入字幕的 mkv 文件,但这是将来的事情了。
注意: 这是开源软件,不鼓励盗版。
--------------------------------------------------------------------------------
via: https://itsfoss.com/create-m3u-playlist-linux/
作者:[Shirsh][a]
选题:[lujun9972](https://github.com/lujun9972)
译者:[lujun9972](https://github.com/lujun9972)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://itsfoss.com/author/shirish/
[1]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/08/Create-M3U-Playlists.jpeg
[2]:https://itsfoss.com/netflix-open-source-ai/
[3]:https://itsfoss.com/download-youtube-linux/
[4]:https://itsfoss.com/mpv-video-player/
[5]:https://en.wikipedia.org/wiki/M3U

View File

@ -2,20 +2,21 @@
======
![](https://fedoramagazine.org/wp-content/uploads/2018/08/5-cool-music-apps-816x345.jpg)
你喜欢音乐吗?那么 Fedora 中可能有你正在寻找的东西。本文介绍在 Fedora 上运行的不同音乐播放器。无论你有大量的音乐库,还是小型音乐库,或者根本没有音乐库,你都会被覆盖到。这里有四个图形程序和一个基于终端的音乐播放器,可以让你挑选。
你喜欢音乐吗?那么 Fedora 中可能有你正在寻找的东西。本文介绍在 Fedora 上运行的各种音乐播放器。无论你有庞大的音乐库,还是小一些的,抑或根本没有,你都可以用到音乐播放器。这里有四个图形程序和一个基于终端的音乐播放器,可以让你挑选。
### Quod Libet
Quod Libet 是你的大型音频库的管理员。如果你有一个大量的音频库,你不想只听,但也要管理Quod Libet 可能是一个很好的选择。
Quod Libet 是一个完备的大型音频库管理器。如果你有一个庞大的音频库,你不想只是听,也想要管理Quod Libet 可能是一个很好的选择。
![][1]
Quod Libet 可以从磁盘上的多个位置导入音乐,并允许你编辑音频文件的标签 - 因此一切都在你的控制之下。额外地,它还有各种插件可用,从简单的均衡器到 [last.fm][2] 同步。你也可以直接从 [Soundcloud][3] 搜索和播放音乐。
Quod Libet 可以从磁盘上的多个位置导入音乐,并允许你编辑音频文件的标签 —— 因此一切都在你的控制之下。此外,它还有各种插件可用,从简单的均衡器到 [last.fm][2] 同步。你也可以直接从 [Soundcloud][3] 搜索和播放音乐。
Quod Libet 在 HiDPI 屏幕上工作得很好,它有 Fedora 的 RPM 包,如果你运行 [Silverblue][5],它在 [Flathub][4] 中也有。使用 Gnome Software 或命令行安装它:
Quod Libet 在 HiDPI 屏幕上工作得很好,它有 Fedora 的 RPM 包,如果你运行[Silverblue][5],它在 [Flathub][4] 中也有。使用 Gnome Software 或命令行安装它:
```
$ sudo dnf install quodlibet
```
### Audacious
@ -24,14 +25,14 @@ $ sudo dnf install quodlibet
![][6]
Audacious 可能不会立即管理你的所有音乐,但你如果想将音乐组织为文件,它能做得很好。你还可以导出和导入播放列表,而无需重新组织音乐文件本身。
Audacious 可能不直接管理你的所有音乐,但你如果想将音乐按文件组织起来,它能做得很好。你还可以导出和导入播放列表,而无需重新组织音乐文件本身。
额外地,你可以让它看起来像 Winamp。要让它与上面的截图相同请进入 “Settings/Appearance,”,选择顶部的 “Winamp Classic Interface”然后选择右下方的 “Refugee” 皮肤。而鲍勃是你的叔叔!这就完成了
此外,你可以让它看起来像 Winamp。要让它与上面的截图相同请进入 “Settings/Appearance”选择顶部的 “Winamp Classic Interface”然后选择右下方的 “Refugee” 皮肤。就这么简单
Audacious 在 Fedora 中作为 RPM 提供,可以使用 Gnome Software 或在终端运行以下命令安装:
```
$ sudo dnf install audacious
```
### Lollypop
@ -40,25 +41,25 @@ Lollypop 是一个音乐播放器,它与 GNOME 集成良好。如果你喜欢
![][7]
除了与 GNOME Shell 的良好视觉集成之外,它还可以很好地用于 HiDPI 屏幕,并支持暗主题。
除了与 GNOME Shell 的良好视觉集成之外,它还可以很好地用于 HiDPI 屏幕,并支持暗主题。
额外地Lollypop 有一个集成的封面下载器和一个所谓的派对模式(右上角的音符按钮),它可以自动选择和播放音乐。它还集成了 [last.fm][2] 或 [libre.fm][8] 等在线服务。
它有 Fedora 的 RPM 也有用于 [Silverblue][5] 工作站的 [Flathub][4],使用 Gnome Software 或终端进行安装:
```
$ sudo dnf install lollypop
```
### Gradio
如果你没有任何音乐但仍喜欢听怎么办或者你只是喜欢收音机Gradio 就是为你准备的。
如果你没有任何音乐但仍听怎么办或者你只是喜欢收音机Gradio 就是为你准备的。
![][9]
Gradio 是一个简单的收音机,它允许你搜索和播放网络电台。你可以按国家、语言或直接搜索找到它们。额外地,它可视化地集成到了 GNOME Shell 中,可以与 HiDPI 屏幕配合使用,并且可以选择黑暗主题。
可以在 [Flathub][4] 中找到 Gradio它同时可以运行在 Fedora Workstation 和 [Silverblue][5] 中。使用 Gnome Software 安装它
可以在 [Flathub][4] 中找到 Gradio它同时可以运行在 Fedora Workstation 和 [Silverblue][5] 中。使用 Gnome Software 安装它
### sox
@ -67,19 +68,19 @@ Gradio 是一个简单的收音机,它允许你搜索和播放网络电台。
![][10]
sox 是一个非常简单的基于终端的音乐播放器。你需要做的就是运行如下命令:
```
$ play file.mp3
```
接着 sox 就会为你播放。除了单独的音频文件外sox 还支持 m3u 格式的播放列表。
额外地,因为 sox 是基于终端的程序,你可以在 ssh 中运行它。你有一个带扬声器的家用服务器吗?或者你想从另一台电脑上播放音乐吗?尝试将它与 [tmux][11] 一起使用,这样即使会话关闭也可以继续听。
此外,因为 sox 是基于终端的程序,你可以通过 ssh 运行它。你有一个带扬声器的家用服务器吗?或者你想从另一台电脑上播放音乐吗?尝试将它与 [tmux][11] 一起使用,这样即使会话关闭也可以继续听。
sox 在 Fedora 中以 RPM 提供。运行下面的命令安装:
```
$ sudo dnf install sox
```
@ -90,19 +91,19 @@ via: https://fedoramagazine.org/5-cool-music-player-apps/
作者:[Adam Šamalík][a]
选题:[lujun9972](https://github.com/lujun9972)
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://fedoramagazine.org/author/asamalik/
[1]:https://fedoramagazine.org/wp-content/uploads/2018/08/qodlibet-300x217.png
[1]:https://fedoramagazine.org/wp-content/uploads/2018/08/qodlibet-768x555.png
[2]:https://last.fm
[3]:https://soundcloud.com/
[4]:https://flathub.org/home
[5]:https://teamsilverblue.org/
[6]:https://fedoramagazine.org/wp-content/uploads/2018/08/audacious-300x136.png
[7]:https://fedoramagazine.org/wp-content/uploads/2018/08/lollypop-300x172.png
[6]:https://fedoramagazine.org/wp-content/uploads/2018/08/audacious-768x348.png
[7]:https://fedoramagazine.org/wp-content/uploads/2018/08/lollypop-768x439.png
[8]:https://libre.fm
[9]:https://fedoramagazine.org/wp-content/uploads/2018/08/gradio.png
[10]:https://fedoramagazine.org/wp-content/uploads/2018/08/sox-300x179.png
[9]:https://fedoramagazine.org/wp-content/uploads/2018/08/gradio-768x499.png
[10]:https://fedoramagazine.org/wp-content/uploads/2018/08/sox-768x457.png
[11]:https://fedoramagazine.org/use-tmux-more-powerful-terminal/

View File

@ -1,50 +0,0 @@
Moving to Linux from dated Windows machines
======
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/1980s-computer-yearbook.png?itok=eGOYEKK-)
Every day, while working in the marketing department at ONLYOFFICE, I see Linux users discussing our office productivity software on the internet. Our products are popular among Linux users, which made me curious about using Linux as an everyday work tool. My old Windows XP-powered computer was an obstacle to performance, so I started reading about Linux systems (particularly Ubuntu) and decided to try it out as an experiment. Two of my colleagues joined me.
### Why Linux?
We needed to make a change, first, because our old systems were not enough in terms of performance: we experienced regular crashes, an overload every time more than two apps were active, a 50% chance of freezing when a machine was shut down, and so forth. This was rather distracting to our work, which meant we were considerably less efficient than we could be.
Upgrading to newer versions of Windows was an option, too, but that is an additional expense, plus our software competes against Microsoft's office suite. So that was an ideological question, too.
Second, as I mentioned earlier, ONLYOFFICE products are rather popular within the Linux community. By reading about Linux users' experience with our software, we became interested in joining them.
A week after we asked to change to Linux, we got our shiny new computer cases with [Kubuntu][1] inside. We chose version 16.04, which features KDE Plasma 5.5 and many KDE apps including Dolphin, as well as LibreOffice 5.1 and Firefox 45.
### What we like about Linux
Linux's biggest advantage, I believe, is its speed; for instance, it takes just seconds from pushing the machine's On button to starting your work. Everything seemed amazingly rapid from the very beginning: the overall responsiveness, the graphics, and even system updates.
One other thing that surprised me compared to Windows is that Linux allows you to configure nearly everything, including the entire look of your desktop. In Settings, I found how to change the color and shape of bars, buttons, and fonts; relocate any desktop element; and build a composition of widgets, even including comics and Color Picker. I believe I've barely scratched the surface of the available options and have yet to explore most of the customization opportunities that this system is well known for.
Linux distributions are generally a very safe environment. People rarely use antivirus apps in Linux, simply because there are so few viruses written for it. You save system speed, time, and, sure enough, money.
In general, Linux has refreshed our everyday work lives, surprising us with a number of new options and opportunities. Even in the short time we've been using it, we'd characterize it as:
* Fast and smooth to operate
* Highly customizable
* Relatively newcomer-friendly
* Challenging with basic components, however very rewarding in return
* Safe and secure
* An exciting experience for everyone who seeks to refresh their workplace
Have you switched from Windows or MacOS to Kubuntu or another Linux variant? Or are you considering making the change? Please share your reasons for wanting to adopt Linux, as well as your impressions of going open source, in the comments.
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/1/move-to-linux-old-windows
作者:[Michael Korotaev][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://opensource.com/users/michaelk
[1]:https://kubuntu.org/

View File

@ -0,0 +1,63 @@
从过时的 Windows 机器迁移到 Linux
======
![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/1980s-computer-yearbook.png?itok=eGOYEKK-)
每天当我在 ONLYOFFICE 的市场部门工作的时候,我都能看到 Linux 用户在网上讨论我们的办公效率软件。
我们的产品在 Linux 用户中很受欢迎,这使得我对使用 Linux 作为日常工具的体验非常好奇。
我的老旧的 Windows XP 机器在性能上非常差,因此我决定了解 Linux 系统(特别是 Ubuntu )并且决定去尝试使用它。
我的两个同事加入了我的计划。
### 为何选择 Linux
我们必须做出改变,首先,我们的老系统在性能方面不够用:我们经历过频繁的崩溃,每当超过两个应用在运行机器就会负载过度,关闭机器时有一半的几率冻结等等。
这很容易让我们从工作中分心,意味着我们没有我们应有的工作效率了。
升级到 Windows 更新的版本也是一种选择,但这样可能会带来额外的开销,而且我们的软件本身也是要与 Microsoft 的办公软件竞争。
因此我们在这方面也存在意识形态的问题。
其次,就像我之前提过的, ONLYOFFICE 产品在 Linux 社区内非常受欢迎。
通过阅读 Linux 用户在使用我们的软件时的体验,我们也对加入他们很感兴趣。
在我们要求转换到 Linux 系统一周后,我们拿到了崭新的装好了 [Kubuntu][1] 的机器。
我们选择了 16.04 版本,因为这个版本支持 KDE Plasma 5.5 和包括 Dolphin 在内的很多 KDE 应用,同时也包括 LibreOffice 5.1 和 Firefox 45 。
### Linux 让人喜欢的地方
我相信 Linux 最大的优势是它的运行速度,比如,从按下机器的电源按钮到开始工作只需要几秒钟时间。
从一开始,一切看起来都超乎寻常地快:总体的响应速度,图形界面,甚至包括系统更新的速度。
另一个使我惊奇的事情是跟 Windows 相比, Linux 几乎能让你配置任何东西,包括整个桌面的外观。
在设置里面,我发现了如何修改各种栏目、按钮和字体的颜色和形状,也可以重新布置任意桌面组件的位置,组合桌面的小工具(甚至包括漫画和颜色选择器)
我相信我还仅仅只是了解了基本的选项,之后还需要探索这个系统更多著名的定制化选项。
Linux 发行版通常是一个非常安全的环境。
人们很少在 Linux 系统中使用防病毒的软件,因为很少有人会写病毒程序来攻击 Linux 系统。
因此你可以拥有很好的系统速度,并且节省了时间和金钱。
总之, Linux 已经改变了我们的日常生活,用一系列的新选项和功能大大震惊了我们。
仅仅通过短时间的使用,我们已经可以给它总结出以下特性:
* 操作很快很顺畅
* 高度可定制
* 对新手很友好
* 了解基本组件很有挑战性,但回报丰厚
* 安全可靠
* 对所有想改变工作场所的人来说都是一次绝佳的体验
你已经从 Windows 或 MacOS 系统换到 Kubuntu 或其他 Linux 变种了么?
或者你是否正在考虑做出改变?
请分享你想要采用 Linux 系统的原因,连同你对开源的印象一起写在评论中。
--------------------------------------------------------------------------------
via: https://opensource.com/article/18/1/move-to-linux-old-windows
作者:[Michael Korotaev][a]
译者:[bookug](https://github.com/bookug)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://opensource.com/users/michaelk
[1]:https://kubuntu.org/

View File

@ -1,83 +0,0 @@
Linux下如何创建 M3U 播放列表 [小建议]
======
**简介关于如何在Linux终端中根据乱序文件创建M3U播放列表实现循序播放的小建议。**
![Create M3U playlists in Linux Terminal][1]
我是外国电视连续剧的粉丝这些连续剧不太容易从DVD或像[Netflix] [2]这样的流媒体上获得。还在您可以在YouTube上找到一些内容并[从YouTube下载][3]。
现在出现了一个问题. 你的文件可能不是按顺序存储的. 在GNU / Linux中文件不是按数字顺序自然排序的因此我必须创建.m3u播放列表以便[MPV视频播放器][4]可以按顺序播放视频而不是乱顺进行播放。
同样的,有时候表示第几集的数字实在文件名中间或结尾的,像这样 My Web Series S01E01.mkv. 这里的剧集信息位于文件名的中间,'S01E01'告诉我们人类,哪个是第一集,下一集是哪一个文件。
因此我要做的事情就是在视频墓中创建一个 m3u 播放列表并告诉MPV播放这个 .m3u 播放列表MPV自然会按顺序播放这些视频.
### 什么是M3U 文件?
[M3U][5] 基本上就是个按特定顺序包含文件名的文本文件. 当类似MPV或VLC这样的播放器打开M3U文件时, 它会尝试按给定的顺序播放指定文件.
### 创建M3U来按顺序播放音频/视频文件
就我而言, 我使用了下面命令:
```
$/home/shirish/Videos/web-series-video/$ ls -1v |grep .mkv > /tmp/1.m3u && mv /tmp/1.m3u .
```
然我们拆分一下看看每个部分表示什么意思
**ls -1v** = 这就是用普通的 ls 来列出目录中的内容. 其中 `-1` 表示每行显示一个文件. 而 `-v` 表示根据文本中的数字(版本)进行自然排序
**| grep .mkv** = 基本上就是告诉 `ls` 寻找那些以 `.mkv` 结尾的文件. 它也可以是 `.mp4` 或其他任何你想要的媒体文件格式.
通过在控制台上运行命令来进行试运行通常是个好主意:
```
ls -1v |grep .mkv
My Web Series S01E01 [Episode 1 Name] Multi 480p WEBRip x264 - xRG.mkv
My Web Series S01E02 [Episode 2 Name] Multi 480p WEBRip x264 - xRG.mkv
My Web Series S01E03 [Episode 3 Name] Multi 480p WEBRip x264 - xRG.mkv
My Web Series S01E04 [Episode 4 Name] Multi 480p WEBRip x264 - xRG.mkv
My Web Series S01E05 [Episode 5 Name] Multi 480p WEBRip x264 - xRG.mkv
My Web Series S01E06 [Episode 6 Name] Multi 480p WEBRip x264 - xRG.mkv
My Web Series S01E07 [Episode 7 Name] Multi 480p WEBRip x264 - xRG.mkv
My Web Series S01E08 [Episode 8 Name] Multi 480p WEBRip x264 - xRG.mkv
```
结果显示我要做的事情是正确的. 现在下一步就是让输出以 `.m3u` 播放列表的格式输出.
```
ls -1v |grep .mkv > /tmp/web_playlist.m3u && mv /tmp/web_playlist.m3u .
```
这就在当前目录中创建了 `.m3u` 文件. 这个`.m3u`播放列表只不过是一个.txt文件其内容与上面相同扩展名为.m3u。 你也可以手动编辑它,并按照想要的顺序添加确切的文件名。
之后你只需要这样做:
```
mpv web_playlist.m3u
```
一般来说关于MPV和播放列表的好处在于你不需要一次性全部看完。 您可以一次看任意长时间,然后在下一次查看其余部分。
我希望写一些有关MPV的文章以及如何制作在媒体文件中嵌入字幕的mkv文件但这是将来的事情了。
注意: 这是开源软件,不鼓励盗版
--------------------------------------------------------------------------------
via: https://itsfoss.com/create-m3u-playlist-linux/
作者:[Shirsh][a]
选题:[lujun9972](https://github.com/lujun9972)
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://itsfoss.com/author/shirish/
[1]:https://4bds6hergc-flywheel.netdna-ssl.com/wp-content/uploads/2018/08/Create-M3U-Playlists.jpeg
[2]:https://itsfoss.com/netflix-open-source-ai/
[3]:https://itsfoss.com/download-youtube-linux/
[4]:https://itsfoss.com/mpv-video-player/
[5]:https://en.wikipedia.org/wiki/M3U