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

[postprocessor/ffmpeg] Do not copy Apple TV chapter tracks #19024

Merged
merged 3 commits into from
Jan 28, 2019
Merged

[postprocessor/ffmpeg] Do not copy Apple TV chapter tracks #19024

merged 3 commits into from
Jan 28, 2019

Conversation

Tatsh
Copy link
Contributor

@Tatsh Tatsh commented Jan 28, 2019

This is a continuation of #15846 since I no longer can write to that fork/branch.

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:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

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 at 0: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).

    Stream #0:2(eng): Data: bin_data (text / 0x74786574), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler

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:

    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 1234 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Stream #0:2(eng): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s (default)
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:3(eng): Data: bin_data (text / 0x74786574), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:4: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 1:1 DAR 16:9], 90k tbr, 90k tbn, 90k tbc

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.

@dstftw dstftw merged commit 7f903dd into ytdl-org:master Jan 28, 2019
@Tatsh Tatsh deleted the ffmpeg-apple-tv-chapters branch January 28, 2019 16:01
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

Successfully merging this pull request may close these issues.

2 participants