Create Video File from Audio File
Vectorscope
ffmpeg -i input.mp3 -filter_complex "[0:a]avectorscope=s=1920x1080,format=yuv420p[v]" -map "[v]" -map 0:a output.mp4
Histogram
ffmpeg -i input.mp3 -filter_complex "[0:a]ahistogram,format=yuv420p[v]" -map "[v]" -map 0:a output.mp4
Concatenate Multiple Files
dir *.mp3 /AD > list.txt
ffmpeg -safe 0 -f concat -i list.txt -c copy output.mp3
Convert File
Basic Convert:
ffmpeg -i input.mp3 output.flac
Best Quality:
ffmpeg -i "input.mp4" -c:v libx264 -b:v 10000k -c:a aac -b:a 192k -pass 1 -f null NUL && ffmpeg -i "input.mp4" -c:v libx264 -b:v 10000k -c:a aac -b:a 192k -pass 2 "output.mkv"
(Allows to set the bitrate for video and audio and runs with two passes. The bitrate cannot be higher than highest possible. It takes much longer to convert, this can be reduced by only having 1 pass.)
Convert Multiple Files
for /F "tokens=*" %%G in ('dir /b *.mp4') do ffmpeg -i "%%G" -c:v libx264 -b:v 2000k -c:a aac -b:a 192k -pass 1 -f null NUL && ffmpeg -i "%%G" -c:v libx264 -b:v 2000k -c:a aac -b:a 192k -pass 2 "~nG.mkv"
(This is to be used in a Batch file, to run in CMD then remove one % from each G)
Play Videos and Music
ffplay <filename>
Installation Options
Windows:
winget install ffmpeg
choco install ffmpeg
MacOS:
brew install ffmpeg
Linux:
sudo apt install ffmpeg
yum install ffmpeg ffmpeg-devel
sudo pacman -S ffmpeg
Useful Links