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] Allow embedding subtitles in m4a #29807

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[postprocessor/ffmpeg] Allow embedding subtitles in m4a #29807

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Aug 17, 2021

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

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

Subtitles can be embedded in m4a same as mp4.

I imagine the reason m4a is not allowed now is because no one ever needed it or it is not video. However, given that webm may only contain audio, I think m4a should be allowed as well.

mpv shows subtitles fine for audio only files: on console, or on gui if thumbnail is embedded (or with --force-window=yes option).

@ghost ghost changed the title [postprocessort/ffmpeg] Allow embedding subtitles in m4a [postprocessor/ffmpeg] Allow embedding subtitles in m4a Aug 17, 2021
@rautamiekka
Copy link
Contributor

rautamiekka commented Aug 17, 2021

You can't embed subtitles into an audio codec, you need to create a separate vid to show the subtitles, at which point you no longer have an audio file but a vid file without anything but the text to see.

I guess FFmpeg does that automatically as a result of detecting a subtitle. Unless it uses some metadata field, I couldn't find any specs.

@Lesmiscore
Copy link
Contributor

@rautamiekka Just like this one, audio files can have subtitles, and ffmpeg supports this. Formats for subtitles are very limited for m4a (which is same as mp4 except that m4a lacks video), but this should work.

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.

None yet

3 participants