Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitchute/ffmpeg] Muxing fails due to unsupported timecode stream in MP4 file + -map 0 #2

Closed
jbruchon opened this issue Jan 6, 2021 · 7 comments

Comments

@jbruchon
Copy link
Contributor

jbruchon commented Jan 6, 2021

Copied from blackjack4494/yt-dlc#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 d03cfdc 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.

@pukkandan
Copy link
Member

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?"

@jbruchon
Copy link
Contributor Author

jbruchon commented Jan 7, 2021

This happens with multiple BitChute videos. It is not isolated to that single one.

@pukkandan
Copy link
Member

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

@jbruchon
Copy link
Contributor Author

jbruchon commented Jan 7, 2021

Is there a way to tell ffmpeg to ignore unsupported streams instead of throwing an error?

@jbruchon
Copy link
Contributor Author

jbruchon commented Jan 7, 2021

Found it: -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!

@pukkandan
Copy link
Member

I had also tried -ignore_unknown but didnt know about -dn. Thanks for the fix. I will merge it asap

pukkandan added a commit that referenced this issue Jan 7, 2021
closes #2, blackjack4494#291

Authored by jbruchon
@jbruchon
Copy link
Contributor Author

jbruchon commented Jan 7, 2021

Seems -dn is the inverse of -map 0:d for a stream.

cypheron added a commit to cypheron/yt-dlp that referenced this issue Dec 10, 2021
fixes review #1

fixes review yt-dlp#2
KiberInfinity added a commit to KiberInfinity/yt-dlp that referenced this issue Jan 26, 2022
nswanberg pushed a commit to nswanberg/yt-dlp that referenced this issue Jul 29, 2023
SirElderling pushed a commit to SirElderling/yt-dlp that referenced this issue Dec 22, 2023
timur-for-test pushed a commit to LCA-CI-builds-repair/yt-dlp that referenced this issue Jan 12, 2024
bashonly added a commit to bashonly/yt-dlp that referenced this issue Apr 1, 2024
Authored by: bashonly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants