Opened 6 years ago

Last modified 6 years ago

#5945 open defect

Lavfi & filter_complex ignore fps filter

Reported by: LordHDL Owned by:
Priority: minor Component: documentation
Version: git-master Keywords: overlay
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary: When using the fps filter with -lavfi or -filter_complex it will be ignored and use the default 25 FPS for the output video.
How to reproduce: Specify fps for a video stream.

ffmpeg -loop 1 -i ~/Desktop/FP2.tiff -i ~/Desktop/ -lavfi \
"[1:v]fps=60[video]; \
 [0:v][video]overlay=50:200:shortest=1[final]" \
-map "[final]" -map 1:a -c:v ffv1 -level 3 -c:a copy ~/Desktop/filtergraph.nut

Attachments (1)

filtergraph (8.6 KB ) - added by LordHDL 6 years ago.

Download all attachments as: .zip

Change History (5)

by LordHDL, 6 years ago

Attachment: filtergraph added

comment:1 by Nicolas George, 6 years ago

You are changing the framerate on the secondary input of the overlay filter. This is useless, overlay syncs on its primary input by default, the framerate of the secondary input is not used. What you observe seems the correct behaviour.

Also, full console output missing.

comment:2 by LordHDL, 6 years ago

Full console output is in the file I had attached.

The following command worked for me:

ffmpeg -y -loop 1 -i ~/Desktop/FP2.tiff -i ~/Desktop/ -i ~/Desktop/ -lavfi \
"[0:v]fps=60[bg]; \
[bg][1:v]overlay=10:(main_h/2)-(overlay_h/2):format=rgb[v1]; \
[v1][2:v]overlay=460:(main_h/2)-(overlay_h/2):shortest=1:format=rgb[final]" \
-map "[final]" -map 1:a -map 2:a -c:v ffv1 -level 3 -c:a copy ~/Desktop/filtergraph.nut

This method seems to set the frame rate for everything as a whole. Is there any way to control each video overlay's frame rate individually without reencoding them first?

comment:3 by LordHDL, 6 years ago

Post duplicated.

Last edited 6 years ago by LordHDL (previous) (diff)

comment:4 by Carl Eugen Hoyos, 6 years ago

Component: avfilterdocumentation
Keywords: overlay added
Priority: normalminor
Status: newopen

The ticket indicates that the sentence The first input is the "main" video on which the second input is overlaid. in the documentation can be improved.

Note: See TracTickets for help on using tickets.