This invention discloses an
algorithm and
system for audio and virtual scene synchronization
adaptation in
digital broadcasting, belonging to the field of virtual
digital broadcasting technology. The method includes acquiring video
stream data and audio
stream data, identifying camera switching frames, and determining the switching type; acquiring the rendering load data of the current virtual scene to calculate the load coefficient, predicting the
delay duration of the camera switching
frame based on the switching type, and calculating the compensation time of the audio
stream data by using the predicted
delay duration and load coefficient; acquiring the historical coordinate data and current action characteristics of the virtual character, determining whether the coordinates are lagging or actually displaced, and adjusting the spatial distance
attenuation coefficient of the audio
stream data based on the determination result; acquiring the camera's
pitch angle change data and adjusting the
sound image height offset of the audio
stream data; and using the compensation time, spatial distance
attenuation coefficient, and
sound image height offset as setting parameters for the audio
stream data. This invention ensures audiovisual synchronization through adjustments in three directions: time, spatial distance, and
sound image height.