title: ERROR: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
body: <p>I want to replace the audio stream in a Video-DVD. But I have problems with the replace of the audio stream.</p>
  
  <p>The DVD-VOB have 3 streams. 
  Stream 0 is dvd_nav_packet.
  Stream 1 is the video.
  Stream 2 is the audio.</p>
  
  <p>I also tryed to change the exportinformation for ffmepg with -map 0:d and -map 0:d:1. Also with and without  from the codec Infos -f vob -target ntsc-dvd -vcodec copy -acodec copy. And update ffmpeag/use older versions. But I only get error messages.</p>
  
  <p>ffmpeg is startet with a vb.net Programm which which decide which video need a new audio file.</p>
  
  <p>Can somebody tell me what I do wrong?</p>
  
  <pre><code>ffmpeg.exe -i "F:\VIDEO_TS\VTS_01_1.VOB" -i "%CD%\tfpat.mp2" -map 0:0 -map 0:1 -map 1:0 -f vob -target ntsc-dvd -vcodec copy -acodec copy "C:\Users\Timo\AppData\Local\Microsoft\Windows\Burn\Burn\VIDEO_TS\VTS_01_1.VOB"
  
  
  ffmpeg version N-88514-gd5995c531d Copyright (c) 2000-2017 the FFmpeg developers
    built with gcc 7.2.0 (GCC)
    configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
    libavutil      56.  0.100 / 56.  0.100
    libavcodec     58.  1.100 / 58.  1.100
    libavformat    58.  0.102 / 58.  0.102
    libavdevice    58.  0.100 / 58.  0.100
    libavfilter     7.  0.101 /  7.  0.101
    libswscale      5.  0.101 /  5.  0.101
    libswresample   3.  0.101 /  3.  0.101
    libpostproc    55.  0.100 / 55.  0.100
  Input #0, mpeg, from 'F:\VIDEO_TS\VTS_01_1.VOB':
    Duration: 00:01:51.17, start: 0.300300, bitrate: 7273 kb/s
      Stream #0:0[0x1bf]: Data: dvd_nav_packet
      Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, progressive), 720x480 [SAR 32:27 DAR 16:9], 6800 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
      Stream #0:2[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 320 kb/s
  [ac3 @ 037ee700] Estimating duration from bitrate, this may be inaccurate
  Input #1, ac3, from 'D:\SkyDrive\Projekte\AtmosFX_Syncro_Projekt\AtmosFX-Translator\AlteVersionen\Version 2\tfpat.mp2':
    Duration: 00:01:51.26, start: 0.000000, bitrate: 320 kb/s
      Stream #1:0: Audio: ac3, 48000 Hz, stereo, fltp, 320 kb/s
  File 'C:\Users\Timo\AppData\Local\Microsoft\Windows\Burn\Burn\VIDEO_TS\VTS_01_1.VOB' already exists. Overwrite ? [y/N] y
  [dvd @ 037fbd20] Invalid media type data for output stream #0
  Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
  Stream mapping:
    Stream #0:0 -&gt; #0:0 (copy)
    Stream #0:1 -&gt; #0:1 (copy)
    Stream #1:0 -&gt; #0:2 (copy)
      Last message repeated 1 times
  </code></pre>