视频播放结束后如何关闭ffplay? [英] How to close ffplay when video is over?

查看:149
本文介绍了视频播放结束后如何关闭ffplay?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用ffprobe获取持续时间.

To get the duration time with ffprobe.

ffprobe test.mp3 2>&1 | awk -F'[ ,]' '/Duration/{print $4}'
00:03:51.05

使用-t参数设置持续时间.

To set duration time with -t argument.

ffplay  -t '231'  test.mp3

当test.mp3结束时,ffplay命令无法停止.
视频结束后如何关闭ffplay?

The ffplay command can't stop when test.mp3 is over.
How to close ffplay when video is over?

推荐答案

添加 -autoexit ,即

ffplay -autoexit -t '231'  test.mp3

这篇关于视频播放结束后如何关闭ffplay?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆