jliljebl / flowblade

Video Editor for Linux
GNU General Public License v3.0
2.64k stars 180 forks source link

"Position Scale" filter gets confused about proxy vs. real media #967

Open leonerd opened 3 years ago

leonerd commented 3 years ago

I created a project using proxy media, which involves using the "Transform" compositor to place a "picture in picture" video on top of another. I additionally use the "Position Scale" filter to crop out part of the source media for that picture-in-picture, and centre it nicely.

Originally this was all set up using proxy media rendered at half resolution. All worked fine.

When I switched it back to real media, the size of this picture-in-picture was still correct, but all the positioning relative to the source was wrong. The output was placed in the right part of the program (so the compositor was working correctly), but it seemed the X/Y position arguments of the "Position Scale" filters were wrong. I had to manually move them around again to fix it up.

Hopefully that's explained nicely and you can follow. If not I'll post some "steps to reproduce" in a day or so - but currently I'm rushing to finish this project for a deadline so I don't have time to spend on that just this second.

jliljebl commented 3 years ago

Yes, this is because because I have the data in this filter working on pixel units so when going proxy <-> original media the results will differ because the images are different sizes in pixels.

This could possibly be fixed in future but not likely in the next 2 cycles.

leonerd commented 3 years ago

Ah, I see.

If it would help matters, I could maybe take a look into it and see if I can adjust it to store that as either a floating point fraction of the overall frame, or scaled in terms of the project resolution itself, thus would be immune to resolution changes. When I'm free of my current video project I'll see if I can find and adjust the relevant code.

In the meantime perhaps, at least a warning could be added around these features to tell people it doesn't work in that specific combination? Otherwise I can imagine much annoyance and frustration from users who find a broken rendering at the end of their work, when they switch off the proxy media and find everything in the wrong place.

jliljebl commented 3 years ago

When I'm free of my current video project I'll see if I can find and adjust the relevant code.

Releant code is mostly keyframeeditor.py, keyframecanvas.py and propertyedit.py

In the meantime perhaps, at least a warning could be added around these features to tell people it doesn't work in that specific

I can add documentation item but not additional GUI. I can merge PR that shows info but only when in Proxy Mode.

jliljebl commented 3 years ago

I'll pump fixing this up, could a big improvement on many work flows as 4K editing is becoming increasingly common. We will make push to have this fixed, in 2.12 latest, 2.10 depends on bit.