Is there any way to add a custom thumbnail to a .webm file using FFmpeg?
I tried the following commands using FFmpeg version: 4.2.7-0ubuntu0.1, but not working for me
Yes, it is possible to add a custom thumbnail to a .webm file using FFmpeg.
You can use the “thumbnail” filter in FFmpeg.
Here is an example command that will extract a thumbnail from the video at the 5-second mark and save it to a file named “thumbnail.jpg”:
ffmpeg -i input.webm -vf “thumbnail,scale=640:360” -frames:v 1 thumbnail.jpg
To add the thumbnail to the .webm file as a poster image, you can use the “metadata” option in FFmpeg. Here is an example command that will add the thumbnail to the .webm file as a poster image:
ffmpeg -i input.webm -i thumbnail.jpg -map 0 -map 1 -c copy -c:v:1 image2 -metadata:s:v:1 title=“Album cover” -metadata:s:v:1 comment=“Cover (front)” output.webm
The above command will take the input video “input.webm” and the thumbnail image “thumbnail.jpg” and create a new .webm file “output.webm” with the thumbnail added as a poster image.