简体   繁体   中英

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. The video has a frame rate of 10fps and is encoded using the avc1 (H264) codec. The audio always starts with around half a second of silence and is encoded with the mp4a (MPEG-4 AAC-LC) codec. 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. 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. 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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