반응형

JPG 이미지를 MP4 동영상으로 만들어 보자.

 

ffmpeg -framerate 30 -i image%03d.jpg -c:v libx264 -pix_fmt yuv420p output.mp4

Command Breakdown


ffmpeg: The command to run the FFmpeg program.

 

-framerate 30: Sets the input framerate to 30 frames per second (fps). Each image will be displayed for 1/30th of a second. You can adjust this value to control the speed of the final video.

-i image%03d.jpg: Specifies the input files.
image: The common prefix of your image files (e.g., image001.jpg, image002.jpg).
%03d: This format specifier tells FFmpeg to look for a sequence of numbers, zero-padded to three digits. Adjust the number of digits (%02d, %04d, etc.) to match your file naming convention.

-c:v libx264: Specifies the video codec to use, which is H.264, a widely compatible codec for MP4 files.

-pix_fmt yuv420p: Sets the pixel format to yuv420p, which is essential for compatibility with most non-FFmpeg-based players, including Windows Media Player and mobile devices.

output.mp4: The name of the resulting output video file.

 

반응형
Posted by J-sean
: