[FFmpeg-user] can't reorder streams and concatenate vob's

sean darcy seandarcy2 at gmail.com
Thu Nov 8 18:53:20 EET 2018


I'm trying to reorder streams in a VOB.

ffprobe old-B.VOB
..............
Input #0, mpeg, from 'old-B.VOB':
   Duration: 00:03:30.02, start: 0.500000, bitrate: 8112 kb/s
     Stream #0:0[0x80]: Audio: ac3, 48000 Hz, mono, fltp, 384 kb/s
     Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, 
progressive), 720x480 [SAR 8:9 DAR 4:3], 29.97 fps, 59.94 tbr, 90k tbn, 
59.94 tbc


I do this:
ffmpeg -i old-B.VOB -map 0:1 -map 0:0 -c copy B.VOB
ffmpeg version git-snapshot-20180928-RPMFusion Copyright (c) 2000-2018 
the FFmpeg developers
.........
Input #0, mpeg, from 'old-B.VOB':
   Duration: 00:03:30.02, start: 0.500000, bitrate: 8112 kb/s
     Stream #0:0[0x80]: Audio: ac3, 48000 Hz, mono, fltp, 384 kb/s
     Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, 
progressive), 720x480 [SAR 8:9 DAR 4:3], 29.97 fps, 59.94 tbr, 90k tbn, 
59.94 tbc
[svcd @ 0x18d1380] VBV buffer size not set, using default size of 230KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
Output #0, svcd, to 'B.VOB':
   Metadata:
     encoder         : Lavf58.18.103
     Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, progressive), 
720x480 [SAR 8:9 DAR 4:3], q=2-31, 29.97 fps, 59.94 tbr, 90k tbn, 29.97 tbc
     Stream #0:1: Audio: ac3, 48000 Hz, mono, fltp, 384 kb/s
Stream mapping:
   Stream #0:1 -> #0:0 (copy)
   Stream #0:0 -> #0:1 (copy)

which looks like it works.

BUT:

ffprobe B.VOB
............
Input #0, mpeg, from 'B.VOB':
   Duration: 00:03:30.02, start: 0.500000, bitrate: 8112 kb/s
     Stream #0:0[0x80]: Audio: ac3, 48000 Hz, mono, fltp, 384 kb/s
     Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, 
progressive), 720x480 [SAR 8:9 DAR 4:3], 29.97 fps, 59.94 tbr, 90k tbn, 
59.94 tbc

I'm trying to reorder the streams to make concatenation work. I can 
encode each of B.VOB and C.VOB into mp4 without problems.


ffprobe C.VOB
............
Input #0, mpeg, from 'C.VOB':
   Duration: 00:02:46.50, start: 0.533367, bitrate: 6297 kb/s
     Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top 
first), 720x480 [SAR 8:9 DAR 4:3], 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc
     Stream #0:1[0x80]: Audio: ac3, 48000 Hz, mono, fltp, 192 kb/s


But concatenation does not work.
cat BC.txt
file 'B.VOB'
file 'C.VOB'

ffmpeg -f concat -i BC.txt  -r 24000/1001 -flags +ilme+ildct -c:a copy 
list.mp4
...........
Input #0, concat, from 'BC.txt':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #0:0: Audio: ac3, 48000 Hz, mono, fltp, 384 kb/s
     Stream #0:1: Video: mpeg2video (Main), yuv420p(tv, progressive), 
720x480 [SAR 8:9 DAR 4:3], 29.97 fps, 59.94 tbr, 90k tbn, 90k tbc
Stream mapping:
   Stream #0:1 -> #0:0 (mpeg2video (native) -> h264 (libx264))
   Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[libx264 @ 0x18ff4c0] interlace + weightp is not implemented
[libx264 @ 0x18ff4c0] using SAR=8/9
[libx264 @ 0x18ff4c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 
AVX FMA3 BMI2 AVX2
[libx264 @ 0x18ff4c0] profile High, level 3.0, 4:2:0, 8-bit
[libx264 @ 0x18ff4c0] 264 - core 157 - H.264/MPEG-4 AVC codec
............
[mp4 @ 0x1744180] track 1: codec frame size is not set
Output #0, mp4, to 'list.mp4':
   Metadata:
     encoder         : Lavf58.18.103
     Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 
720x480 [SAR 8:9 DAR 4:3], q=-1--1, 23.98 fps, 24k tbn, 23.98 tbc
     Metadata:
       encoder         : Lavc58.31.101 libx264
     Side data:
       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
     Stream #0:1: Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, mono, fltp, 
384 kb/s
[mpeg2video @ 0x1777e00] ignoring extra picture following a 
frame-picture7kbits/s dup=12 drop=0 speed=9.43x
     Last message repeated 2 times
[mpeg2video @ 0x1777e00] Missing picture start code
[mpeg2video @ 0x1777e00] ignoring extra picture following a frame-picture
     Last message repeated 2 times
[mp4 @ 0x1744180] Non-monotonous DTS in output stream 0:1; previous: 
10079232, current: 10079166; changing to 10079233. This may result in 
incorrect timestamps in the output file.
[mpeg2video @ 0x1777e00] ignoring extra picture following a frame-picture
     Last message repeated 2 times
[mpeg2video @ 0x1777e00] Missing picture start code
[mpeg2video @ 0x1777e00] ignoring extra picture following a frame-picture
[mpeg2video @ 0x1777e00] Missing picture start code
[mpeg2video @ 0x1777e00] ignoring extra picture following a frame-picture
[mpeg2video @ 0x1777e00] Missing picture start code
[mpeg2video @ 0x1777e00] slice below image (128 >= 30)
Error while decoding stream #0:1: Invalid data found when processing input
[mpeg2video @ 0x1777e00] ignoring extra picture following a frame-picture
     Last message repeated 11 times
..............

The errors start about where C.VOB begins. I'm guessing the problem is 
that the a/v streams are different in each vob.

I also tried -map  :

ffmpeg -f concat -i BC.txt  -r 24000/1001 -flags +ilme+ildct -map v -map 
a:i#0x80 -c:a copy list.mp4

Same result.

And C.VOB encodes without error:

ffmpeg  -i C.VOB  -r 24000/1001 -flags +ilme+ildct -map v:i#0x1e0 -map 
a:i#0x80 -c:a copy list.mp4
......
Input #0, mpeg, from 'C.VOB':
   Duration: 00:02:46.50, start: 0.533367, bitrate: 6297 kb/s
     Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top 
first), 720x480 [SAR 8:9 DAR 4:3], 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc
     Stream #0:1[0x80]: Audio: ac3, 48000 Hz, mono, fltp, 192 kb/s
Stream mapping:
   Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
   Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[libx264 @ 0x8899c0] interlace + weightp is not implemented
[libx264 @ 0x8899c0] using SAR=8/9
[libx264 @ 0x8899c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 
AVX FMA3 BMI2 AVX2
[libx264 @ 0x8899c0] profile High, level 3.0, 4:2:0, 8-bit
[libx264 @ 0x8899c0] 264 - core 157 - H.264/MPEG-4 AVC codec
..........
[mp4 @ 0x864800] track 1: codec frame size is not set
Output #0, mp4, to 'list.mp4':
   Metadata:
     encoder         : Lavf58.18.103
     Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 
720x480 [SAR 8:9 DAR 4:3], q=-1--1, 23.98 fps, 24k tbn, 23.98 tbc
     Metadata:
       encoder         : Lavc58.31.101 libx264
     Side data:
       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
     Stream #0:1: Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, mono, fltp, 
192 kb/s
frame= 3994 fps=192 q=-1.0 Lsize=   26916kB time=00:02:46.46 
bitrate=1324.6kbits/s dup=0 drop=12 speed=8.02x
video:22884kB audio:3900kB subtitle:0kB other streams:0kB global 
headers:0kB muxing overhead: 0.492994%


Any help appreciated.




More information about the ffmpeg-user mailing list