简体   繁体   English

上传到在线服务后从H264转换为H264会导致音频/视频同步问题

[英]Transcoding from H264 to H264 after upload to an online service results in audio/video sync issues

Our application generates a MOV file which contains a series of static images, each of which has a duration in the video of around half a second. 我们的应用程序生成一个MOV文件,其中包含一系列静态图像,每个静态图像在视频中的持续时间约为半秒。 The video has a frame rate of 10fps and is encoded using the avc1 (H264) codec. 视频的帧速率为10fps,并使用avc1(H264)编解码器进行编码。 The audio always starts with around half a second of silence and is encoded with the mp4a (MPEG-4 AAC-LC) codec. 音频始终以大约半秒的静音开始,并使用mp4a(MPEG-4 AAC-LC)编解码器进行编码。 After upload to the online service a transcode to H264 occurs (presumably with different settings) and the audio appears to be half a second ahead of the video, ie. 上传到在线服务后,会发生H264的转码(可能具有不同的设置),并且音频似乎比视频提前了半秒,即。 it appears the silence at the start has been trimmed from the audio but not the video. 似乎开始时的静音已从音频(而不是视频)中删除。 This also occurs with WMV files we generate. 我们生成的WMV文件也会发生这种情况。 Any ideas as to issues we might have with our source video or something that might occur in the transcode which would cause this? 关于我们的源视频可能存在的问题或在转码中可能会导致此问题的任何想法?

I cannot definitely answer this - because i don't quite know what Facebook does it. 我绝对不能回答这个问题-因为我不太了解Facebook是做什么的。

There can be however, two possibility: 但是,可能有两种可能性:

  1. the padded audio might just have discontinuity of time stamp. 填充的音频可能只是时间戳不连续。 ie The stream may start with some timestamp (in silence) and later when real audio starts- the time stamp differs. 也就是说,流可能会以某个时间戳记(无声)开始,然后在实际音频开始时-时间戳有所不同。 Hence the transcoder could be smart enough to throw this portion away. 因此,转码器可能足够聪明,可以将这部分扔掉。

  2. the other possibility is that when you are adding silence you are not adding time stamp at all till some point. 另一种可能性是,当您添加静音时,直到某个时候您都不会添加时间戳。 The transcoder could just be dropping the audio frames till it sees the first valid timestamp that makes sense. 转码器可能只是丢弃音频帧,直到看到有意义的第一个有效时间戳为止。 This is also the case with many real time transcoders/decoders who expect to receive data from a live stream. 对于许多希望从实时流中接收数据的实时代码转换器/解码器来说,情况也是如此。

Elaborate more on this line to get more accurate answer. 在这条线上详细说明,以获得更准确的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM