Opened 6 years ago
Closed 6 years ago
#7583 closed defect (fixed)
wrong frames generated by overlay filter when y is negative and dynamic
Reported by: | Taner Sener | Owned by: | |
---|---|---|---|
Priority: | important | Component: | avfilter |
Version: | git-master | Keywords: | overlay regression |
Cc: | tanersener@gmail.com | Blocked By: | |
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Summary of the bug:
I want to create a vertically moving photo using overlay filter. If I start with a negative y and increase it by time, photo is expected to slide down from the top of the screen slowly. But unfortunately input photo is not rendered correctly and some parts are missing from the photo.
This technique works brilliantly when applied horizontally on x but when y is used this technique fails.
How to reproduce:
Any photo can be used as input.
% ffmpeg \ -loop 1 -i input.jpg \ -f lavfi -i color=black:s=600x600 \ -filter_complex "[0:v]scale=400:400,[1:v]overlay=0:'-h+t/1*600*2',trim=duration=1[video]" \ -map [video] -c:v mpeg4 output.mp4 ffmpeg version N-92590-gf7faaa8c18 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
Affected versions:
According to my analysis, commit d54014d1573ec6e958e9c9e802e613c73c7f7ba5 breaks something about overlay filter. Test command provided above works on all releases without this commit: 2.8.x, 3.4.x, 4.0.x. But 4.1 and master, which has d54014d1573ec6e958e9c9e802e613c73c7f7ba5, is not working as expected.
Attachments (5)
Change History (13)
by , 6 years ago
Attachment: | failure.mp4 added |
---|
by , 6 years ago
Attachment: | success.mp4 added |
---|
Output video generated by this command using ffmpeg from 3.4.x branch
follow-up: 4 comment:2 by , 6 years ago
add threads=1 as workaround.
Adding -threads 1 didn't make any difference for me.
comment:3 by , 6 years ago
Keywords: | regression added |
---|---|
Priority: | normal → important |
Reproduced by developer: | set |
Status: | new → open |
follow-up: 5 comment:4 by , 6 years ago
Replying to tanersener:
add threads=1 as workaround.
Adding -threads 1 didn't make any difference for me.
threads=1 is filter option not flag.. read what i wrote would you?
by , 6 years ago
Attachment: | failure_with_threads_1.mp4 added |
---|
Output video generated by test command and threads=1 option using ffmpeg from git-master
comment:5 by , 6 years ago
Replying to richardpl:
Replying to tanersener:
add threads=1 as workaround.
Adding -threads 1 didn't make any difference for me.
threads=1 is filter option not flag.. read what i wrote would you?
Using threads=1 option improves output a little but doesn't fix the issue. You can see the output file failure_with_threads_1.mp4.
By the way, thanks for trying to help me but I never used threads option before and FFmpeg Filters Documentation does not list any threads option for filters used so I googled your threads=1 recommendation. All search results from first page corrected threads=1 as -threads 1. This is why I tried using -threads 1. Just wanted to let you know.
comment:7 by , 6 years ago
Replying to richardpl:
threads=1 option works fine. Post full uncut ffmpeg output.
You're right, workaround works fine, my mistake, ignore failure_with_threads_1.mp4.
comment:8 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Fixed in 8440835dbe93ef9972ceb940af9bda9bc0e178e7.
Output video generated by this command using ffmpeg from git-master