video - ffplay:显示时间戳(暂停时)
问题描述
可以像这样使用 ffplay 显示时间戳:
ffplay -vf "drawtext=text='%{pts\:hms}':fontcolor=white:shadowcolor=black:shadowx=3:shadowy=3:fontsize=48:x=(w-tw)/2:y=h-(2*lh)" video.mp4
但是,我只想在视频暂停时显示时间戳。
ffplay可以吗?此外,如果可能的话,我希望在浏览视频时暂时显示时间戳。
解决方案
不完全符合您的要求,但请尝试mpv
使用bookmarker.lua
.
创建配置文件后,如https://github.com/nimatrueway/mpv-[bookmark-lua-script][1]所述,您将能够使用以下快捷方式保存/检索时间戳书签(已保存在JSON
文件中):
Ctrl+1 script_message bookmark-set 1 # `Ctrl+1` will "save current filePath and seekPos to bookmark #1 slot"
Alt+1 script_message bookmark-load 1 # `Alt+2` will "restore current filePath and seekPos from bookmark #1 slot"
Alt+Ctrl+1 script_message bookmark-peek 1 # `Alt+Ctrl+2` will give you a "peek of the filename, its immediate parent directory and seek-pos saved in the bookmark #1 slot"
Ctrl+2 script_message bookmark-set 2
Alt+2 script_message bookmark-load 2
Alt+Ctrl+2 script_message bookmark-peek 2
s script_message bookmark-update # `s` will update last saved/restored bookmark
d script_message bookmark-peek-current # `d` will peek last saved/restored bookmark (lastest saved/restored bookmark is only considered if current file is in the same directory as the bookmark file)
u script_message bookmark-set-undo # `u` will undo/revert last save or update action
推荐阅读
- oracle - 仅以读取权限执行的数据库函数
- java - 将数字数组转换为单词数组
- angular - Angular Observer 在组件上捕获错误
- azure - Azure AKS HPA 无法获得 CPU 利用率
- sql-server - SQL Server 错误 80040e14 在结果集中使用经典 ASP
- python - 如何使用 Pandas 编写分区 Parquet 文件
- junit - 如何使用powermock在测试方法中设置类的私有成员变量
- android - kotlin 中的“单例”模式方法最好的方法
- angular6 - Angular 6:未定义警报
- windows - Windows Batch:将文件路径存储到变量不起作用