[FFmpeg-user] Extract images from concatenate .VOB

Etienne Desautels etienne.desautels at gmail.com
Wed Oct 7 16:03:15 CEST 2015


Hi,

I'm still trying to extract frames accurately from DVD using dvd2concat to produce a concat text file and seek option before the input, so extraction is fast.

I realized that my previous tests were done with an old version of FFmpeg. That was a mistake. I redone my tests with version 2.8 and also with latest snapshot (N-75786-g6f1ccca). The results are identical. When using seek before the input, the frames are not extracted accurately. Now I'm not sure if I'm getting only keyframes because, if I seek and extract every successive frames I can have something like this:
frame 1
frame 2 (same as frame 1)
frame 3 (same as frame 1)
frame 4 (same as frame 1)
frame 5 (same as frame 1)
frame 6 (new frame)
frame 7 (new frame)
frame 8 (new frame)
frame 9 (same as frame 8)
frame 10 (same as frame 8)
frame 11 (new frame)
etc.

But I definitely don't get every frames.

Typical output:
ffmpeg -accurate_seek -f concat -safe 0 -ss 00:02:31.367 -i dvd_concat.txt -y -an -f image2 -vframes 1 -q:v 4 frame6.jpg
ffmpeg version N-75786-g6f1ccca Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1)
  configuration: --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
  libavutil      55.  2.100 / 55.  2.100
  libavcodec     57.  4.100 / 57.  4.100
  libavformat    57.  3.100 / 57.  3.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 10.100 /  6. 10.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, concat, from 'dvd_concat.txt':
  Duration: 00:38:16.50, start: 0.225367, bitrate: 0 kb/s
    Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, smpte170m), 704x480 [SAR 10:11 DAR 4:3], Closed Captions, max. 9558 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
[swscaler @ 0x23e9e20] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'frame6.jpg':
  Metadata:
    encoder         : Lavf57.3.100
    Stream #0:0: Video: mjpeg, yuvj420p(pc), 704x480 [SAR 10:11 DAR 4:3], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc
    Metadata:
      encoder         : Lavc57.4.100 mjpeg
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (native) -> mjpeg (native))
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=4.0 Lsize=N/A time=00:00:00.03 bitrate=N/A dup=1 drop=1    
video:19kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

I would like to know if this feature is just not implemented, or if it's a bug or if I'm doing something wrong.

I will have to extract frames accurately from at least hundreds of DVD and if I can figure out a way to extract them fast, like 1 sec. instead of many, many minutes, it will be a big plus for us. 

Regards,
Etienne Desautels


More information about the ffmpeg-user mailing list