Patrice MANDIN
2007-Oct-22 00:34 UTC
[theora-dev] [PATCH][RFC] Adapt Theora frame rate to DirectShow clock
Hello, Here are my patches to adapt the Theora frame rate of the encoded stream to the DirectShow clock. Theora has a fixed frame rate for a video stream, contrary to a DirectShow stream. When Theora do not know the frame rate of a video device, it defaults to 30 fps, and the resulting stream playbacks too fast or too slow depending on the video device frame rate. For example, a DV cam (PAL, 25 fps) stream is playback too fast. The first patch adds a function in the DS abstract lib, to send the DS frame time start and end to the filter. The second patch is the one related to the Theora encoder, which skips frames if the Theora encoder generates too many frames, and adds frames if they are not enough. Currently it is disabled in the patch, with the #define ADAPT_FRAME_RATE 1. I ask for a RFC, because there may be a better way to check for the Theora time, and/or DS time. -------------- next part -------------- A non-text attachment was scrubbed... Name: 0-libDirectshowAbstracts.diff Type: application/octet-stream Size: 1705 bytes Desc: not available Url : http://lists.xiph.org/pipermail/theora-dev/attachments/20071022/eae860e9/0-libDirectshowAbstracts.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: 1-dsfTheoraEncoder.diff Type: application/octet-stream Size: 4553 bytes Desc: not available Url : http://lists.xiph.org/pipermail/theora-dev/attachments/20071022/eae860e9/1-dsfTheoraEncoder.obj
Patrice MANDIN
2007-Oct-22 08:02 UTC
[theora-dev] [PATCH][RFC] Adapt Theora frame rate to DirectShow clock
Hello again, Here is a simpler patch for dsfTheoraEncoder. Sorry I did not cleanup the first patch before sending it there. -------------- next part -------------- A non-text attachment was scrubbed... Name: 2-dsfTheoraEncoder.diff Type: application/octet-stream Size: 4152 bytes Desc: not available Url : http://lists.xiph.org/pipermail/theora-dev/attachments/20071022/867ae1af/2-dsfTheoraEncoder.obj