[FFmpeg-user] what's the standard way to concat and re-encode VOB's?

Sean Darcy seandarcy2 at gmail.com
Wed May 28 19:56:21 CEST 2014


Trying to re-encode some VOB's, I read in the FAQ that:

"A few multimedia containers (MPEG-1, MPEG-2 PS, DV) allow to 
concatenate video by merely concatenating the files containing them."

So I tried that which resulted in lots of errors:

cat VTS_01_[01234567].VOB VTS_02_[01].VOB  | ffmpeg -i - \
>  -c:v libx264 -preset slower -crf 23 -tune film -c:a copy \
>   output.mp4
ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
   built on May 24 2014 07:35:17 with gcc 4.8.2 (GCC) 20131212 (Red Hat 
4.8.2-7)
   configuration: --prefix=/usr --bindir=/usr/bin 
--datadir=/usr/share/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man 
--shlibdir=/usr/lib64 --extra-cflags='-Ofast -march=native -mtune=native 
-fopenmp -fomit-frame-pointer -pipe' --enable-avresample --enable-static 
--enable-shared --enable-gray --enable-gpl --enable-nonfree 
--enable-version3 --enable-postproc --enable-avfilter 
--enable-avresample --enable-pthreads --enable-x11grab --enable-gray 
--enable-vaapi --enable-hardcoded-tables --enable-libaacplus 
--enable-avisynth --enable-frei0r --enable-libfdk-aac --enable-libgsm 
--enable-libmp3lame --enable-libopenjpeg --enable-libopus 
--enable-librtmp --enable-libschroedinger --enable-libsoxr 
--enable-libspeex --enable-libtheora --enable-libvo-aacenc 
--enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 
--enable-libxvid --enable-zlib --disable-debug --cpu=amdfam10 
--arch=x86_64 --enable-pic --enable-libopencv --enable-openssl
   libavutil      52. 86.100 / 52. 86.100
   libavcodec     55. 64.100 / 55. 64.100
   libavformat    55. 40.100 / 55. 40.100
   libavdevice    55. 13.101 / 55. 13.101
   libavfilter     4.  5.100 /  4.  5.100
   libavresample   1.  2.  0 /  1.  2.  0
   libswscale      2.  6.100 /  2.  6.100
   libswresample   0. 19.100 /  0. 19.100
   libpostproc    52.  3.100 / 52.  3.100
Input #0, mpeg, from 'pipe:':
   Duration: N/A, start: 0.280633, bitrate: 192 kb/s
     Stream #0:0[0x1bf]: Data: dvd_nav_packet
     Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x480 
[SAR 8:9 DAR 4:3], max. 9100 kb/s, 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc
     Stream #0:2[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
[libx264 @ 0x1723e00] using SAR=8/9
[libx264 @ 0x1723e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 
AVX XOP FMA4 FMA3 LZCNT BMI1
[libx264 @ 0x1723e00] profile High, level 3.1
[libx264 @ 0x1723e00] 264 - core 142 r2M ac76440 - H.264/MPEG-4 AVC 
codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - 
options: cabac=1 ref=8 deblock=1:-1:-1 analyse=0x3:0x133 me=umh subme=9 
psy=1 psy_rd=1.00:0.15 mixed_ref=1 me_range=16 chroma_me=1 trellis=2 
8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-3 
threads=12 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 
interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 
b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 
keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=crf 
mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 
aq=1:1.00
[mp4 @ 0x1b38980] track 1: codec frame size is not set
Output #0, mp4, to 'output.mp4':
   Metadata:
     encoder         : Lavf55.40.100
     Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), 
yuv420p, 720x480 [SAR 8:9 DAR 4:3], q=-1--1, 29.97 fps, 60k tbn, 29.97 tbc
     Metadata:
       encoder         : Lavc55.64.100 libx264
     Stream #0:1: Audio: ac3 ([165][0][0][0] / 0x00A5), 48000 Hz, 
stereo, 192 kb/s
Stream mapping:
   Stream #0:1 -> #0:0 (mpeg2video -> libx264)
   Stream #0:2 -> #0:1 (copy)
[mpeg2video @ 0x16fc320] warning: first frame is no keyframe
...
mpeg2video @ 0x125d300] invalid cbp -1 at 6 3
[mpeg2video @ 0x125d300] invalid mb type in P Frame at 23 4
[mpeg2video @ 0x125d300] ac-tex damaged at 2 5
[mpeg2video @ 0x125d300] mb incr damaged
[mpeg2video @ 0x125d300] invalid cbp -1 at 28 10
[mpeg2video @ 0x125d300] ac-tex damaged at 5 12
[mpeg2video @ 0x125d300] ac-tex damaged at 4 14
[mpeg2video @ 0x125d300] ac-tex damaged at 33 15
[mpeg2video @ 0x125d300] ac-tex damaged at 10 16
[mpeg2video @ 0x125d300] ac-tex damaged at 11 17
.......
frame sync error
Error while decoding stream #0:2: Invalid data found when processing input
[ac3 @ 0x1270ba0] exponent out-of-range
[ac3 @ 0x1270ba0] error decoding the audio block
[ac3 @ 0x1270ba0] exponent out-of-range
[ac3 @ 0x1270ba0] error decoding the audio block
frame=112452 fps= 30 q=36.0 size=  568426kB time=01:02:31.61 
bitrate=1241.2kbits/s dup=58831 drop=837 [ac3 @ 0x1270ba0] new coupling 
strategy must be present in block 0
[ac3 @ 0x1270ba0] error decoding the audio block
[ac3 @ 0x1270ba0] new coupling strategy must be present in block 0
[ac3 @ 0x1270ba0] error decoding the audio block
[ac3 @ 0x1270ba0] new coupling strategy must be present in block 0
[ac3 @ 0x1270ba0] error decoding the audio block
frame=112462 fps= 30 q=36.0 size=  568525kB time=01:02:31.73 
bitrate=1241.4kbits/s dup=58837 drop=837 [ac3 @ 0x1270ba0] new coupling 
strategy must be present in block 0
[ac3 @ 0x1270ba0] error decoding the audio block
[ac3 @ 0x1270ba0] exponent out-of-range
[ac3 @ 0x1270ba0] error decoding the audio block
[ac3 @ 0x1270ba0] new coupling strategy must be present in block 0
[ac3 @ 0x1270ba0] error decoding the audio block
[ac3 @ 0x1270ba0] new coupling strategy must be present in block 0
[ac3 @ 0x1270ba0] error decoding the audio block
[ac3 @ 0x1270ba0] new coupling strategy must be present in block 0
[ac3 @ 0x1270ba0] error decoding the audio block
[ac3 @ 0x1270ba0] new coupling strategy must be present in block 0
[ac3 @ 0x1270ba0] error decoding the audio block
[ac3 @ 0x1270ba0] new coupling strategy must be present in block 0
[ac3 @ 0x1270ba0] error decoding the audio block
[mpeg2video @ 0x125d300] sequence header damaged
[ac3 @ 0x1270ba0] frame sync error


I then tried to follow the FAQ for the concat filter. It's recommended 
if you need to re-encode, but all the examples are copies.

The description and the examples are a lttle complex, so I'd like any 
comments on his command line:

ffmpeg -i 1.vob -i 2.vob ... -i N.vob  -filter_complex \
  '[0:0] [0:1] ... [0:N-1][1:0] [1:1]...[1:N-1]
   concat=n=N:v-1:v=1 [v] [a] ' \
   -map '[v]' -map '[a] \
   -c:v libx264 -preset slower -crf 30 -tune film \
   -c:a libfdk_aac  -profile:a aac_he_v2 -b:a 32k -signaling implicit \
    output.mp4

Thanks,

sean




More information about the ffmpeg-user mailing list