如何使用ffmpeg将VCD(dat文件)转成一批图片,再将这些图片转成另一个视频?

How to use ffmpeg to convert VCD(dat file) to a batch of images, then convert these images into another video?

我有一张旧 VCD,我想用 AI 技术增强它。我的问题是:

  1. 如何知道这张VCD(dat文件)的原始帧率?
  2. 如何将这张VCD分割成原始帧率的图像? (我不想错过一帧)
  3. google 有增强旧图像的技术吗?
  4. 所有图像都经过增强后,如何将它们重新组合成一个新视频?

如果这些是一些AI技术repair/convert整个VCD文件,也是不错的选择。

非常感谢!

好的,我来回答我的问题,老板们,你们可以随意投票关闭。

  1. 如何知道这张VCD(dat文件)的原始帧率?

使用这个命令:

ffmpeg -i target.dat -ss 00:01:00 -t 10 images/out-%08d.png

这将拆分视频的第一分钟,您将看到其原始帧速率

Input #0, mpeg, from 'MUSIC01-马礼堂养气功VCD.DAT':
  Duration: 00:58:04.32, start: 0.653333, bitrate: 1411 kb/s
    Stream #0:0[0x1e0]: Video: mpeg1video, yuv420p(tv), 352x288 [SAR 178:163 DAR 1958:1467], 1120 kb/s, 25 fps, 25 tbr, 90k tbn, 25 tbc
    Stream #0:1[0x1c0]: Audio: mp2, 44100 Hz, stereo, s16p, 224 kb/s

它是 25 fps,每帧图像大小为 352x288。

所有旧 VCD 的 fps 都相同 ( 25 )

does google has the tech to enhance the old images?
once all the images are enhanced , how to re-combine these into a new video?
  1. 如何将这张VCD分割成原始帧率的图像?
ffmpeg -i target.DAT images/out-%08d.png

这将生成如下图像:

out-00000001.png
out-00000002.png
out-00000003.png
...

  1. google 有增强旧图像的技术吗?

我不知道。将打开一个新的 thread/question.

  1. 所有图像都经过增强后,如何将它们重新组合成一个新视频?
ffmpeg -loglevel trace -f image2 -r 25 -pattern_type sequence -i 'tmp_enlarged_image_folder/vcd3-%08d.png' -vcodec libx264 test.mp4

参考convert from jpg to mp4 by ffmpeg