1

I have a series of images I want to convert into a video. The images are formatted as follows:

Dimensions: 3840 x 2160
Width: 3840 pixels
Height: 2160 pixels
Horizontal Resolution: 30 dpi
Vertical Resolution: 72 dpi
Bit Depth: 24 

ffmpeg -framerate 23.976000 -i woa%04d.jpg -i original-audio.wav -c:v libx265 -crf 15 -preset ultrafast -pix_fmt yuv444p -c:a copy Output.mkv

The issue I'm having is the JPG files are rendered into a square, ruining the original aspect ratio.

I've also tried the following:

ffmpeg -framerate 23.976000 -i woa%04d.jpg -i original-audio.wav -c:v libx265 -crf 15 -preset ultrafast -pix_fmt yuv444p -vf scale=3840:2160:force_original_aspect_ratio=decrease -c:a copy Output.mkv

Anyone have any suggestions?

This is the output of ffmpeg -i woa%04d.jpg

This is what I get:

ffmpeg version N-94357-g4373bb411c Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.1.1 (GCC) 20190716
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 30.100 / 56. 30.100
  libavcodec     58. 53.101 / 58. 53.101
  libavformat    58. 28.102 / 58. 28.102
  libavdevice    58.  7.100 / 58.  7.100
  libavfilter     7. 56.101 /  7. 56.101
  libswscale      5.  4.101 /  5.  4.101
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Input #0, image2, from 'woa%04d.jpg':
  Duration: 00:03:43.32, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 3840x2160 [SAR 30:72 DAR 20:27], 25 fps, 25 tbr, 25 tbn, 25 tbc
At least one output file must be specified```
  • 2
    Share the full log of ffmpeg -i woa%04d.jpg – Gyan Jul 23 '19 at 5:45
  • I added the output to the original question. – sicisum Jul 23 '19 at 14:06
0

ffmpeg sees the input as having a display ratio of 20:27. If that's undesired, you can reset the aspect ratio to 1.

ffmpeg -framerate 24000/1001 -i woa%04d.jpg -i original-audio.wav -vf setsar=1 -c:v libx265 -crf 15 -preset ultrafast -pix_fmt yuv444p -c:a copy Output.mkv

  • Awesome! That did the trick :) Thank you! – sicisum Jul 26 '19 at 19:34

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.