This might be picky, but when I use Youtube-DL to convert audio from a video to MP3, I let it also tag the title and embed the thumbnail from the video. Somehow it adds the video description and some other meta video info, which I don't want.
This is the command I use:
youtube-dl -o "%(title)s.%(ext)s" -x --audio-format mp3 --audio-quality 320K --embed-thumbnail --add-metadata --metadata-from-title "%(artist)s - %(title)s" <youtube url>
When I check the ID3 tag info, it added the video title as expected. If I rename the extension to AVI, play the audio file, and open its properties, I can see unwanted info like the video description, version encoder, and brand.
The option --add-metadata
writes metadata to the video file, from which it gets the video description, but when I leave that out, the video does not get tagged at all.
I read through the documentation of Youtube-DL and FFMPEG, but I can’t find a proper way to strip the video description/info and keep the MP3 tagged.
Does anyone know how to do this?
Best Answer
I don't believe you can currently control the
--add-metadata
option.However you can use the
--exec
option to execute a command afterwards using the reference to the output file{}
and askffmpeg
to strip the unwanted metadata like so:--exec "ffmpeg -y -i {} -map 0 -c copy -metadata comment=\"\" -metadata description=\"\" -metadata purl=\"\" temp.mp3"
Performing the "convert" process in place (overwriting the same file) breaks the stream data of the output file but adding an auxiliary
temp.mp3
and then overwriting it makes it work like a charm.I've tested the following command combination:
I hope this helps!
PS: I know the question is a bit old but posting a working solution might help you and others.