如何用ffmpeg提取帧?我做错了什么?


1

我正在尝试使用FFMpeg从MP4中提取帧。

当我跑:

ffmpeg -i aaa.mp4 -r 10 extraced%03d.png

我一直收到这个错误:

Could not open file extracted"path-were-ffmpeg.exe-is/a.bat3d.png"

av_interleaved_write_frame<>: input/output error

为什么我得到那个文件名?我正在使用批处理脚本来执行此操作,这是错误的吗?


你试过这个: ffmpeg -i aaa.mp4 -r 1/1 $extracted%03d.png
Ĭsααc tիε βöss

是什么 fps 你的视频(帧率)?尝试使用 jpg 要么 bmp 代替 png
Ĭsααc tիε βöss

@Ĭsααctիεβöss:我尝试了你告诉我的一切,但没有任何工作。我现在知道为什么,它不能从批处理脚本中完成,只能从cmd完成。我使用我发布的命令行,它从那里工作。谢谢和欢呼。
Churchill

请在下面发布详细的答案。现在,有点不清楚脚本的样子以及确切的错误是什么(完整的日志丢失)
slhck
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.