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

[Feature Request] MKV attachment support to save frame as cover.jpg #673

Closed
2 of 3 tasks
cyzs233 opened this issue Feb 19, 2021 · 8 comments
Closed
2 of 3 tasks

[Feature Request] MKV attachment support to save frame as cover.jpg #673

cyzs233 opened this issue Feb 19, 2021 · 8 comments

Comments

@cyzs233
Copy link

cyzs233 commented Feb 19, 2021

I noticed after export segment, lossless-cut deleted the attachment "cover.jpg" that I put in the original file. But having a custom thumbnail helps while browsing a specific video within a folder. And if you're trying to put a cover.jpg after exportation, you'll need to refresh the thumbnail cache in order to view your changes, which is not a user-friendly task.
Suggestion:

  • option to choose a file from file explorer as cover.jpg/cover.png
  • option to select a frame from the imported video as cover.jpg/cover.png
  • option to keep/discard original cover art within the imported video.
@mifi
Copy link
Owner

mifi commented Aug 27, 2021

Could you go to the tracks panel and enable the mjpeg track?
I believe this could be related to #308
To reproduce this I found a normal mp4 file and then I did like this: https://superuser.com/questions/1544737/how-to-embed-cover-art-into-mp4-without-errors
When I enable the mpjeg track, it does keep the cover art.

@mifi
Copy link
Owner

mifi commented Aug 27, 2021

As for adding a custom cover art, I thought this would just work by drag-dropping a jpeg file onto losslesscut with a media file already opened, but it also needs this extra flag -disposition:X attached_pic, like this:

ffmpeg -i 'issue-673-embedded-cover-art.mp4' -i 'cover.jpg' -c copy -map '0:0' -map '0:1' -map '1:0' -disposition:2 attached_pic -map_metadata 0 -f mp4 -y 'out.mp4'

mifi added a commit that referenced this issue Aug 27, 2021
allows for adding cover art to videos #673
@mifi
Copy link
Owner

mifi commented Aug 27, 2021

I have added the option to change disposition per stream, so in the next version it can be used to add cover art.

First drag the image into llc, then:

Screenshot 2021-08-27 at 17 01 31

Screenshot 2021-08-27 at 17 01 13

@cyzs233
Copy link
Author

cyzs233 commented Aug 27, 2021

Thanks for your hard works, the new UI is pretty cool😀. @mifi

  • First, Is the new disposition flag also works on .mkv files? I forget to mention the format in title, updated.

To reproduce this I found a normal mp4 file and then I did like this: https://superuser.com/questions/1544737/how-to-embed-cover-art-into-mp4-without-errors
When I enable the mpjeg track, it does keep the cover art.

  • Second, I tried to enable mjpeg tracks on a .mkv file, It does save the mjpeg files, but It doesn't get treated as attachments anymore. Same result if you drop&drop a .png file onto lossless cut.
    As demonstrated in the following gif: The first video is the original with attachment cover art correctly displayed , the second video is a fragment of the same vod using lossless cut with all 4 mjpeg tracks selected.
Dementration gif

GIF 27-08-2021 23-46-08

@cyzs233 cyzs233 changed the title [Feature Request] Attachment support to save frame as cover.jpg [Feature Request] MKV attachment support to save frame as cover.jpg Aug 27, 2021
@mifi
Copy link
Owner

mifi commented Aug 27, 2021

  • First, Is the new disposition flag also works on .mkv files? I forget to mention the format in title, updated.

it maps directly to the ffmpeg disposition feature so I believe it should work on mkv too.

  • As demonstrated in the following gif: The first video is the original with attachment cover art correctly displayed , the second video is a fragment of the same vod using lossless cut with all 4 mjpeg tracks selected.

maybe there is something missing somewhere. So it works with mp4 but not mkv?

@rchndrsn
Copy link

rchndrsn commented Oct 18, 2021

This page https://github.com/mifi/lossless-cut speaks of a use case that enables "Attach cover art to videos". But I cannot find how to do this, or any tutorials about it. Is it real? My version 3.39 refuses to export any png or mjpeg tracks at all. Is really possible an if so, please point me to instructions. This inquiry is regarding mp4 files

@mifi
Copy link
Owner

mifi commented Oct 21, 2021

This page https://github.com/mifi/lossless-cut speaks of a use case that enables "Attach cover art to videos". But I cannot find how to do this, or any tutorials about it. Is it real? My version 3.39 refuses to export any png or mjpeg tracks at all. Is really possible an if so, please point me to instructions. This inquiry is regarding mp4 files

Did you see my comment above? #673 (comment)

I assume you mean that you want set a separate JPG file as a cover art of a video

@mifi
Copy link
Owner

mifi commented Jan 15, 2022

Closing due to lack of response

@mifi mifi closed this as completed Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants