[Ffmpeg-devel] Queing issues in writing a player
Sun Sep 10 19:52:08 CEST 2006
I'm trying to write my own player using FFMPEG.
Simplified summary of my design:
1) Read Packets
2) Decode Packets
3) If decoded a video frame put it in the video FIFO with its PTS
4) If decoded an audio frame put it in the audio FIFO with its PTS
1) Read Audio & Video samples
2) Render them as per their PTS
FFMPEG does not fill the PTS field on the decoded frames.
FFMPEG does fill the PTS field in the packet structure and this should be the same as the frame PTS iff I've just decoded an I-Frame. For other frames, I just add frame duration.
According to the PTS values, the PTS of the audio and video can be seperated by more than 500 milli. That means I could end up processing and buffering 500 milli of video before I get to the audio I need. That would mean lots of FIFO memory and the CPU would be working on future video when it should be working on current audio.
I'm beginning to think that my 1-PASS design can't work and that I need to process the packets separetely for audio and video.
All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.
More information about the ffmpeg-devel