linux - 如何将视频时间添加到 ffmpeg 文件名?

标签 linux image video ffmpeg video-capture

这个问题在这里已经有了答案:





ffmpeg output images filename with time position

(2 个回答)



Get the second on which the thumbnail was generated

(1 个回答)


1年前关闭。




我每 5 秒使用 1 帧从视频中提取帧

ffmpeg -i vid.mp4 -r 0.2 frames/frame_%04d.png
并且我想在文件名中添加视频内时间(即自视频以 x1 速度开始所耗时)(而不是像相关问题中所问的时间戳)。可能像的东西
frame_0001_0000.png, frame_0002_0005.png, frame_0003_0010.png, ...
# would stand for
# frame #1 at 00:00, frame #2 at 00:05, frame #3 at 00:10, ...
由于 ffmpeg 在处理时会打印此信息,我认为这可能吗?我不想依赖 (frame_number * 1/r) 因为通常会有一些额外的帧使结果关闭。
提前致谢。

最佳答案

我认为现在不可能。然而,几年前有一个废弃的票+补丁将此功能添加到 ffmpeg。
https://trac.ffmpeg.org/ticket/1452
你应该能够挽救那个补丁,但它可能需要一些修改,因为 ffmpeg 从那时起已经发展了。

关于linux - 如何将视频时间添加到 ffmpeg 文件名?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65458656/

相关文章:

linux - bash rm 删除旧文件只删除第一个

WPF 图像与 XAML

Android 图像被压扁

css - 如何在源重定向时显示 CSS 背景图像?

linux - 在 linux 上加入 AVCHD .mts 文件

ios - AVPlayer 在模拟器上运行但不是真实设备

linux - 使用linux sed用特殊字符替换字符串

php - UTF-8贯穿始终

linux - 挂载/卸载 USB 笔式驱动器后运行命令

android - 如何在 C 中编写 ffmpeg 命令 shell