-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Fix ffmpeg error with bin_data streams #15846
Conversation
Example YouTube ID: KaAdS8Oso9U Also disable "Last message repeated" messages which cause non-zero exit status
Provide complete verbose log demonstrating the issue this PR is supposed to fix. |
The above Last message repeated 1 times is the wrong message to report, and it is not important for users most of the time. So I have filtered it out with The real error is
To fix the command, add
|
@dstftw what are the fixes you are looking for? |
@@ -379,6 +380,8 @@ def run(self, information): | |||
# Don't copy the existing subtitles, we may be running the | |||
# postprocessor a second time | |||
'-map', '-0:s', | |||
# Don't copy Apple TV subtitles format, bin_data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a chapters track as explained in the ffmpeg issue you linked that appears after chapters metadata is embedded by --add-metadata
.
@@ -190,6 +190,7 @@ def run_ffmpeg_multiple_files(self, input_paths, out_path, opts): | |||
encodeFilename(self._ffmpeg_filename_argument(path), True) | |||
]) | |||
cmd = ([encodeFilename(self.executable, True), encodeArgument('-y')] + | |||
['-loglevel', 'repeat+info'] + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't mix unrelated changes in single PR.
I cannot push to this branch anymore. I will open a new PR. |
Before submitting a pull request make sure you have:
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?
Description of your pull request and other information
Some files coming from YouTube and probably others come with chapter data (or subtitle?) in a stream seen by ffmpeg as the
bin_data
codec, usually at0:2
. Without some help, ffmpeg will simply refuse to make an mp4 file containing this. This causes the subtitle post-processor to fail, which also stops any further processing (embed thumbnail, etc).This PR adjusts the subtitle post-processor to 'disable' (but not really) all data streams in the ffmpeg command. The resulting files still end up having the bin_data stream, but the SRT subtitle is now properly embedded before it:
Example YouTube ID: KaAdS8Oso9U
Related ffmpeg issue
This also disables "Last message repeated" messages which cause non-zero exit status. Most of the time these messages are programmer issues for the ffmpeg team and do not apply to users.