mp3 to video

This commit is contained in:
lhark 2022-10-01 21:57:13 +02:00
parent 432631efe7
commit 9247830302

22
how_to
View file

@ -450,6 +450,28 @@ Video and audio editing:
Your text here # Actual text
# Mandatory empty line
ffmpeg -i in.mp4 -vf "scale=512:-2:flags=lanczos,split[x][z];[z]palettegen[y];[x][y]paletteuse,subtitles=text.srt:force_style='FontName=Oswald,Fontsize=80,FontWeight=Bold'" -r 10 out.gif
mp3 to video:
# https://shkspr.mobi/blog/2020/02/posting-audio-to-twitter/"
# Waveform
ffmpeg \
-i input.mp3 \
-filter_complex "[0:a]showwaves=s=640x480:mode=line,format=yuv420p[v]" \
-map "[v]" \
-map 0:a \
-c:v libx264 \
-c:a copy \
out.mkv
# Still image
ffmpeg \
-loop 1 \
-i image.jpg \
-i audio.mp3 \
-c:v libx264 \
-tune stillimage \
-c:a copy \
-pix_fmt yuv420p \
-shortest \
out.mp4
ImageMagick:
crop to aspect ratio