[FFmpeg-user] stream mapping seems to work, but doesn't

sean darcy seandarcy2 at gmail.com
Tue May 24 18:17:57 CEST 2016


On 05/24/2016 11:53 AM, sean darcy wrote:
> On 05/23/2016 11:29 AM, Nicolas George wrote:
>>> On Mon, May 23, 2016 at 09:31:25 -0400, sean darcy wrote:
>>>> I've got a bunch of VOB's I want to concatenate. For most of the VOB's
>>>> stream 0:0 is video and 0:1 audio, but for one VOB te streams are
>>>> switched, so concat doesn't work.
>>
>> You need to use the stream id, see the documentation on stream
>> specifiers.
>>
>> Le quintidi 5 prairial, an CCXXIV, Moritz Barsnick a écrit :
>>> MPEG program streams, such as VOBs, don't know the concept of "order".
>>> It didn't become quite clear on what grounds ffmpeg chooses the order -
>>> possibly depending on which packet comes first.
>>
>> Exactly.
>>
>> Regards,
>>
>
> Tried using stream id's :
>
> ffmpeg  -i out5A.VOB -map i:0x1e0  -map i:0x80 -c copy out5A-x.VOB
> ...................
> [mpeg @ 0x23ec120] DTS discontinuity in stream 0: packet 3 with DTS
> 50761, packet 4 with DTS 53641
> Input #0, mpeg, from 'out5A.VOB':
>   Duration: 00:25:50.02, start: 0.500000, bitrate: 5516 kb/s
>     Stream #0:0[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s
>     Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv,
> smpte170m), 720x480 [SAR 8:9 DAR 4:3], max. 8500 kb/s, 29.97 fps, 29.97
> tbr, 90k tbn, 59.94 tbc
> [svcd @ 0x23f0a80] VBV buffer size not set, using default size of 130KB
> 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 'out5A-x.VOB':
>   Metadata:
>     encoder         : Lavf57.29.101
>     Stream #0:0: Video: mpeg2video, yuv420p, 720x480 [SAR 8:9 DAR 4:3],
> q=2-31, max. 8500 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 29.97 tbc
>     Stream #0:1: Audio: ac3, 48000 Hz, stereo, 224 kb/s
> Stream mapping:
>   Stream #0:1 -> #0:0 (copy)
>   Stream #0:0 -> #0:1 (copy)
> Press [q] to stop, [?] for help
> [svcd @ 0x23f0a80] 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
> frame=46435 fps=1900 q=-1.0 Lsize= 1043844kB time=00:25:50.02
> bitrate=5516.8kbits/s speed=63.4x
> ...........
>
> But no joy:
>
> ffprobe -i out5A-x.VOB
> ..............
> Input #0, mpeg, from 'out5A-x.VOB':
>   Duration: 00:25:50.02, start: 0.500000, bitrate: 5516 kb/s
>     Stream #0:0[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s
>     Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv,
> smpte170m), 720x480 [SAR 8:9 DAR 4:3], max. 8500 kb/s, 29.97 fps, 29.97
> tbr, 90k tbn, 59.94 tbc
>
> Thanks for any help.
>

Or am I going at this all wrong? I have a set of VOB's that have random 
steam orders. I want an mp4.

fmpeg -safe 0 -f concat -i mylist.txt \
  -c:v:0 libx264 -c:a:0 aac  out.mp4

where mylist.txt has the VOB's.

The output of this is correct for the VOB's with a stream order that 
matches the first VOB in the list. But any for VOB with the steam order 
switched there's no video. BTW, the video returns for any VOB whose 
stream order matches the first.

Instead of trying to fix stream order, is there another easier way?

sean




More information about the ffmpeg-user mailing list