Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for XML clips in chains. #1602

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

bmatherly
Copy link
Member

@bmatherly bmatherly commented Nov 4, 2024

This allows speed effects to XML clips.
It also adds a properties panel for XML clips.

Also fixes this issue:
https://forum.shotcut.org/t/issues-when-using-mlt-as-a-clip-in-a-timeline/44164

If the XML clip has a filter on the output, the filter will not appear in the project - it is "hidden" inside the chain.

Depends on
mltframework/mlt#1047

This is what the properties panel looks like (similar to the Output properties):
image

The way this is designed, the embedded XML will always be rendered at the XML clip profile (by the consumer producer). Then it will be converted to the project profile if necessary.

Discussion: Should we show a warning in the properties panel if the XML clip profile does not match the project profile?

Discussion: Do we want to add a button or method to lauch Shotcut from the properties panel so the clip can be edited in another instance of Shotcut? Maybe that would be confusing to have two instances at the same time.

This allows speed effects to XML clips.
It also adds a properties panel for XML clips.
@bmatherly
Copy link
Member Author

Of interest:
https://forum.shotcut.org/t/adding-to-timeline-a-mlt-as-a-clip-with-different-fps-crashes-shotcut/46418

An idea from that post is that I could add the duration to the properties panel.

@ddennedy
Copy link
Member

ddennedy commented Nov 14, 2024

An idea from that post is that I could add the duration to the properties panel.

Some things I noticed while debugging the forum report and testing these branches:

  • The audio plays with heavy crackling artifacts if you nest a project with audio and a different frame rate (outer project 60 fps, inner project 29.97).
  • dragging .mlt file to playlist, double-click to open from playlist, Properties does not show the new producer widget
  • same goes when drag .mlt to Timeline
  • File > Open MLT XML as Clip (before adding to Timeline) is giving me empty Properties (I tried a couple projects)

image

  • It permits the addition of Speed: Forward & Reverse and Time Remap, which can go in reverse, and the project might perform very poorly because it masks whether its videos seek well (has no B frames).

I am using the MLT branch as well.

@ddennedy
Copy link
Member

FYI, the audio issue on mismatching frame rate exists regardless this change, but if this change can accommodate speed I wondered if it could improve this. It is worse when the nested project fps is less than the outer's.

@bmatherly
Copy link
Member Author

FYI, the audio issue on mismatching frame rate exists regardless this change, but if this change can accommodate speed I wondered if it could improve this. It is worse when the nested project fps is less than the outer's.

I will look into this. My intention is to fix these kinds of problems.

It permits the addition of Speed: Forward & Reverse and Time Remap, which can go in reverse, and the project might perform very poorly because it masks whether its videos seek well (has no B frames).

This is a very good point. Part of my motivation was to allow speed effects on a nested clip. But now I think that is not a good idea and probably not that important since a user can simply encode the embedded project and apply speed to the encoded file. I think I will remove the chain wrapper (but keep the producer_consumer wrapper).

Thanks again for your testing. I will spend some more time on this. I would like it to be bullet proof before we show it to a wider audience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants