-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Multicam with individual Audio Role voice isolation breaks in FCPXML v1.11 #314
Comments
I've reported this to Apple but didn't get a feedback ID. |
@randomeizer - Strangely, I'm having trouble manually re-creating this bug. Are you able to share a demonstration library? |
For any developers following along, here's my quick and dirty Swift-workaround: import Foundation
//---------------------------------------------------------
// Correct FCPXML for a bug in Final Cut Pro 10.7.1 when
// using FCPXML v1.11.
//
// See: https://github.com/CommandPost/FCPCafe/issues/314
//---------------------------------------------------------
func correctFCPXML(xmlString: String) -> String {
guard let xmlData = xmlString.data(using: .utf8) else {
return xmlString
}
let parser = XMLParser(data: xmlData)
let delegate = FCPXMLWorkaroundsParserDelegate()
parser.delegate = delegate
if parser.parse(), delegate.isVersionValid {
NSLog("[Metaburner Pro Renderer] It's from Final Cut Pro v10.7.1 and FCPXML v1.11 so we'll 'fix it'.")
return delegate.getCorrectedXML()
} else {
return xmlString
}
}
//---------------------------------------------------------
// Parser Delegate:
//---------------------------------------------------------
class FCPXMLWorkaroundsParserDelegate: NSObject, XMLParserDelegate {
private var correctedXML: String = ""
private var currentElement: String = ""
private var currentAudioRoleSource: String = ""
var isVersionValid: Bool = false
private var orderMap: [String: Int] = [
"adjust-loudness": 1,
"adjust-noiseReduction": 2,
"adjust-humReduction": 3,
"adjust-EQ": 4,
"adjust-matchEQ": 5,
"adjust-voiceIsolation": 6,
"adjust-volume": 7,
"adjust-panner": 8,
"filter-audio": 9,
"mute": 10
]
private var audioRoleSourceChildren: [String] = []
func parser(_ parser: XMLParser, foundCharacters string: String) {
switch currentElement {
case "audio-role-source":
currentAudioRoleSource += string
default:
correctedXML += string
}
}
func parser(_ parser: XMLParser, didStartElement elementName: String, namespaceURI: String?, qualifiedName qName: String?, attributes attributeDict: [String : String] = [:]) {
currentElement = elementName
if elementName == "fcpxml" {
if let version = attributeDict["version"], version == "1.11" {
isVersionValid = true
}
correctedXML += "<\(elementName)"
attributeDict.forEach { correctedXML += " \($0.key)=\"\($0.value)\"" }
correctedXML += ">"
} else if elementName == "audio-role-source" {
currentAudioRoleSource = "<\(elementName)"
attributeDict.forEach { currentAudioRoleSource += " \($0.key)=\"\($0.value)\"" }
currentAudioRoleSource += ">"
} else if !audioRoleSourceChildren.contains(elementName) {
correctedXML += "<\(elementName)"
attributeDict.forEach { correctedXML += " \($0.key)=\"\($0.value)\"" }
correctedXML += ">"
}
}
func parser(_ parser: XMLParser, didEndElement elementName: String, namespaceURI: String?, qualifiedName qName: String?) {
if elementName == "audio-role-source" {
reorderAudioRoleSourceChildren()
correctedXML += currentAudioRoleSource
correctedXML += "</\(elementName)>"
} else if !audioRoleSourceChildren.contains(elementName) {
correctedXML += "</\(elementName)>"
}
}
private func reorderAudioRoleSourceChildren() {
let sortedChildren = audioRoleSourceChildren.sorted { orderMap[$0]! < orderMap[$1]! }
sortedChildren.forEach { currentAudioRoleSource += $0 }
audioRoleSourceChildren.removeAll()
}
func parser(_ parser: XMLParser, parseErrorOccurred parseError: Error) {
NSLog("[Metaburner Pro Renderer] FCPXMLWorkarounds - Parse error: \(parseError.localizedDescription)")
}
func getCorrectedXML() -> String {
return correctedXML
}
} |
Were you able to replicate? I didn't get time to export a library yesterday, sorry. |
Here is a library which contains a project which will export with the FCPXML bug in v1.11. |
Apple reports via Feedback Assistant:
|
Apple Feedback Assistant ID: FB13500575
DESCRIBE THE BUG:
When I have a timeline with a Multicam clip that has multiple audio roles, and I select an individual role to apply Voice Isolation + Volume adjustments, the exported FCPXML in v1.11 will be output in this order (
volume
thenvoiceIsolation
):However, it should be in this order (
voiceIsolation
, thenvolume
):This only occurs in FCPXML 1.11. FCPXML 1.10 outputs correctly.
TO REPRODUCE:
EXPECTED BEHAVIOUR
Exporting would be in the correct order, and importing would work correctly.
SCREENSHOTS
SPECS
ADDITIONAL COMMENTS
Workaround: Export in FCPXML v1.10.
The text was updated successfully, but these errors were encountered: