Answers.Body: <p>Assuming that's the unabridged command, I do see many puzzling things.</p>
  
  <p><code>-threads 0</code> is set here for <strong>de</strong>coding the input and is set to <code>0 = auto</code>. Which is the default. Removed. </p>
  
  <p><code>-f lavfi</code> is for supplying a filter-generated source, not for a set of image files. Removed.</p>
  
  <p><code>-r 60</code> should normally be harmless here, but given the filter format and vsync later on, better to remove this confounding option.</p>
  
  <p><code>-ar 48000 -acodec aac</code> is for encoding audio, but no audio stream is supplied or generated, so inert here. Removed.</p>
  
  <p><code>-shortest</code> 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.</p>
  
  <p><code>-strict experimental</code> 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.</p>
  
  <p><code>-sn</code> disables subtitles, but no subtitle streams are present. Removed.</p>
  
  <p><code>-vsync 1</code> produces constant frame rate output but that's the default for MP4 output. Removed.</p>
  
  <p>Use </p>
  
  <pre><code>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
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-15T14:09:26.283Z
Answers.Text: Thanks, could you just see my edit with the command that contains a couple of inputs? It happens there too..
Answers.UserDisplayName: YaronGh
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-15T15:43:19.667Z
Answers.Text: 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`
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-15T15:47:33.937Z
Answers.Text: Ah.. what about my `-i image.png`?
Answers.UserDisplayName: YaronGh
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-15T15:49:10.830Z
Answers.Text: Wasn't being used anywhere.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-15T15:57:51.253Z
Answers.Text: Fair enough, but even if my command contains "redundant" parameters, shouldn't it still work?
Answers.UserDisplayName: YaronGh
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-15T16:00:09.010Z
Answers.Text: You didn't specify the TIFF sequence as framerate 60, so it defaults to 25.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-15T16:13:58.180Z
Answers.Text: And i think that was the problem.. wasn't it? If my sequence is 60fps but it was interpreted as 25fps, it makes sense it would result in a file with twice as many frames.. thanks!
Answers.UserDisplayName: YaronGh
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-14T14:25:16.227Z
Answers.LastActivityDate: 2016-07-14T14:25:16.227Z
Answers.UserDisplayName: Gyan
Body: <p>I'm encoding an image sequence to an .mp4 file using the following ffmpeg command:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>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.</p>
  
  <p>I really can't see anything that's wrong with the command.. any ideas?</p>
  
  <p>Thanks!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>The command which includes several inputs:</p>
  
  <pre><code>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&gt;&amp;1 | tee -a log_file.log
  </code></pre>
  
Tags: <ffmpeg>
Title: ffmpeg - output file is twice as long as the input
UserDisplayName: YaronGh
ThreadText: # ffmpeg - output file is twice as long as the input
  
  (Asked by: username_0 on 2016-07-14)
  
  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
  
  ```
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-07-14. Score: 1 | Accepted answer
  
  Assuming that's the unabridged command, I do see many puzzling things.
  
  `-threads 0` is set here for **de**coding 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
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks, could you just see my edit with the command that contains a couple of inputs? It happens there too..  
  > **username_1**: 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`  
  > **username_0**: Ah.. what about my `-i image.png`?  
  > **username_1**: Wasn't being used anywhere.  
  > **username_0**: Fair enough, but even if my command contains "redundant" parameters, shouldn't it still work?  
  > **username_1**: You didn't specify the TIFF sequence as framerate 60, so it defaults to 25.  
  > **username_0**: And i think that was the problem.. wasn't it? If my sequence is 60fps but it was interpreted as 25fps, it makes sense it would result in a file with twice as many frames.. thanks!  
  
  ---
  
  