Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Embed video thumbnails in audio files as cover art #2404
Comments
|
Most definitly, this sounds like a great feature, if only as a flag by |
|
Heh... I don't think I want to write a pure python implementation of a mpeg4 metadata parser/encoder, something that apparently the ffmpeg devs couldn't get right yet. From reading the mailing list thread that was linked from the ffmpeg tracker, seems like the issue is far from trivial. Nopenopenope. Just checked the ./postprocessor/ffmpeg.py file, and since AtomicParsley is a command line tool just like ffmpeg, this feature could use utils.check_executable() to make it a soft dependency, and only checked for if a flag like |
|
Sorry, I was under the impression that AtomicParsley was a Python library. An external program is fine (and actually preferred, since it's probably easier to install). So go ahead and add support ;) We should just include a good error message when AtomicParsley is missing. |
|
Hey guys, I wouldn't mind implementing this. |
|
Tried with AtomicParsley, but looks like it doesn't work.
|
|
Oh hey awesome, feels good to have an item from my TODO list stolen :3 Just tested it, works perfectly. Thanks! |
|
I tried adding thumbnails to all the m4a I downloaded before, using both add-metadata and embed-thumbnail over a list of 206 videos.
It succeeded with all the m4a files, except two, which I already used --embed-thumbnail with.
This can be reproduced with --embed-thumbnail once, then run youtube-dl again with the same video id and either --embed-thumbnail or --add-metadata. Sounds like another thumbnail related ffmpeg bug, I'm afraid :/ |
|
@dequis Should be fixed now. |
|
Sweet, confirmed, no issues now. Thanks! Well, a small side effect of the last few commits is that if youtube-dl is run again with --add-metadata but not --embed-thumbnail, the thumbnail gets removed from the existing file, but seems completely acceptable IMO. The other metadata is never removed if --add-metadata is missing. |
|
@dequis This is unfortunately necessary because ffmpeg doesn't work with covers/thumbnails :( Maybe we should give some warning? |
|
Yeah, I understand that ffmpeg has issues with this, and this seems like a good solution for that problem. Honestly it's a rare situation, you have to do --embed-thumbnail first then run youtube-dl again with --add-metadata only. I have no idea why anyone would do that, but if they do they can just try embedding the thumbnail again and it will work. |
|
I've merged @pulpe's commits, it will be available in the next release. Thanks for the report. |
|
Hello, I wrote the answer to that Stack Overflow question. I would just like to
|
|
@cup, is right because AtomicParsley is not only the program that is able to embed metadata into a MPEG4 file. There are several others that do the same job. One worse or better than another. But, it seems the method of using AtomicParsley is quite easy because they provide pre-built binaries on their website. |
So I found that the
-f bestaudiofeature downloads m4a files from youtube, which is great, but I'm missing my thumbnails. m4a files support embedding images in them, and video players such as mpv show those images as a static replacement of the video stream. Just like most of the music in video sites, but with a jpeg instead of a video with a single repeated frame.I was considering writing a small script to get those files with
youtube-dl --get-thumbnailand then embed them with AtomicParsley (a mpeg4 metadata manipulator, as this page suggests it's not working with ffmpeg), but then realized it would be a good feature to have as part of youtube-dl, since it already has features to add metadata to the video.Does this sound like a desirable feature? Is the dependency with AtomicParsley an issue? If it's ok, I might go ahead and implement it, then send a PR later.