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

python api documentation. #25880

Closed
galanakis opened this issue Jul 3, 2020 · 0 comments
Closed

python api documentation. #25880

galanakis opened this issue Jul 3, 2020 · 0 comments

Comments

@galanakis
Copy link

@galanakis galanakis commented Jul 3, 2020

Checklist

  • I'm asking a question
  • I've looked through the README and FAQ for similar questions
  • I've searched the bugtracker for similar questions including closed ones

Question

WRITE QUESTION HERE

The question is how to add custom metadata in a file using the python API.

In the command line I can do:

/usr/local/bin/youtube-dl 'https://www.youtube.com/watch?v=ogmga3szhW8' -x \
 --postprocessor-args '-metadata title='"'"'Title'"'"' -metadata genre=TANGO'

In order to add genre and a title.

I am trying to do the same thing using the python API,
but after trying:

ydl_opts = {
    'format': 'bestaudio/best',
    'prefer_ffmpeg': True, 
    'postprocessors': [{'key': 'FFmpegExtractAudio'}, {'key':'FFmpegMetadata'}],
    'postprocessor_args' : ['-metadata title='"'"'Title'"'"' -metadata genre=TANGO']
}

with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    ydl.download(['https://www.youtube.com/watch?v=_4rXBKN3V7Q'])

I get:

ERROR: audio conversion failed: Error splitting the argument list: Option not found

I could not find easily documentation on this feature, so please if anyone can give me a tip I would appreciate it.

@galanakis galanakis added the question label Jul 3, 2020
@dstftw dstftw closed this Jul 3, 2020
@dstftw dstftw added the incomplete label Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.