Skip to content

Conversation

@atsushi2965
Copy link

  1. Audio

    > python devscripts\cli_to_api.py -x
    
    The arguments passed translate to:
    
    {'format': 'bestaudio/best',
     'postprocessors': [{'key': 'FFmpegExtractAudio',
                         'nopostoverwrites': False,
                         'preferredcodec': 'best',
                         'preferredquality': '5'}]}
    
    Combining these with the CLI defaults gives:
    
    {'extract_flat': 'discard_in_playlist',
     'format': 'bestaudio/best',
     'fragment_retries': 10,
     'ignoreerrors': 'only_download',
     'postprocessors': [{'key': 'FFmpegExtractAudio',
                         'nopostoverwrites': False,
                         'preferredcodec': 'best',
                         'preferredquality': '5'},
                        {'key': 'FFmpegConcat',
                         'only_multi_video': True,
                         'when': 'playlist'}],
     'retries': 10,
     'warn_when_outdated': True}
  2. Smallest

    For example, to download the worst quality video-only format you can use -f worstvideo. It is, however, recommended not to use worst and related options. When your format selector is worst, the format which is worst in all respects is selected. Most of the time, what you actually want is the video with the smallest filesize instead. So it is generally better to use -S +size or more rigorously, -S +size,+br,+res,+fps instead of -f worst. See Sorting Formats for more details.

    If your format selector is worst, the last item is selected after sorting. This means it will select the format that is worst in all respects. Most of the time, what you actually want is the video with the smallest filesize instead. So it is generally better to use -f best -S +size,+br,+res,+fps.

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.

1 participant