Repository: yt-dlp
Issue: piping `-f bv+ba` to stdout with vp9 video: "stream is muxed as a private data stream and may not be recognized upon reading"
Labels: bug,external issue,core:downloader

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting that yt-dlp is broken on a **supported** site
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [ ] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

Europe

### Provide a description that is worded well enough to be understood

When downloading *any* Instagram video with `-f bv+ba/b -o -` options I get the following warning (presumably from ffmpeg): `Stream 0, codec vp9, is muxed as a private data stream and may not be recognized upon reading.`
No error is shown but the video stream is indeed corrupted/not recognized and only the audio is playing correctly. I tested this by streaming the stdout to a file (but I'll need to use the stream in the real scenario) and trying different videos. All videos are available to non-logged users and the issue is not present if the output is a file (instead of the stdout) or if I use the default format `b/bv+ba` (I guess here ffmpeg isn't needed). I noticed the same issue appears with youtube videos too sometimes, but I couldn't reproduce it consistently.

Edit: You can reproduce it with the following command `yt-dlp -f bv+ba/b -o - https://instagram.com/reel/C8w8Bs5J8h4 > video.mp4`

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [ ] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-f', 'bv+ba/b', '-o', '-', '-vU', 'https://instagram.com/reel/C8w8Bs5J8h4']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8 
[debug] yt-dlp version master@2024.07.09.233632 from yt-dlp/yt-dlp-master-builds [4f8448896] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22631-SP0 (OpenSSL 1.1.1k  25 Mar 2021) 
[debug] exe versions: ffmpeg 7.0.1-full_build-www.gyan.dev (setts), ffprobe 7.0.1-full_build-www.gyan.dev 
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.07.04, curl_cffi-0.7.0, mutagen-1.47.0, requests-2.32.3, sqlite3-3.35.5, urllib3-2.2.2, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1834 extractors 
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-master-builds/releases/latest
Latest version: master@2024.07.09.233632 from yt-dlp/yt-dlp-master-builds 
yt-dlp is up to date (master@2024.07.09.233632 from yt-dlp/yt-dlp-master-builds)
[Instagram] Extracting URL: https://instagram.com/reel/C8w8Bs5J8h4 
[Instagram] C8w8Bs5J8h4: Setting up session
WARNING: [Instagram] C8w8Bs5J8h4: No csrf token set by Instagram API 
[Instagram] C8w8Bs5J8h4: Downloading JSON metadata
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id 
[info] C8w8Bs5J8h4: Downloading 1 format(s): dash-1150901429362791v+dash-838880814305817ad 
[debug] Invoking ffmpeg downloader on "https://instagram.fpsr1-1.fna.fbcdn.net/v/t39.25447-16/449362892_481681207689969_6478740095630794341_n.mp4?_nc_cat=111&ccb=1-7&_nc_sid=9a5d50&efg=eyJ2ZW5jb2RlX3RhZyI6ImlnLXhwdmRzLmNsaXBzLmMyLUMzLmRhc2hfcjJldmV2cDktcjFnZW4ydnA5X3E5MCIsInZpZGVvX2lkIjpudWxsfQ%3D%3D&_nc_ohc=BXYkh0tDXoUQ7kNvgEPXzWs&_nc_ht=instagram.fpsr1-1.fna&oh=00_AYDimaE1RWj35R-nKwRyum5YJaj9w9AQUWzzEbybTgdtuA&oe=669454AC", "https://instagram.fpsr1-1.fna.fbcdn.net/v/t50.33967-16/448242261_986027133063912_2669049212068902030_n.mp4?_nc_cat=1&ccb=1-7&_nc_sid=9a5d50&efg=eyJ2ZW5jb2RlX3RhZyI6ImlnLXhwdmRzLmNsaXBzLmMyLUMzLmRhc2hfbG5faGVhYWNfdmJyM19hdWRpbyIsInZpZGVvX2lkIjpudWxsfQ%3D%3D&_nc_ohc=5r4W0K-_6RYQ7kNvgFFF-PG&_nc_ht=instagram.fpsr1-1.fna&oh=00_AYAvm-I6YvTGCiwmltC_o-5fvF0T6XqeuCOjsYxvzt-TAQ&oe=669437A2"
[download] Destination: -
[debug] ffmpeg command line: ffmpeg -y -loglevel verbose -headers "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Sec-Fetch-Mode: navigate
Referer: https://www.instagram.com/
" -i "https://instagram.fpsr1-1.fna.fbcdn.net/v/t39.25447-16/449362892_481681207689969_6478740095630794341_n.mp4?_nc_cat=111&ccb=1-7&_nc_sid=9a5d50&efg=eyJ2ZW5jb2RlX3RhZyI6ImlnLXhwdmRzLmNsaXBzLmMyLUMzLmRhc2hfcjJldmV2cDktcjFnZW4ydnA5X3E5MCIsInZpZGVvX2lkIjpudWxsfQ%3D%3D&_nc_ohc=BXYkh0tDXoUQ7kNvgEPXzWs&_nc_ht=instagram.fpsr1-1.fna&oh=00_AYDimaE1RWj35R-nKwRyum5YJaj9w9AQUWzzEbybTgdtuA&oe=669454AC" -headers "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Sec-Fetch-Mode: navigate
Referer: https://www.instagram.com/
" -i "https://instagram.fpsr1-1.fna.fbcdn.net/v/t50.33967-16/448242261_986027133063912_2669049212068902030_n.mp4?_nc_cat=1&ccb=1-7&_nc_sid=9a5d50&efg=eyJ2ZW5jb2RlX3RhZyI6ImlnLXhwdmRzLmNsaXBzLmMyLUMzLmRhc2hfbG5faGVhYWNfdmJyM19hdWRpbyIsInZpZGVvX2lkIjpudWxsfQ%3D%3D&_nc_ohc=5r4W0K-_6RYQ7kNvgFFF-PG&_nc_ht=instagram.fpsr1-1.fna&oh=00_AYAvm-I6YvTGCiwmltC_o-5fvF0T6XqeuCOjsYxvzt-TAQ&oe=669437A2" -c copy -map 0:0 -map 1:0 -f mpegts -
ffmpeg version 7.0.1-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 13.2.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
  libpostproc    58.  1.100 / 58.  1.100
[tcp @ 000001954ed7a1c0] Starting connection attempt to 91.80.50.162 port 443
[tcp @ 000001954ed7a1c0] Successfully connected to 91.80.50.162 port 443
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001954ed73100] advanced_editlist does not work with fragmented MP4. disabling.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://instagram.fpsr1-1.fna.fbcdn.net/v/t39.25447-16/449362892_481681207689969_6478740095630794341_n.mp4?_nc_cat=111&ccb=1-7&_nc_sid=9a5d50&efg=eyJ2ZW5jb2RlX3RhZyI6ImlnLXhwdmRzLmNsaXBzLmMyLUMzLmRhc2hfcjJldmV2cDktcjFnZW4ydnA5X3E5MCIsInZpZGVvX2lkIjpudWxsfQ%3D%3D&_nc_ohc=BXYkh0tDXoUQ7kNvgEPXzWs&_nc_ht=instagram.fpsr1-1.fna&oh=00_AYDimaE1RWj35R-nKwRyum5YJaj9w9AQUWzzEbybTgdtuA&oe=669454AC':
  Metadata:
    major_brand     : mp41
    minor_version   : 0
    compatible_brands: iso8isommp41dashvp09cmfc
    creation_time   : 2024-06-28T15:40:29.000000Z
  Duration: 00:00:20.80, start: 0.000000, bitrate: 517 kb/s
  Stream #0:0[0x1](und): Video: vp9 (Profile 0), 1 reference frame (vp09 / 0x39307076), yuv420p(tv, bt709), 576x1024, 85 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
      Metadata:
        creation_time   : 2024-06-28T15:40:29.000000Z
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
        encoder         : VPC Coding
[tcp @ 000001954f30fa40] Starting connection attempt to 91.80.50.162 port 443
[tcp @ 000001954f30fa40] Successfully connected to 91.80.50.162 port 443
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001954f223c40] advanced_editlist does not work with fragmented MP4. disabling.
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'https://instagram.fpsr1-1.fna.fbcdn.net/v/t50.33967-16/448242261_986027133063912_2669049212068902030_n.mp4?_nc_cat=1&ccb=1-7&_nc_sid=9a5d50&efg=eyJ2ZW5jb2RlX3RhZyI6ImlnLXhwdmRzLmNsaXBzLmMyLUMzLmRhc2hfbG5faGVhYWNfdmJyM19hdWRpbyIsInZpZGVvX2lkIjpudWxsfQ%3D%3D&_nc_ohc=5r4W0K-_6RYQ7kNvgFFF-PG&_nc_ht=instagram.fpsr1-1.fna&oh=00_AYAvm-I6YvTGCiwmltC_o-5fvF0T6XqeuCOjsYxvzt-TAQ&oe=669437A2':
  Metadata:
    major_brand     : mp41
    minor_version   : 0
    compatible_brands: iso8isommp41dashcmfc
    creation_time   : 2024-06-28T15:37:35.000000Z
  Duration: 00:00:20.81, start: 0.000000, bitrate: 88 kb/s
  Stream #1:0[0x1](und): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 7 kb/s (default)
      Metadata:
        creation_time   : 2024-06-28T15:37:35.000000Z
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
[out#0/mpegts @ 000001954f34ca40] Adding streams from explicit maps...
[vost#0:0/copy @ 000001954f62d980] Created video stream from input stream 0:0
[aost#0:1/copy @ 000001954f36d980] Created audio stream from input stream 1:0
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #1:0 -> #0:1 (copy)
[mpegts @ 000001954f363740] service 1 using PCR in pid=256, pcr_period=100ms
[mpegts @ 000001954f363740] muxrate VBR, sdt every 500 ms, pat/pmt every 100 ms
Output #0, mpegts, to 'pipe:':
  Metadata:
    major_brand     : mp41
    minor_version   : 0
    compatible_brands: iso8isommp41dashvp09cmfc
    encoder         : Lavf61.1.100
  Stream #0:0(und): Video: vp9 (Profile 0), 1 reference frame (vp09 / 0x39307076), yuv420p(tv, bt709), 576x1024, q=2-31, 85 kb/s, 30 fps, 30 tbr, 90k tbn (default)
      Metadata:
        creation_time   : 2024-06-28T15:40:29.000000Z
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
        encoder         : VPC Coding
  Stream #0:1(und): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 7 kb/s (default)
      Metadata:
        creation_time   : 2024-06-28T15:37:35.000000Z
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
[out#0/mpegts @ 000001954f34ca40] Starting thread...
[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 000001954ed72d00] Starting thread...
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 000001954f2be240] Starting thread...
Press [q] to stop, [?] for help
[mpegts @ 000001954f363740] Stream 0, codec vp9, is muxed as a private data stream and may not be recognized upon reading.
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 000001954f2be240] EOF while reading input
[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 000001954ed72d00] EOF while reading input
[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 000001954ed72d00] Terminating thread with return code 0 (success)
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 000001954f2be240] Terminating thread with return code 0 (success)
[out#0/mpegts @ 000001954f34ca40] All streams finished
[out#0/mpegts @ 000001954f34ca40] Terminating thread with return code 0 (success)
[AVIOContext @ 000001954f349400] Statistics: 1770396 bytes written, 0 seeks, 711 writeouts
[out#0/mpegts @ 000001954f34ca40] Output file #0 (pipe:):
[out#0/mpegts @ 000001954f34ca40]   Output stream #0:0 (video): 624 packets muxed (1341428 bytes);
[out#0/mpegts @ 000001954f34ca40]   Output stream #0:1 (audio): 451 packets muxed (225512 bytes);
[out#0/mpegts @ 000001954f34ca40]   Total: 1075 packets (1566940 bytes) muxed
[out#0/mpegts @ 000001954f34ca40] video:1310KiB audio:220KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 12.984288%
size=    1729KiB time=00:00:20.80 bitrate= 680.9kbits/s speed=  54x
[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 000001954ed72d00] Input file #0 (https://instagram.fpsr1-1.fna.fbcdn.net/v/t39.25447-16/449362892_481681207689969_6478740095630794341_n.mp4?_nc_cat=111&ccb=1-7&_nc_sid=9a5d50&efg=eyJ2ZW5jb2RlX3RhZyI6ImlnLXhwdmRzLmNsaXBzLmMyLUMzLmRhc2hfcjJldmV2cDktcjFnZW4ydnA5X3E5MCIsInZpZGVvX2lkIjpudWxsfQ%3D%3D&_nc_ohc=BXYkh0tDXoUQ7kNvgEPXzWs&_nc_ht=instagram.fpsr1-1.fna&oh=00_AYDimaE1RWj35R-nKwRyum5YJaj9w9AQUWzzEbybTgdtuA&oe=669454AC):
[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 000001954ed72d00]   Input stream #0:0 (video): 624 packets read (1341428 bytes);
[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 000001954ed72d00]   Total: 624 packets (1341428 bytes) demuxed
[AVIOContext @ 000001954f2205c0] Statistics: 1345374 bytes read, 0 seeks
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 000001954f2be240] Input file #1 (https://instagram.fpsr1-1.fna.fbcdn.net/v/t50.33967-16/448242261_986027133063912_2669049212068902030_n.mp4?_nc_cat=1&ccb=1-7&_nc_sid=9a5d50&efg=eyJ2ZW5jb2RlX3RhZyI6ImlnLXhwdmRzLmNsaXBzLmMyLUMzLmRhc2hfbG5faGVhYWNfdmJyM19hdWRpbyIsInZpZGVvX2lkIjpudWxsfQ%3D%3D&_nc_ohc=5r4W0K-_6RYQ7kNvgFFF-PG&_nc_ht=instagram.fpsr1-1.fna&oh=00_AYAvm-I6YvTGCiwmltC_o-5fvF0T6XqeuCOjsYxvzt-TAQ&oe=669437A2):
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 000001954f2be240]   Input stream #1:0 (audio): 451 packets read (225512 bytes);
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 000001954f2be240]   Total: 451 packets (225512 bytes) demuxed
[AVIOContext @ 000001954f35dc00] Statistics: 229820 bytes read, 0 seeks
[download] 100% in 00:00:01
```