【问题标题】:Remove Thumbnail from MP3 FILE - from yt-audio从 MP3 文件中删除缩略图 - 来自 youtube-audio
【发布时间】:2021-04-06 03:43:30
【问题描述】:

使用yt-audio时,如何去除下载的mp3文件自带的缩略图(图稿/截图)?

最好的办法是通过在命令中添加一个额外的参数来实现它,但是如果有人知道怎么做的话,循环下载的文件也可以。

以防万一,这是对 yt-audio 用法的描述:

usage: yt-audio [OPTIONS] REQUIRED_ARGS

A simple, configurable youtube-dl wrapper for downloading and managing youtube audio.

Required Arguments (Any/all):
URL[::DIR]            Video/Playlist URL with (optional) save directory [URL::dir]
-e, --example1        Example playlist [Custom]
--all                 All [Custom] Arguments

Optional Arguments:
-h, --help            show this help message and exit
-v, --version         show version and exit
--use-archive         use archive file to track downloaded titles
--use-metadata        use metadata to track downloaded titles
--output-format [OUTPUT_FORMAT]
                        File output format
--ytdl-args [YTDL_ADDITIONAL_ARGS]
                        youtube-dl additional arguments

谢谢大家!!

【问题讨论】:

    标签: file mp3 thumbnails python-3.8 file-manipulation


    【解决方案1】:

    所以最后,我自己找到了这个问题的答案(不过我很惭愧我花了这么多时间。)

    要删除缩略图,请勿下载。

    基本上就是这样总结。

    下载缩略图,我只需要在安装yt-audio 后编辑common.py 文件。

    该文件在安装中,位于:yt_audio/common.py

    编辑common.py 文件。

    common.py 中找到Common 类,然后编辑DEFAULT_ARGUMENT_VALUES

    或者简单地用这个无缩略图版本(如下)替换分配给它的值。

    DEFAULT_ARGUMENT_VALUES = {
            'download_command': 'youtube-dl -x -q --print-json --audio-format mp3 --audio-quality 0 '
                                '--add-metadata -o "$OUTPUT$" $URL$',
            'playlist_info_command': 'youtube-dl --flat-playlist -J $PLAYLIST_URL$',
            'output_format': '%%(title)s.%%(ext)s',
            'ffprobe_command': 'ffprobe -v quiet -print_format json -show_format -hide_banner "$PATH$"',
            'output_directory': str(PurePath(Path.home(), "Music"))
        }
    

    就是这样。

    【讨论】:

      猜你喜欢
      • 2013-02-21
      • 2017-03-21
      • 2021-06-01
      • 2014-12-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-15
      • 2020-09-26
      相关资源
      最近更新 更多