Linux 如何使用 shell 脚本创建 MPlayer 播放列表?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10066398/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 05:40:31 来源:igfitidea点击:
How can I create an MPlayer playlist with a shell script?
提问by RoundRobin
I am trying to create a shell script in Linux that when executed searches a directory for all media files then creates a playlist and plays it with MPlayer.
我正在尝试在 Linux 中创建一个 shell 脚本,该脚本在执行时搜索所有媒体文件的目录,然后创建一个播放列表并使用 MPlayer 播放。
回答by mah454
Use this command :
使用这个命令:
find /PATH/TO/MUSIC/DIRECTORY/ -type f -iname "*.mp3" > playlist.m3u
Now play with mplayer :
现在玩 mplayer :
mplayer -playlist playlist.m3u