Set thumbnail, if video data exists only in other streams of the file #3

Closed
opened 2023-07-04 15:19:53 +02:00 by esche · 1 comment
Owner

Some flacs use a separate video stream for the thumbnail. In this case the thumbnail will be lost after the conversion. A solution could be to recognice if a thumbnail is missing and a video stream exists. In this case the video stream could be converted into an png and added as a thumbnail.

Adding a thumbnail with ffmpeg to an opus is quite complex because it needs to be converted as a data blob first. So I would prefer, using opusenc with a picture flag for the conversion.
https://opus-codec.org/docs/opus-tools/opusenc.html

This could also be a solution for future support of extracting audio of video streams
https://superuser.com/questions/538112/meaningful-thumbnails-for-a-video-using-ffmpeg

Some flacs use a separate video stream for the thumbnail. In this case the thumbnail will be lost after the conversion. A solution could be to recognice if a thumbnail is missing and a video stream exists. In this case the video stream could be converted into an png and added as a thumbnail. Adding a thumbnail with ffmpeg to an opus is quite complex because it needs to be converted as a data blob first. So I would prefer, using opusenc with a picture flag for the conversion. https://opus-codec.org/docs/opus-tools/opusenc.html This could also be a solution for future support of extracting audio of video streams https://superuser.com/questions/538112/meaningful-thumbnails-for-a-video-using-ffmpeg
Author
Owner

Combination of this 2 can be used to determine, if there is a thumbnail in a video stream:

ffprobe 01\ -\ Tongue\ Demons.flac -select_streams v -show_entries stream=index -v 0 -of compact=p=0:nk=1
ffprobe 01\ -\ Tongue\ Demons.flac -select_streams V -show_entries stream=index -v 0 -of compact=p=0:nk=1

Combination of this 2 can be used to determine, if there is a thumbnail in a video stream: ffprobe 01\ -\ Tongue\ Demons.flac -select_streams v -show_entries stream=index -v 0 -of compact=p=0:nk=1 ffprobe 01\ -\ Tongue\ Demons.flac -select_streams V -show_entries stream=index -v 0 -of compact=p=0:nk=1
esche closed this issue 2023-07-06 23:17:59 +02:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: esche/media-tools#3
No description provided.