DirectShow audio and video synchronization experiment report (3)

xiaoxiao2021-03-06  52

Mixed audio video stream

?

Note: Since the video stream does not affect the flow time of Filter Graph, the playback of the video stream will not affect the playback of the audio stream. This section mainly discusses the influence of audio stream playback on video stream playback.

?

Filter Graph is shown in Figure 4:

?

Figure 4 Filter graph of mixed audio and video stream

?

1. • Filter Graph does not use a reference clock

?

Phenomenon: Normal audio, continuous play, video quick lens play. The audio and video are not synchronous!

?

2. • Filter graph uses the reference clock

?

2.1 Audio Sample Don't call the timestamp

Audio Sample does not call the timestamp, the audio stream does not affect the flow time of the filter graph. Regardless of the Audio Renderer or the system clock, audio and video can be synchronized and played continuously.

?

2.2 AUDIO SAMPLE normal timing

(1) AUDIO RENDERER as a reference clock

Phenomenon: Synchronization of audio and video, playing continuously.

(2) System clock as a reference clock

Phenomenon: Synchronization of audio and video, playing continuously.

?

2.3 Audio Sample Timestamp (Time to reset it last, timestamp from 0), send out

(1) AUDIO RENDERER as a reference clock

Phenomenon: AUDIO SAMPLE Timestamp Reset After the video is not synchronized. Since the Audio Sample Time Stamp reset is not left, the video playback stops (the timestamp of Video Sample is blocked due to advance flow time), but the audio is still playing normally. Therefore, the audio and video are not synchronized.

(2) System clock as a reference clock

Phenomenon: Video can be played continuously without interference. Audio has some data after the timestamp reset (timestamp is smaller than flow time data) is discarded, so there is a hop in playback.

?

2.4 AUDIO SAMPLE Timestamp (Time Stamp randomly sequence), send out

(1) AUDIO RENDERER as a reference clock

Phenomenon: Audio is playing continuously. Since the timestamp of AUDIO SAMPLE will affect the flow time of Filter Graph, the video playback sometimes a fast lens, sometimes stopping. The final audio video is not synchronized.

(2) System clock as a reference clock

Phenomenon: Video continuous play, audio playback is not continuous. Since Filter Graph's flow time is run independently, the video can play continuously. The audio data SAMPLE time stamp is smaller than the flow time will be discarded, which is greater than the flow time will be blocked, so the total playback effect is intermittent.

?

2.5 AUDIO SAMPLE (continuous) timestamp, gap delivery (analog network blocking conditions)

(1) AUDIO RENDERER as a reference clock

Phenomenon: The audio and video cannot be played continuously. Because when the audio is not available, the flow time of Filter Graph is not going, causing the video to stop playing (Video Sample is blocked due to advance flow time); until the audio has data, the flow time continues to move, Video also resumes playback. The audio data cannot be played continuously, but the audio data is not lost.

(2) System clock as a reference clock

Phenomenon: Video continuous play, audio disconnection, and some audio data is skipped without playing. Since Filter Graph's flow time is run independently, the video can play continuously. The audio data SAMPLE time stamp is smaller than the flow time will be discarded.

?

转载请注明原文地址:https://www.9cbs.com/read-117463.html

New Post(0)