Repository: yt-dlp/yt-dlp

Issue:
[bitchute/ffmpeg] Muxing fails due to unsupported timecode stream in MP4 file + -map 0
Copied from https://github.com/blackjack4494/yt-dlc/issues/291

## Verbose log

```
Y:\YouTube Channels\Chass>youtube-dl --cookies "Y:\cookies.txt" --add-metadata --write-description --write-info-json --write-thumbnail --all-subs --sleep-interval 1 -ciw -o "%(title)s.%(ext)s" -v https://www.bitchute.com/video/7KOApju0sI1E/
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--cookies', 'Y:\\cookies.txt', '--add-metadata', '--write-description', '--write-info-json', '--write-thumbnail', '--all-subs', '--sleep-interval', '1', '-ciw', '-o', '%(title)s.%(ext)s', '-v', 'https://www.bitchute.com/video/7KOApju0sI1E/']
[debug] Loading archive file None
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dlc version 2020.11.11-2
[debug] Python version 3.9.0 (CPython) - Windows-10-10.0.19041-SP0
[debug] exe versions: ffmpeg 4.3.1-2020-11-19-full_build-www.gyan.dev, ffprobe 4.3.1-2020-11-19-full_build-www.gyan.dev
[debug] Proxy map: {}
[BitChute] 7KOApju0sI1E: Downloading webpage
[BitChute] 7KOApju0sI1E: Checking video URL
[debug] Default format spec: bestvideo+bestaudio/best
[info] Video description is already present
[info] Video description metadata is already present
[BitChute] 7KOApju0sI1E: Thumbnail is already present
[debug] Invoking downloader on 'https://z-28b3jxzl1og7.bitchute.com/iAhk3bN20i22/7KOApju0sI1E.mp4'
[download] 4chan threads - _x_ - The Desolate Towns Phenomenon.mp4 has already been downloaded
[download] 100% of 22.94MiB
[ffmpeg] Adding metadata to '4chan threads - _x_ - The Desolate Towns Phenomenon.mp4'
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:4chan threads - _x_ - The Desolate Towns Phenomenon.mp4" -map 0 -c copy -metadata "title=4chan threads - /x/ - The Desolate Towns Phenomenon" -metadata "date=20201218" -metadata "description=https://yuki.la/x/17299706
https://archive.4plebs.org/x/thread/22403433/#q22418409
https://yuki.la/x/25030586
If you wish to donate: https://www.paypal.me/thechasseurchannel
Bitchute: https://www.bitchute.com/channel/Chass/
Ultimate Spooky Greentext Playlist: https://www.youtube.com/playlist?list=PLbDSt84tOm2Nm0D8baMW3CfVaaF03LCjB
Music used:
Won't sleep - Kukomitzu
https://youtu.be/vz3KlzgEFm8?t=6
Stalker – Kukomitzu
https://youtu.be/vz3KlzgEFm8?t=297
♫ Epic Horror Synth Trailer Music ♪♬ - Something Wicked
https://www.youtube.com/watch?v=Zuw_O5MU5CE
[Vaporwave] Stevia Sphere - mint
https://www.youtube.com/watch?v=ykT3wtSCpzE
\"Midnight, the Stars and You\"
https://www.youtube.com/watch?v=-fN-Xjpd-qE
My last roadtrip - Kukomitzu
https://youtu.be/vz3KlzgEFm8?t=597
Outro music:
Gothic 3 - Geldern Night
https://www.youtube.com/watch?v=wCtV4DYZkK0" -metadata "comment=https://yuki.la/x/17299706
https://archive.4plebs.org/x/thread/22403433/#q22418409
https://yuki.la/x/25030586
If you wish to donate: https://www.paypal.me/thechasseurchannel
Bitchute: https://www.bitchute.com/channel/Chass/
Ultimate Spooky Greentext Playlist: https://www.youtube.com/playlist?list=PLbDSt84tOm2Nm0D8baMW3CfVaaF03LCjB
Music used:
Won't sleep - Kukomitzu
https://youtu.be/vz3KlzgEFm8?t=6
Stalker – Kukomitzu
https://youtu.be/vz3KlzgEFm8?t=297
♫ Epic Horror Synth Trailer Music ♪♬ - Something Wicked
https://www.youtube.com/watch?v=Zuw_O5MU5CE
[Vaporwave] Stevia Sphere - mint
https://www.youtube.com/watch?v=ykT3wtSCpzE
\"Midnight, the Stars and You\"
https://www.youtube.com/watch?v=-fN-Xjpd-qE
My last roadtrip - Kukomitzu
https://youtu.be/vz3KlzgEFm8?t=597
Outro music:
Gothic 3 - Geldern Night
https://www.youtube.com/watch?v=wCtV4DYZkK0" -metadata "purl=https://www.bitchute.com/video/7KOApju0sI1E/" -metadata "artist=Chass" "file:4chan threads - _x_ - The Desolate Towns Phenomenon.temp.mp4"
ERROR:   Stream #0:2 -> #0:2 (copy)
Traceback (most recent call last):
  File "youtube_dlc\YoutubeDL.py", line 2159, in post_process
  File "youtube_dlc\postprocessor\ffmpeg.py", line 532, in run
  File "youtube_dlc\postprocessor\ffmpeg.py", line 235, in run_ffmpeg_multiple_files
youtube_dlc.postprocessor.ffmpeg.FFmpegPostProcessorError:   Stream #0:2 -> #0:2 (copy)

```


## Description

Commit d03cfdce1bce28284fa0f168d5d278caacd2fa0b introduced `-map 0` to the FFmpeg post-processor to copy all streams. Unfortunately, the BitChute MP4 timecode stream I've run into here has an apparently invalid tag and can't be copied. If I type the `ffmpeg` command without `-map 0` it works fine since it simply ignores the extra unsupported stream. The option was added to ensure that extra streams are preserved, but in this particular case, it's causing a muxing failure due to an unsupported extra stream.


Discussion:
This doesn't seem to be an issue with yt-dlc. Other bitchute videos work fine. This particular video has a broken data stream. You can fix it by using `--postprocessor-args "-map -0:d?"`
This happens with multiple BitChute videos. It is not isolated to that single one.
Do you have any ideas how to fix this? I dont want to throw away the data streams of all videos just because of a few videos
Is there a way to tell ffmpeg to ignore unsupported streams instead of throwing an error?
[Found it:](https://ffmpeg.org/ffmpeg.html#Advanced-options) `-ignore_unknown` says "Ignore input streams with unknown type instead of failing if copying such streams is attempted." Closing PR incoming. Edit: well that didn't work. Edit 2: but #9 does!
I had also tried `-ignore_unknown` but didnt know about -dn. Thanks for the fix. I will merge it asap
Seems `-dn` is the inverse of `-map 0:d` for a stream.

Resolving patch:
diff --git a/yt_dlp/extractor/extractors.py b/yt_dlp/extractor/extractors.py
--- a/yt_dlp/extractor/extractors.py
+++ b/yt_dlp/extractor/extractors.py
@@ -1985,6 +1985,7 @@
 )
 from .yandexvideo import (
     YandexVideoIE,
+    YandexVideoPreviewIE,
     ZenYandexIE,
     ZenYandexChannelIE,
 )
diff --git a/yt_dlp/extractor/yandexvideo.py b/yt_dlp/extractor/yandexvideo.py
--- a/yt_dlp/extractor/yandexvideo.py
+++ b/yt_dlp/extractor/yandexvideo.py
@@ -11,6 +11,7 @@
     int_or_none,
     try_get,
     url_or_none,
+    lowercase_escape,
 )
 
 
@@ -148,6 +149,45 @@ def _real_extract(self, url):
         }
 
 
+class YandexVideoPreviewIE(InfoExtractor):
+    _VALID_URL = r'https?://(?:www\.)?yandex\.ru/video/preview(?:/?\?.*?filmId=|/)(?P<id>\d+)'
+    _TESTS = [{  # Odnoklassniki
+        'url': 'https://yandex.ru/video/preview/?filmId=10682852472978372885&text=summer',
+        'info_dict': {
+            'id': '1352565459459',
+            'ext': 'mp4',
+            'like_count': int,
+            'upload_date': '20191202',
+            'age_limit': 0,
+            'duration': 196,
+            'thumbnail': 'https://i.mycdn.me/videoPreview?id=544866765315&type=37&idx=13&tkn=TY5qjLYZHxpmcnK8U2LgzYkgmaU&fn=external_8',
+            'uploader_id': '481054701571',
+            'title': 'LOFT - summer, summer, summer HD',
+            'manifest_stream_number': 0,
+            'uploader': 'АРТЁМ КУДРОВ',
+        },
+    }, {  # youtube
+        'url': 'https://yandex.ru/video/preview/?filmId=4479424425337895262&source=main_redirect&text=видео&utm_source=main_stripe_big',
+        'only_matching': True,
+    }, {  # YandexVideo
+        'url': 'https://yandex.ru/video/preview/5275069442094787341',
+        'only_matching': True,
+    }, {  # youtube
+        'url': 'https://yandex.ru/video/preview/?filmId=16658118429797832897&from=tabbar&p=1&text=%D0%BF%D1%80%D0%BE%D1%81%D0%BC%D0%BE%D1%82%D1%80+%D1%84%D1%80%D0%B0%D0%B3%D0%BC%D0%B5%D0%BD%D1%82%D0%B0+%D0%BC%D0%B0%D0%BB%D0%B5%D0%BD%D1%8C%D0%BA%D0%B8%D0%B9+%D0%BF%D1%80%D0%B8%D0%BD%D1%86+%D0%BC%D1%8B+%D0%B2+%D0%BE%D1%82%D0%B2%D0%B5%D1%82%D0%B5+%D0%B7%D0%B0+%D1%82%D0%B5%D1%85+%D0%BA%D0%BE%D0%B3%D0%BE+%D0%BF%D1%80%D0%B8%D1%80%D1%83%D1%87%D0%B8%D0%BB%D0%B8',
+        'only_matching': True,
+    }, {  # Odnoklassniki
+        'url': 'https://yandex.ru/video/preview/?text=Francis%20Lai%20-%20Le%20Bon%20Et%20Les%20MC)chants&path=wizard&parent-reqid=1643208087979310-1481782809207673478-sas3-0931-2f9-sas-l7-balancer-8080-BAL-9380&wiz_type=vital&filmId=12508152936505397283',
+        'only_matching': True,
+    }]
+
+    def _real_extract(self, url):
+        id = self._match_id(url)
+        webpage = self._download_webpage(url, id)
+        data_raw = self._search_regex(r'window.Ya.__inline_params__\s*=\s*JSON.parse\(\'([^"]+?\\u0022video\\u0022:[^"]+?})\'\);', webpage, 'data_raw')
+        data_json = self._parse_json(data_raw, id, transform_source=lowercase_escape)
+        return self.url_result(data_json['video']['url'])
+
+
 class ZenYandexIE(InfoExtractor):
     _VALID_URL = r'https?://zen\.yandex\.ru(?:/video)?/(media|watch)/(?:(?:id/[^/]+/|[^/]+/)(?:[a-z0-9-]+)-)?(?P<id>[a-z0-9-]+)'
     _TESTS = [{


Test patch: