> Due to what I can imagine, there are 2 possible ways to broadcast a video
> file.
>
> 1) Read over the video file at the very beginning (something like a video
> loading) and obtain two full data streams, namely audio stream and video
> stream. And then simultaneously start broadcasting the audio stream as a
> MIDI and start broadcasting the video stream at a specific frequency (say,
> 30 frames per second). But there seems to be a synchronization problem here.
>
> 2) A video file is normally interleaved by one frame of audio stream and one
> frame of video stream, one after another.... For each frame ( no matter it's
> an audio stream or a video stream), there is a time stamp. It seems no
> matter what types of the video files are, the frames (both audio and video
> together) are interleaved sequentially according to the time stamp sequence.
> So, it might be possible to broadcast according to time sequence. However,
> this will bring me another problem: that is: if this frame is a video frame,
> during this short period of time (if 30 frames per second, 1 frame takes
> 1/30=0.033333 second ), there will be no sound to be broadcasted, which
> makes the audio broadcasting uncontinuous, right????
read both audio and video in a buffer, say 1 sec, then you are able to
process audio and video simultaneously, or that quick after another that
no one will be able to see or hear that there is a gap. If there is a
picture shown to you for 0.033333 second you won't be able to tell what
you've seen.
沒有留言:
張貼留言