1

I am facing a problem to set video streams framerates with FFmpeg when using the map option.

Here is what I want to do:

Given an input video file of 60 fps, I want to generate an output file containing two video streams: one with 60 fps (as the source) and the other with 30 fps (half the source's framerate).

I executed this command:

ffmpeg \
  -i input_60fps.mov \
  -map 0:v \
  -map 0:v \
  -crf:v:0 23 
  -c:v:0 libx264 \
  -s:v:0 640x360 \
  -vf:v:0 fps=fps=30/1 \
  -crf:v:1 23 \
  -c:v:1 libx264 \
  -s:v:1 1920x1080 \
  -vf:v:1 fps=fps=60/1 \
  -f mp4 \
  out.mp4

This gave me the wanted output file but with streams of 60 fps!!

Am I missing something? I did many tests, I am wondering if FFmpeg has a problem to set different framerates when using the -map option!!

Waiting for your help! Thank you …

1 Answer 1

1

-vf does not accept stream specifiers. You can use e.g. -filter:v:1 for that.

However, you need not use the fps filter at all; output -r will do.

ffmpeg -i input_60fps.mov -map 0:v -map 0:v -c:v libx264 -crf 23 -s:v:0 640x360 -r:v:0 30 -s:v:1 1920x1080 -f mp4 out.mp4

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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