在我的XSD中,我有一个经常使用的限制。在多个地方使用相同的限制,更新时可能会忽略它。我知道有工具(查找/替换),但是我认为最好在全局定义这些限制。这样,我们只需要在一个地方更改它,而不是x倍。
我还有一个额外的问题,就是元素的名称总是不同,并且无法更改它(例如long_summary,short_summary等)
XSD的设置
<xs:schema>
<xs:complexType name="eventType">
<xs:sequence>
<xs:element name="short_summary">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="([\p{L}\p{M}\p{N}\p{P}\p{Z}\p{S}\p{C}]+)?"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="long_summary">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="([\p{L}\p{M}\p{N}\p{P}\p{Z}\p{S}\p{C}]+)?"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
Run Code Online (Sandbox Code Playgroud)
基本上,我只想定义([\p{L}\p{M}\p{N}\p{P}\p{Z}\p{S}\p{C}]+)?一次限制,并将其重用于short_summary和long_summary。
任何建议或指示,不胜感激。同时,我将进一步寻找,如果找到答案,我会将其放在此处。
经过大量的反复试验,我设法将多个字幕流添加到一个 MP4 中。但是,在检查MP4的元数据时,我看到了一些我想更改的结果,希望有人可以帮助我或可以解释为什么会发生。
这是输入(我添加了字幕流的原始 MP4)
$ ffmpeg -i movie.mp4
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2048x872 [SAR 1:1 DAR 256:109], 2352 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 440 kb/s (default)
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
Run Code Online (Sandbox Code Playgroud)
然后,我执行以下命令。我从不同来源收集了这些信息,但我不是 FFMPEG 专家 :)
ffmpeg -i …Run Code Online (Sandbox Code Playgroud)