I have a m4a audio file that I need to convert to a mov file. How can I do this?
How to convert an m4a to mov
file conversionm4amov
Related Question
- How to remove the “video” flag from a transcoded .m4a file
- Windows – Can QuickTime Pro convert .mpg to .mov
- How to re-encode iTunes m4a files to mp3
- MacOS – How to convert WMV to QuickTime MOV
- QuickTime Player will not play .mov file
- Automate Conversion from m4a to mp3
- Why I cannot play M4A audio on iTunes, but I can play it on QuickTime
- IPhone – How to set custom m4a format audio file as alarm tone on iPhone
Best Answer
This creates an x264-encoded mov file with image.png as the background:
ffmpeg -loop 1 -i image.png -i audio.m4a -c:a copy -c:v libx264 -crf 20 -pix_fmt yuv420p -shortest output.mov
You can use mp4 or mkv as the container by just changing the name of the output file.
-c:a copy
disables re-encoding the audio.-loop 1
loops the image infinitely so that it is not shown for just one frame. It also makes the video stream infinitely long, so-shortest
is needed to finish encoding after the audio stream finishes.-shortest
has to be after the input files in new versions of ffmpeg.-crf
(constant rate factor) can be from 0 (lossless) to 51 (lowest quality). If you remove-pix_fmt yuv420p
, ffmpeg uses yuv444p, which is not supported by many video players.You can use a black background by replacing
-loop 1 -i image.png
with-f lavfi -i color=c=black:s=1280x720
. You can resize an image by adding an option like-filter:v '[in] scale=-1:720, pad=1280:720:640-iw/2 [out]'
.More information: