[FFmpeg-user] Extract images from concatenate .VOB
etienne.desautels at gmail.com
Mon Sep 14 16:16:23 CEST 2015
On 2015-09-12, at 05:45, Nicolas George wrote:
> Le quintidi 25 fructidor, an CCXXIII, Etienne Desautels a écrit :
>> I'm trying to extract images (frames) from some DVD. For this I think I
>> need to concatenate multiple .VOB (like VTS_01_1.VOB, VTS_01_2.VOB) to be
>> able to extract images that are in the second, third, etc. VOB.
> This is a common misconception. DVD structure is more complex than just a
> video stream split into several files. The VOB components are divided into
> cells, with possibly cells out of order or menus intermixed and very
> probably timestamp resets. All this is held together by the extra files,
> especially the IFO files.
> FFmpeg can not read the IFO files itself, but it contains a script in the
> tools directory that can generate a merging script: see tools/dvd2concat.
Thanks Nicolas for the quick answer.
With what you write, I understand that the concat:"VTS_01_1.VOB|VTS_01_2.VOB" command that I usually view in wikis will works only by chance, ie only when the DVD structure is simple and linear. As you know better then me, unfortunately it's often not the case. So now I understand that I need to use dvd2concat.pl to generate a good concat file. I was already using lsdvd to get proper duration values from DVD as ffprobe was wrong most of the time.
So, after finding the dvd2concat.pl script and updating lsdvd to the proper version I tested it. dvd2concat.pl worked fine and generated this file (truncated):
$ ./dvd2concat.pl /Volumes/DVD_VIDEO_RECORDER/ > concat.txt
ffconcat version 1.0
After that I tried extracting an image from this DVD, but that gives me an error. The output:
$ ffmpeg -ss 00:30:00.000 -f concat -i concat.txt -y -an -f image2 -vframes 1 frame1.jpg
ffmpeg version 2.5.4 Copyright (c) 2000-2015 the FFmpeg developers
built on Mar 3 2015 10:53:22 with gcc 4.2.1 (GCC) (Apple Inc. build 5666) (dot 3)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.5.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=gcc-4.2 --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libfaac --enable-libfdk-aac --enable-nonfree --enable-vda
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 13.100 / 56. 13.100
libavformat 56. 15.102 / 56. 15.102
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
[concat @ 0x10183c000] Unsafe file name 'subfile,,start,0,end,19398656,,:/Volumes/DVD_VIDEO_RECORDER//VIDEO_TS/VTS_01_1.VOB'
concat.txt: Operation not permitted
Do you have an idea about this problem?
In another vein, I found that it's a bit sad that the information about DVD structure but mostly about dvd2concat.pl is almost inexistent. For something that's common use with FFMpeg, ie working with DVD. I think it's why there's misconception.
More information about the ffmpeg-user