我试图拼接2个视频,主要视频是风景,第二个是肖像。 然而Azure将纵向视频自动翻转。有没有办法阻止这种行为?并且肖像部分有黑条以构成宽高比。
第二个视频是用户生成的,所以我无法控制它的大小或方向。
更新1:
通过媒体服务预处理Portrait视频,然后拼接生成的文件似乎可以正常工作。但这使它成为一个两步操作。有更快的方法还是解决方案?
更新2: 是的,翻转的是智能手机 XML
<?xml version="1.0" encoding="utf-16"?>
<Preset
Version="4.0">
<Job />
<MediaFile
DeinterlaceMode="AutoPixelAdaptive"
ResizeQuality="Super"
NormalizeAudio="True"
AudioGainLevel="1"
VideoResizeMode="Stretch">
<Sources>
<Source>
</Source>
<Source
MediaFile="%1%">
</Source>
</Sources>
<OutputFormat>
<MP4OutputFormat
StreamCompatibility="Standard">
<AudioProfile Condition="SourceContainsAudio">
<AacAudioProfile
Codec="AAC"
Channels="2"
BitsPerSample="16"
SamplesPerSecond="44100">
<Bitrate>
<ConstantBitrate
Bitrate="128"
IsTwoPass="False"
BufferWindow="00:00:00" />
</Bitrate>
</AacAudioProfile>
</AudioProfile>
<VideoProfile Condition="SourceContainsVideo">
<MainH264VideoProfile
BFrameCount="3"
EntropyMode="Cabac"
RDOptimizationMode="Quality"
HadamardTransform="True"
SubBlockMotionSearchMode="Quality"
MultiReferenceMotionSearchMode="Quality"
ReferenceBFrames="False"
AdaptiveBFrames="True"
SceneChangeDetector="True"
FastIntraDecisions="False"
FastInterDecisions="False"
SubPixelMode="Quarter"
SliceCount="0"
KeyFrameDistance="00:00:05"
InLoopFilter="True"
MEPartitionLevel="EightByEight"
ReferenceFrames="4"
SearchRange="128"
AutoFit="True"
Force16Pixels="False"
FrameRate="0"
SeparateFilesPerStream="True"
SmoothStreaming="False"
NumberOfEncoderThreads="0">
<Streams
AutoSize="False">
<StreamInfo
Size="1280, 720">
<Bitrate>
<ConstantBitrate
Bitrate="4500"
IsTwoPass="False"
BufferWindow="00:00:05" />
</Bitrate>
</StreamInfo>
</Streams>
</MainH264VideoProfile>
</VideoProfile>
</MP4OutputFormat>
</OutputFormat>
</MediaFile>
</Preset>
答案 0 :(得分:0)
请按照以下步骤更新预设:
<?xml version="1.0" encoding="utf-16"?>
<Presets Rotation="Auto">
<Preset
Version="5.0">
...
</Preset>
</Presets>