Linux命令行播放视频

一、环境

[root@localhost ~]# python3 --version
Python 3.6.8

二、安装video-to-ascii

pip3 install opencv-python
pip3 install video-to-ascii

三、命令

查看帮助

usage: video-to-ascii [-h] -f FILE
                      [--strategy {ascii-color,just-ascii,filled-ascii}]
                      [-o OUTPUT] [-a]

It is a simple python package to play videos in the terminal using colored
characters as pixels or other usefull outputs

optional arguments:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  input video file
  --strategy {ascii-color,just-ascii,filled-ascii}
                        choose an strategy to render the output
  -o OUTPUT, --output OUTPUT
                        output file to export
  -a, --with-audio      play audio track

Thanks for trying video-to-ascii!

四、用法

4.1 基础用法

video-to-ascii -f 视频路径

4.2 去掉颜色

video-to-ascii -f 视频路径 --strategy

4.3 输出到一个脚本文件

video-to-ascii -f 视频路径 -o xxx.sh

4.4 同时播放音乐

video-to-ascii -f 视频路径 --with-audio
发布了146 篇原创文章 · 获赞 25 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/qq_39680564/article/details/104005310
今日推荐