Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm encoding an image sequence to an .mp4 file using the following ffmpeg command:

ffmpeg -y -loglevel info -threads 0 -f lavfi -framerate 60  -i image_seq.%06d.tif -r 60 -preset medium -codec:v libx265 -ar 48000 -acodec aac -shortest -strict experimental -sn -vsync 1 -pix_fmt yuv420p -b:v 7340032 -movflags +faststart output_file.mp4

The image sequence itself is 60fps but the resulting .mp4 file contains a number of frames twice as big as in the original image sequence.

I really can't see anything that's wrong with the command.. any ideas?

Thanks!

EDIT:

The command which includes several inputs:

ffmpeg -y -loglevel info -threads 0 -f lavfi -i aevalsrc=0 -framerate 60 -i image.png -start_number 000000 -apply_trc bt709 -i image_seq.%06d.tif -r 60 -preset medium -codec:v libx265 -ar 48000 -acodec aac -shortest -strict experimental -sn -vsync 1 -pix_fmt yuv420p -b:v 7340032 -movflags +faststart -map "2:0" -map "0:0" -shortest output.mp4 2>&1 | tee -a log_file.log
share|improve this question
up vote 0 down vote accepted

Assuming that's the unabridged command, I do see many puzzling things.

-threads 0 is set here for decoding the input and is set to 0 = auto. Which is the default. Removed.

-f lavfi is for supplying a filter-generated source, not for a set of image files. Removed.

-r 60 should normally be harmless here, but given the filter format and vsync later on, better to remove this confounding option.

-ar 48000 -acodec aac is for encoding audio, but no audio stream is supplied or generated, so inert here. Removed.

-shortest is needed when there are multiple streams being encoded, and you want the encoding to stop when the shortest stream ends, but there's only one stream, the image sequence, being encoded. Removed.

-strict experimental is needed if you are encoding audio using the internal AAC encoder AND your FFmpeg is older than Dec 2015. In any case, there's no audio encoding occurring. Removed.

-sn disables subtitles, but no subtitle streams are present. Removed.

-vsync 1 produces constant frame rate output but that's the default for MP4 output. Removed.

Use

ffmpeg -y -framerate 60 -i image_seq.%06d.tif
       -preset medium -c:v libx265 -b:v 7340032 -pix_fmt yuv420p
       -movflags +faststart output_file.mp4
share|improve this answer
    
Thanks, could you just see my edit with the command that contains a couple of inputs? It happens there too.. – YaronGh Jul 15 at 14:09
    
It should be ffmpeg -y -apply_trc bt709 -framerate 60 -i image_seq.%06d.tif -f lavfi -i anullsrc=r=48k -c:v libx265 -pix_fmt yuv420p -b:v 7340032 -c:a aac -shortest -movflags +faststart output.mp4 – Mulvya Jul 15 at 15:43
    
Ah.. what about my -i image.png? – YaronGh Jul 15 at 15:47
    
Wasn't being used anywhere. – Mulvya Jul 15 at 15:49
    
Fair enough, but even if my command contains "redundant" parameters, shouldn't it still work? – YaronGh Jul 15 at 15:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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