id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc	blockedby	blocking	reproduced	analyzed
1806	Audio/video stream order reversed in remuxed VOB files	paulbu		"Summary of the bug:
I am using ffmpeg to edit and remultiplex unencrypted VOB files (from a HD recorder). When copying (ie not transcoding) the streams ffmpeg ALWAYS insists on making the audio stream ID 0 and video stream ID 1 even though the input file was the other way round and it reports itself as NOT doing this.

Using the -map commands also seem to be ignored wherever they appear on the command line.

(This is a problem because I am using dvdauthor on the files and it only seems to work with VOB files with video as the first stream. Fails with infamous ERR: Cannot infer pts for VOBU if there is no audio or video and it is the first VOBU.)

How to reproduce (with any vob file 'input.vob'):
% ffmpeg -i input.vob -target pal-dvd -codec copy output.vob
ffmpeg version N-45279-g1a104bf Copyright (c) 2000-2012 the FFmpeg developers
  built on Oct 10 2012 19:21:13 with gcc 4.7.2 (GCC)
Input #0, mpeg, from 'input.vob':
  Duration: 00:01:28.15, start: 137.626044, bitrate: 2858 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 352x576 [SAR 24:11 DAR 4:3], 3060 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, s16, 256 kb/s
Output #0, dvd, to 'output.vob':
  Metadata:
    encoder         : Lavf54.31.100
    Stream #0:0: Video: mpeg2video, yuv420p, 352x576 [SAR 24:11 DAR 4:3], q=2-31
, 3060 kb/s, 25 fps, 90k tbn, 25 tbc
    Stream #0:1: Audio: ac3, 48000 Hz, stereo, 256 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)

But running ffprobe on resulting 'output.vob':
Input #0, mpeg, from 'output.vob':
  Duration: 00:01:28.15, start: 1.000000, bitrate: 2877 kb/s
    Stream #0:0[0x80]: Audio: ac3, 48000 Hz, stereo, s16, 256 kb/s
    Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p, 352x576 [SAR 24:11 DAR 4:3], 3060 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc

Streams swapped round!
"	defect	open	normal	avformat	git-master		mpegps				0	0
