简体   繁体   English

使用 FFMPEG 将所有视频帧提取为图像

[英]Extract all video frames as images with FFMPEG

I am trying to convert a MP4 video file into a series of jpg images (out-1.jpg, out-2.jpg etc.) using FFMPEG with,我正在尝试使用 FFMPEG 将 MP4 视频文件转换为一系列 jpg 图像(out-1.jpg、out-2.jpg 等),

mkdir frames
ffmpeg -i "%1" -r 1 frames/out-%03d.jpg

I am trying to convert a MP4 video file into a series of jpg images (out-1.jpg, out-2.jpg etc.) using FFMPEG with,我正在尝试使用 FFMPEG 将 MP4 视频文件转换为一系列 jpg 图像(out-1.jpg、out-2.jpg 等),

mkdir frames
ffmpeg -i "%1" -r 1 frames/out-%03d.jpg

However I keep getting errors like,但是我不断收到错误,例如,

[image2 @ 00000037f5a811a0] Could not open file : frames/out-C:\\Applications\\FFMPEG\\toGIF.bat3d.jpg av_interleaved_write_frame(): Input/output error frame= 1 fps=0.0 q=5.9 Lsize=N/A time=00:00:01.00 bitrate=N/A video:63kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Conversion failed! [image2 @ 00000037f5a811a0] 无法打开文件:frames/out-C:\\Applications\\FFMPEG\\toGIF.bat3d.jpg av_interleaved_write_frame():输入/输出错误帧= 1 fps=0.0 q=5.9 Lsize=N/A time= 00:00:01.00 比特率=N/A 视频:63kB 音频:0kB 字幕:0kB 其他流:0kB 全局头:0kB 复用开销:未知 转换失败!

If I take out the %03d part, the conversion works but it only outputs the first frame and the program stops with error.如果我取出 %03d 部分,转换会起作用,但它只输出第一帧,程序会因错误而停止。

How can I correctly extract all the frames of the video with FFMPEG?如何使用 FFMPEG 正确提取视频的所有帧?

I am trying to convert a MP4 video file into a series of jpg images (out-1.jpg, out-2.jpg etc.) using FFMPEG with,我正在尝试使用 FFMPEG 将 MP4 视频文件转换为一系列 jpg 图像(out-1.jpg、out-2.jpg 等),

mkdir frames
ffmpeg -i "%1" -r 1 frames/out-%03d.jpg

However I keep getting errors like,但是我不断收到错误,例如,

[image2 @ 00000037f5a811a0] Could not open file : frames/out-C:\\Applications\\FFMPEG\\toGIF.bat3d.jpg av_interleaved_write_frame(): Input/output error frame= 1 fps=0.0 q=5.9 Lsize=N/A time=00:00:01.00 bitrate=N/A video:63kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Conversion failed! [image2 @ 00000037f5a811a0] 无法打开文件:frames/out-C:\\Applications\\FFMPEG\\toGIF.bat3d.jpg av_interleaved_write_frame():输入/输出错误帧= 1 fps=0.0 q=5.9 Lsize=N/A time= 00:00:01.00 比特率=N/A 视频:63kB 音频:0kB 字幕:0kB 其他流:0kB 全局头:0kB 复用开销:未知 转换失败!

If I take out the %03d part, the conversion works but it only outputs the first frame and the program stops with error.如果我取出 %03d 部分,转换会起作用,但它只输出第一帧,程序会因错误而停止。

How can I correctly extract all the frames of the video with FFMPEG?如何使用 FFMPEG 正确提取视频的所有帧?

I am trying to convert a MP4 video file into a series of jpg images (out-1.jpg, out-2.jpg etc.) using FFMPEG with,我正在尝试使用 FFMPEG 将 MP4 视频文件转换为一系列 jpg 图像(out-1.jpg、out-2.jpg 等),

mkdir frames
ffmpeg -i "%1" -r 1 frames/out-%03d.jpg

However I keep getting errors like,但是我不断收到错误,例如,

[image2 @ 00000037f5a811a0] Could not open file : frames/out-C:\\Applications\\FFMPEG\\toGIF.bat3d.jpg av_interleaved_write_frame(): Input/output error frame= 1 fps=0.0 q=5.9 Lsize=N/A time=00:00:01.00 bitrate=N/A video:63kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Conversion failed! [image2 @ 00000037f5a811a0] 无法打开文件:frames/out-C:\\Applications\\FFMPEG\\toGIF.bat3d.jpg av_interleaved_write_frame():输入/输出错误帧= 1 fps=0.0 q=5.9 Lsize=N/A time= 00:00:01.00 比特率=N/A 视频:63kB 音频:0kB 字幕:0kB 其他流:0kB 全局头:0kB 复用开销:未知 转换失败!

If I take out the %03d part, the conversion works but it only outputs the first frame and the program stops with error.如果我取出 %03d 部分,转换会起作用,但它只输出第一帧,程序会因错误而停止。

How can I correctly extract all the frames of the video with FFMPEG?如何使用 FFMPEG 正确提取视频的所有帧?

不可能在 Windows 批处理文件中执行,因为每个 %x 都被解释为传递给批处理文件的参数

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM