FFMPEG Use image demuxer on audio file with embedded cover image
I have an mp3 file with embedded cover art. I would like to generate a video of the image with the audio playing, for the duration of the audio.
I can achieve this with the image in a separate file using :
ffmpeg -loop 1 -framerate 1 -i "image.jpg" -i "audio.mp3" -map 0:v -map 1:a -shortest -r 1 "output.mp4"
Is it possible to do this without separating the image into its own file?
If I run ffprobe -i audio.mp3
it shows that
Stream #0:1: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 1200x1200 [SAR 300:300 DAR 1:1], 90k tbr, 90k tbn (attached pic)
Metadata:
title : front cover
comment : Cover (front)
And this is ffprobe of the image: ffprobe -i image.jpg
Input #0, image2, from 'folder.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 53163 kb/s
Stream #0:0: Video: mjpeg (Progressive), yuvj420p(pc, bt470bg/unknown/unknown), 1200x1200 [SAR 300:300 DAR 1:1], 25 fps, 25 tbr, 25 tbn
From my understanding, the -loop
and framerate
options are part of the image demuxer.
Is this possible to do? If not on CLI, would it be doable to modify the source code to do this in <37 years?
Thank you
Read more here: Source link