[FFmpeg-user] VOB files convertion failed

Zak ffmpeg-user-email at m.allo.ws
Wed May 9 12:04:55 EEST 2018


On 2018-05-07 at 8:13 PM EDT, Jamenson Ferreira Espindula de Almeida 
Melo wrote:
>  From Jaboatão dos Guararapes, Pernambuco, Brazil.
>
> Thank you for your response.
>
> Below is the listing of a DVD movie disc. I want to convert these files
> to one file. The files already are on my hard disk.
>
> total 4,2G
> -r--r--r-- 1 jamenson jamenson 124K fev  2  2010 video_ts.vob
> -r--r--r-- 1 jamenson jamenson 320M fev  2  2010 vts_01_0.vob
> -r--r--r-- 1 jamenson jamenson 1,0G fev  2  2010 vts_01_1.vob
> -r--r--r-- 1 jamenson jamenson 1,0G fev  2  2010 vts_01_2.vob
> -r--r--r-- 1 jamenson jamenson 1,0G fev  2  2010 vts_01_3.vob
> -r--r--r-- 1 jamenson jamenson 735M fev  2  2010 vts_01_4.vob
> -r--r--r-- 1 jamenson jamenson  11M fev  2  2010 vts_02_0.vob
> -r--r--r-- 1 jamenson jamenson 8,0K fev  2  2010 vts_02_1.vob
> -r--r--r-- 1 jamenson jamenson 8,0K fev  2  2010 vts_03_1.vob
> -r--r--r-- 1 jamenson jamenson 159M fev  2  2010 vts_04_1.vob
> -r--r--r-- 1 jamenson jamenson 8,0K fev  2  2010 vts_05_1.vob
>
> So, first of all, I concatenate the eleven files to one file with this
> command:
>
>
> cat *vob > crepusculo.vob
>
>
> Second I have analyze the contents of that file with this command:
>
>
> ffprobe -hide_banner -analyzeduration 500M -probesize 500M -i \
> crepusculo.vob
>
>
> The output of that command was:
>
>
> Input #0, mpeg, from '/tmp/crepusculo.vob':
>    Duration: 00:01:43.71, start: 0.280633, bitrate: 347394 kb/s
>      Stream #0:0[0x1bf]: Data: dvd_nav_packet
>      Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top \
>      first), 720x480 [SAR 32:27 DAR 16:9], 8000 kb/s, 29.97 fps, 29.97 \
>      tbr, 90k tbn, 59.94 tbc
>
>      Stream #0:2[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
>      Stream #0:3[0x20]: Subtitle: dvd_subtitle
>      Stream #0:4[0x21]: Subtitle: dvd_subtitle
>      Stream #0:5[0x81]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
> Unsupported codec with id 100357 for input stream 0
>
>
> ffmpeg -version output:
>
>
> ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
> built with gcc 7.2.0 (GCC)
> configuration: --prefix=/usr --enable-gpl --enable-version3 \
> --enable-nonfree --disable-static --enable-shared --disable-debug \
> --enable-libass --enable-libfdk-aac --enable-libfreetype \
> --enable-libmp3lame --enable-libopus --enable-libtheora \
> --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 \
> --enable-openssl --docdir=/usr/share/doc/ffmpeg-3.3.3
>
> libavutil      55. 58.100 / 55. 58.100
> libavcodec     57. 89.100 / 57. 89.100
> libavformat    57. 71.100 / 57. 71.100
> libavdevice    57.  6.100 / 57.  6.100
> libavfilter     6. 82.100 /  6. 82.100
> libswscale      4.  6.100 /  4.  6.100
> libswresample   2.  7.100 /  2.  7.100
> libpostproc    54.  5.100 / 54.  5.100
>
>
> First try: I tried the Matroska container. Below is the command:
>
>
> ffmpeg -analyzeduration 500M -probesize 500M -i crepusculo.vob \
> -map 0:1 -map 0:2 -map 0:3 -map 0:4 -map 0:5 \
> -metadata:s:a:0 language=eng -metadata:s:a:0 title="English stereo" \
> -metadata:s:a:1 language=por -metadata:s:a:1 title="Português estereo" \
> -metadata:s:s:0 language=eng -metadata:s:s:0 title="English" \
> -metadata:s:s:1 language=por -metadata:s:s:1 title="Português" \
> -codec:v copy -crf 20 -codec:a copy -qscale:a 2 -codec:s copy \
> crepusculo.mkv
>
>
> The command output was:
>
>
> ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
>    built with gcc 7.2.0 (GCC)
>    configuration: --prefix=/usr --enable-gpl --enable-version3 \
>    --enable-nonfree --disable-static --enable-shared --disable-debug \
>    --enable-libass --enable-libfdk-aac --enable-libfreetype \
>    --enable-libmp3lame --enable-libopus --enable-libtheora \
>    --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 \
>    --enable-openssl --docdir=/usr/share/doc/ffmpeg-3.3.3
>
>    libavutil      55. 58.100 / 55. 58.100
>    libavcodec     57. 89.100 / 57. 89.100
>    libavformat    57. 71.100 / 57. 71.100
>    libavdevice    57.  6.100 / 57.  6.100
>    libavfilter     6. 82.100 /  6. 82.100
>    libswscale      4.  6.100 /  4.  6.100
>    libswresample   2.  7.100 /  2.  7.100
>    libpostproc    54.  5.100 / 54.  5.100
> Input #0, mpeg, from 'crepusculo.vob':
>    Duration: 00:01:43.71, start: 0.280633, bitrate: 347394 kb/s
>      Stream #0:0[0x1bf]: Data: dvd_nav_packet
>      Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top \
>      first), 720x480 [SAR 32:27 DAR 16:9], 8000 kb/s, 29.97 fps, 29.97 \
>      tbr, 90k tbn, 59.94 tbc
>
>      Stream #0:2[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
>      Stream #0:3[0x20]: Subtitle: dvd_subtitle
>      Stream #0:4[0x21]: Subtitle: dvd_subtitle
>      Stream #0:5[0x81]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
> Output #0, matroska, to 'crepusculo.mkv':
>    Metadata:
>      encoder         : Lavf57.71.100
>      Stream #0:0: Video: mpeg2video (Main) (mpg2 / 0x3267706D), \
>      yuv420p(tv, top first), 720x480 [SAR 32:27 DAR 16:9], q=2-31, 8000 \
>      kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 90k tbc
>
>      Stream #0:1(eng): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, \
>      5.1(side), fltp, 448 kb/s
>
>      Metadata:
>        title           : English stereo
>      Stream #0:2(eng): Subtitle: dvd_subtitle
>      Metadata:
>        title           : English
>      Stream #0:3(por): Subtitle: dvd_subtitle
>      Metadata:
>        title           : Português
>      Stream #0:4(por): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, \
>      5.1(side), fltp, 448 kb/s
>
>      Metadata:
>        title           : Português estereo
> Stream mapping:
>    Stream #0:1 -> #0:0 (copy)
>    Stream #0:2 -> #0:1 (copy)
>    Stream #0:3 -> #0:2 (copy)
>    Stream #0:4 -> #0:3 (copy)
>    Stream #0:5 -> #0:4 (copy)
> Press [q] to stop, [?] for help
> [matroska @ 0xd5a240] Non-monotonous DTS in output stream 0:0; \
> previous: 16, current: -33; changing to 16. This may result in \
> incorrect timestamps in the output file.
>
> [matroska @ 0xd5a240] Non-monotonous DTS in output stream 0:0; \
> previous: 16, current: 0; changing to 16. This may result in \
> incorrect timestamps in the output file.
>
> [matroska @ 0xd5a240] Timestamps are unset in a packet for \
> stream 0. This is deprecated and will stop working in the \
> future. Fix your code to set the timestamps properly
>
> [matroska @ 0xd5a240] Can't write packet with unknown timestamp
> av_interleaved_write_frame(): Invalid argument
>
> [matroska @ 0xd5a240] Can't write packet with unknown timestamp
> Error writing trailer of crepusculo.mkv: Invalid argument
>
> frame=  305 fps=0.0 q=-1.0 Lsize=     231kB time=00:00:10.07 \
> bitrate= 187.4kbits/s speed= 321x
>
> video:6008kB audio:154kB subtitle:0kB other streams:0kB global \
> headers:0kB muxing overhead: unknown
> Conversion failed!
>
>
> Second try: I tried to change the container to mp4. The command line
> looks like this:
>
>
> ffmpeg -analyzeduration 500M -probesize 500M -i crepusculo.vob \
> -map 0:1 -map 0:2 -map 0:3 -map 0:4 -map 0:5 \
> -metadata:s:a:0 language=eng -metadata:s:a:0 title="English stereo" \
> -metadata:s:a:1 language=por -metadata:s:a:1 title="Português estereo" \
> -metadata:s:s:0 language=eng -metadata:s:s:0 title="English" \
> -metadata:s:s:1 language=por -metadata:s:s:1 title="Português" \
> -codec:v copy -crf 20 -codec:a copy -qscale:a 2 -codec:s copy \
> crepusculo.mp4
>
>
> The command output was:
>
>
> ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
>    built with gcc 7.2.0 (GCC)
>    configuration: --prefix=/usr --enable-gpl --enable-version3 \
>    --enable-nonfree --disable-static --enable-shared --disable-debug \
>    --enable-libass --enable-libfdk-aac --enable-libfreetype \
>    --enable-libmp3lame --enable-libopus --enable-libtheora \
>    --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 \
>    --enable-openssl --docdir=/usr/share/doc/ffmpeg-3.3.3
>
>    libavutil      55. 58.100 / 55. 58.100
>    libavcodec     57. 89.100 / 57. 89.100
>    libavformat    57. 71.100 / 57. 71.100
>    libavdevice    57.  6.100 / 57.  6.100
>    libavfilter     6. 82.100 /  6. 82.100
>    libswscale      4.  6.100 /  4.  6.100
>    libswresample   2.  7.100 /  2.  7.100
>    libpostproc    54.  5.100 / 54.  5.100
> Input #0, mpeg, from 'crepusculo.vob':
>    Duration: 00:01:43.71, start: 0.280633, bitrate: 347394 kb/s
>      Stream #0:0[0x1bf]: Data: dvd_nav_packet
>      Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top \
>      first), 720x480 [SAR 32:27 DAR 16:9], 8000 kb/s, 29.97 fps, 29.97 \
>      tbr, 90k tbn, 59.94 tbc
>
>      Stream #0:2[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
>      Stream #0:3[0x20]: Subtitle: dvd_subtitle
>      Stream #0:4[0x21]: Subtitle: dvd_subtitle
>      Stream #0:5[0x81]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
> [mp4 @ 0x1079240] track 1: codec frame size is not set
> [mp4 @ 0x1079240] track 4: codec frame size is not set
> Output #0, mp4, to 'crepusculo.mp4':
>    Metadata:
>      encoder         : Lavf57.71.100
>      Stream #0:0: Video: mpeg2video (Main) (a[0][0][0] / 0x0061), \
>      yuv420p(tv, top first), 720x480 [SAR 32:27 DAR 16:9], q=2-31, 8000 \
>      kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
>
>      Stream #0:1(eng): Audio: ac3 ([165][0][0][0] / 0x00A5), 48000 Hz, \
>      5.1(side), fltp, 448 kb/s
>
>      Metadata:
>        title           : English stereo
>      Stream #0:2(eng): Subtitle: dvd_subtitle ([224][0][0][0] / 0x00E0)
>      Metadata:
>        title           : English
>      Stream #0:3(por): Subtitle: dvd_subtitle ([224][0][0][0] / 0x00E0)
>      Metadata:
>        title           : Português
>      Stream #0:4(por): Audio: ac3 ([165][0][0][0] / 0x00A5), 48000 Hz, \
>      5.1(side), fltp, 448 kb/s
>
>      Metadata:
>        title           : Português estereo
> Stream mapping:
>    Stream #0:1 -> #0:0 (copy)
>    Stream #0:2 -> #0:1 (copy)
>    Stream #0:3 -> #0:2 (copy)
>    Stream #0:4 -> #0:3 (copy)
>    Stream #0:5 -> #0:4 (copy)
> Press [q] to stop, [?] for help
> [mp4 @ 0x1079240] Non-monotonous DTS in output stream 0:0; previous: \
> 1447, current: -3003; changing to 1448. This may result in incorrect \
> timestamps in the output file.
>
> [mp4 @ 0x1079240] Non-monotonous DTS in output stream 0:0; previous: \
> 1448, current: 0; changing to 1449. This may result in incorrect \
> timestamps in the output file.
>
> [mp4 @ 0x1079240] Timestamps are unset in a packet for stream 0. This \
> is deprecated and will stop working in the future. Fix your code to \
> set the timestamps properly
>
> [mp4 @ 0x1079240] pts has no value
>      Last message repeated 648 times
> frame= 2722 fps=0.0 q=-1.0 size=   61241kB time=00:01:30.72 \
> bitrate=5529.9kbits/s speed= 181x
> [mp4 @ 0x1079240] pts has no \
> value
>
>      Last message repeated 655 times
> frame= 5180 fps=5179 q=-1.0 size=  123840kB time=00:02:52.73 \
> bitrate=5873.0kbits/s speed= 173x
> [mp4 @ 0x1079240] pts has no \
> value
>
>      Last message repeated 503 times
> [mp4 @ 0x1079240] Application provided invalid, non monotonically \
> increasing dts to muxer in stream 2: 17129112 >= 16543527
>
> av_interleaved_write_frame(): Invalid argument
> [mp4 @ 0x1079240] pts has no value
>      Last message repeated 79 times
> frame= 7070 fps=5123 q=-1.0 Lsize=  179654kB time=00:03:55.81 \
> bitrate=6241.0kbits/s speed= 171x
>
> video:174140kB audio:5395kB subtitle:22kB other streams:0kB global \
> headers:0kB muxing overhead: 0.054197%
> Conversion failed!
>
>
> What I should do to solve that?
>
> Thank you.
>
> Jamenson Ferreira Espindula de Almeida Melo
> GNU/Linux user # 166197
> https://linuxcounter.net/cert/166197.png
>
> Key fingerprint:
> 234D 1914 4224 7C53 BD13  6855 2AE0 25C0 08A8 6180
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".

Hello Jamenson,

You cannot use cat (Unix utility) to concatenate .VOB files.

You cannot use the FFmpeg concat filter to concatenate ALL of the .VOB 
files, and you tried to do all of them. (This might work in extremely 
rare cases, but I doubt it ever does with a realistic DVD.)

The answer from Micael Silva hints at the problem with concatenating 
everything, but let me go more in depth:

The video_ts.vob file is not really movie content, it is metadata.

The vts_xx_y.vob files may or may not be movie content, but they VERY 
often have different stream(s) in them. VTS stands for "Video Title 
Set". The xx, the 2-digit number, is the title. The feature film is one 
title (almost always). On your DVD, the feature film is vts_01_y.vob, so 
it is "title 01". The feature film is usually title 01 or title N, where 
N is the biggest number used on the disc.

Within a given title, such as vts_01_y.vob (the feature film on your 
DVD), there are up to 10 VOB files, with y from 0 to 9. The file 
vts_01_0.vob, with y == 0, may or may not be safe to concatenate with 
the rest of this title, it may or may not have the same streams. Yours 
is 320 megabytes, so it might be safe. If it was super small, then it 
would likely just be a menu.

The VOB files vts_01_y.vob for y from 0 or 1 to as high as it goes (y == 
4, for your DVD) can be safely concatenated, and the result will be one 
title. In your DVD, this one title will be the feature film. 
vts_02_y.vob, vts_03_y.vob, and the other titles are likely special 
features, and they cannot be concatenated safely. They likely have 
different streams, and possibly even different resolution, frame rates, 
or all kinds of differences that will not fit inside a single MKV file.

SUMMARY: You only want to concatenate VOB files from the same title. The 
other titles (2 through 5, on your example DVD) are special features or 
something, they are not the movie itself. You also want to avoid the 
video_ts.vob file and you may need to avoid the vts_xx_0.vob file.

More notes:

1. I don't think you can use -codec:v copy -crf 20. It doesn't seem like 
it should be allowed. -codec:v copy means "don't touch the bytes", but 
-crf 20 implies you want to use libx264 and you want that quality of output.

2. I don't think you can use -codec:a copy -qscale:a 2 for a similar 
reason, 'copy' means "don't touch the bytes".

3. You can maybe theoretically use -codec:s copy with the output being a 
.MKV file, but DVD subtitles are very user-unfriendly in MKV containers. 
If at all possible, I suggest using WebVTT or SubRip (filename.srt) 
format subtitles in your MKV file. The subtitles on the DVD are not 
actually text, they are images. They need to be processed by OCR and 
then converted into a text-based subtitle format such as WebVTT or 
SubRip (filename.srt).

4. The MP4 container file can't handle several of those things: It can't 
handle subtitles in that format, it can't handle audio in that format 
(edit: actually, it looks like VLC will play an MP4 file with AC-3 
audio, but iTunes will not), and it may not be able to handle two full 
5.1-channel audio streams, I forget. In fact, MP4 files almost don't 
handle subtitles at all, they support one format that is weird, if I 
recall correctly.

5. Depending on your goals, I'm not sure if FFmpeg is what you want to 
use to convert this DVD into a more user-friendly MKV or MP4 file. I 
might suggest HandBrake with the GUI interface, I suspect it may do what 
you want. FFmpeg is utterly impressive, it can do a huge array of 
things, but the HandBrake GUI application will find the names for the 
"titles" on the DVD (the feature film, the making of featurette, the 
deleted scenes), it will ignore vts_01_0.vob if it needs to but keep it 
if it should, stuff like that. You can select "MP4" from the drop-down 
menu and then it will tell you "I can't put AC-3 audio in an MP4 
container, please use a MKV container or I might I suggest transcoding 
to AAC". It's not as awesome as FFmpeg, but given the VOB files you have 
and the MKV or MP4 you want to make, HandBrake can probably do it much 
less painfully.

Good luck,

Zak



More information about the ffmpeg-user mailing list