Page MenuHome

Fix T69444: Scene strip won't play audio if duplicate uses camera.
Needs ReviewPublic

Authored by Richard Antalik (ISS) on Oct 16 2019, 10:57 PM.

Details

Summary

Running BKE_scene_eval_sequencer_sequences() removes sound from scene if any scene strip uses camera as input.

This patch fixes the issue, but since sound is "owned" by scene, now even scenes using camera input will play audio.
I don't know, if this can be solved nicely. I was thinking about setting seq->volume to 0 - it does work, but not sure about that nice part.

Diff Detail

Repository
rB Blender
Branch
T69444 (branched from master)
Build Status
Buildable 5397
Build 5397: arc lint + arc unit

Event Timeline

It sounds that more reliable approach would be to collect a set of scenes which which are are still using sound and disable the remaining ones. That would avoid iterating over all strips for every check.

Now even scenes using camera input will play audio.

Please elaborate.

Now even scenes using camera input will play audio.

Please elaborate.

Scene strip using camera input should not produce sound when played. With this patch it does because sound may not be removed, because scene strip for same scene is used in meta mode.

It sounds that more reliable approach would be to collect a set of scenes which which are are still using sound and disable the remaining ones. That would avoid iterating over all strips for every check.

First we should decide how we want to handle situatons, when scene strip is used in both modes. Ideally we should not alter anything in scene itself and just not play it, If it's not requested.

If we decide to just set strip volume, it may be OK. I think that volume for scene strips is not exposed in RNA, we won't have to iterate over strips and it can be done in RNA functions. Only problem would be, that sound will be technically played, but wont produce output.

Scene strip using camera input should not produce sound when played. With this patch it does because sound may not be removed, because scene strip for same scene is used in meta mode.

If scene is used as meta strip it should like (no pun intended :) the sound is expected to be playing?

First we should decide how we want to handle situations, when scene strip is used in both modes. Ideally we should not alter anything in scene itself and just not play it, If it's not requested.

True. But is also opening a discussion whether sound from scene's strip sequencer is to be played. To me it sounds logical to say that is should not play (we don't use any other strips in such configuration).
But, AFAIR, Joerg had different idea and wanted all sound to play, since it's a part of sound scene.

We should have a clear definition here and just stick to a design.

In 2.79 this thing was behavior flackey: if the scene preview was disabled, behavior was exactly as i described. But if the preview is enabled, toggling "Use Scene Strips" will make sound to permanently play for that strip, no matter what settings are. For until you re-open the file.

If we decide to just set strip volume, it may be OK.

If it's set in some runtime only field -- maybe. If it's changing it in DNA structure (no matter if it's original or evaluated) this is asking for a bigger issues in the future.

Only problem would be, that sound will be technically played, but wont produce output.

That's why we should have a clear way to make sound non-playable when we detect that it's not needed.

Scene strip using camera input should not produce sound when played. With this patch it does because sound may not be removed, because scene strip for same scene is used in meta mode.

If scene is used as meta strip it should like (no pun intended :) the sound is expected to be playing?

I don't quite understand the question, but overall I am thinking of VSE as a mixer. If camera input produces sound, it should be played in sequencer. If in 'meta mode' any included strip does produce sound, it should be played.

First we should decide how we want to handle situations, when scene strip is used in both modes. Ideally we should not alter anything in scene itself and just not play it, If it's not requested.

True. But is also opening a discussion whether sound from scene's strip sequencer is to be played. To me it sounds logical to say that is should not play (we don't use any other strips in such configuration).
But, AFAIR, Joerg had different idea and wanted all sound to play, since it's a part of sound scene.
We should have a clear definition here and just stick to a design.

I would agree with joerg, based in mixer analogy above.
For me it is quite clear here - by placing another vse timeline, that would play sound by itself into current timeline, I expect that sound to be played.

Design from code perspective is a bit muddy because VSE has technically only one output - image data.
Clean solution would be quite obvious - VSE should have it's own master sound 'node', that could be mixed down further. either in another VSE or to final render.

Not sure how trivial this would be to implement though. And if this would be effort worth persuing mainly.
In few months, I will have much more time, so I will be able to implement this.

In 2.79 this thing was behavior flackey: if the scene preview was disabled, behavior was exactly as i described. But if the preview is enabled, toggling "Use Scene Strips" will make sound to permanently play for that strip, no matter what settings are. For until you re-open the file.

If we decide to just set strip volume, it may be OK.

If it's set in some runtime only field -- maybe. If it's changing it in DNA structure (no matter if it's original or evaluated) this is asking for a bigger issues in the future.

Yes it would be in DNA and I am aware, that it is a hack. I don't know any better solution currently.