# avconcat报错mismatched sar of videos的解决方法 (/faq/dora/av-processing/3972-the-solution-to-the-avconcat-error-mismatched-sar-of-videos)



最近更新时间: 2021-07-21 15:11:11

# 问题原因 [#问题原因]

出现该错误的原因是要进行拼接的视频SAR不匹配，即`url?avinfo`信息中的`sample_aspect_ratio`不一致。

# 解决方式 [#解决方式]

通过`avthumb`[接口](/products/dora/audio-and-video-processing-api/3-audio-and-video-transcoding-avthumb)中的`aspect`字段转码下，将SAR转为一致即可，其中`aspect`字段控制的是DAR，即`url?avinfo`信息中的`display_aspect_ratio`参数。

如图所示的两个视频进行拼接就会出现上述错误，将视频一通过`avthumb/mp4/aspect/16:9`命令，将`display_aspect_ratio`转为16：9，则`sample_aspect_ratio`为1:1，此时再进行拼接，即可拼接成功。

![](/docs-assets/faq/dora/av-processing/3972-the-solution-to-the-avconcat-error-mismatched-sar-of-videos/FocwQRaXWpj3_5e0ZllwoLUTdHqZ-d0b76597576d.webp)

![](/docs-assets/faq/dora/av-processing/3972-the-solution-to-the-avconcat-error-mismatched-sar-of-videos/FsBINCEKAFUUaHSYPMC_go6oA_39-d1f421cbe61e.webp)

注：SAR \* PAR = DAR

* SAR —— Sample Aspect Ratio
* PAR —— Pixel Aspect Ratio
* DAR —— Display Aspect Ratio
