1

I need to convert jpg image sequences that are changing in their file naming convention to h264 mp4 1920x1080 video files, so I thought I create a jpg2mp4.bat file in a windows text editor.

I have the following in my jpg2mp4.bat:

@echo off

::Set path to ffmpeg.exe here:
set ffmpeg=C:\ffmpeg\bin\ffmpeg.exe
set outputfile=jpg_to_h264
::Frame Rate of exported movie:
set framerate=24

%ffmpeg% -f image2 -i %1 -an -r %framerate% -strict experimental -s hd1080 -vcodec libx264 -preset slow -profile:v baseline -level 31 -refs 1 -maxrate 10M -bufsize 10M -vb 8M -threads 0 %outputfile%.mp4

pause

Now when I drag one of the images from the image sequence onto the jpg2mp4.bat it will only create a video file with that one frame. How do I have to change my ffmpeg command line so that it will take the whole image sequence?

Another thing that I'm curious about is how I can automatically name the output video file to the name of the image sequence file name without the sequence number?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.