Hello ffmpeg gurus,

I've written a directshow splitter somehow working based on
libavformat, now I've decided to write a muxer.

So, Directshow gives me some compressed "mediasamples" with a
timestart and timestop in what they call REFERENCE_TIME (1/10000000
second since the beginning of the stream).
Now, I've got that and I need to fill libavformat AVStream structures
and also the AVPacket structure for each mediasample. So, because I'm
lazy I thought I would just hardcode the AVStream.time_base for all my
streams to 1/10000000 and just use the real duration of my packets
(timestop-timestart) for each packet as the AVPacket.duration ... big
mistake :)

Actually it works for audio on the small wav file I produced, but for
video, my windows explorer freezes completly each time I open the
directory containing my produced .avi file ... When I open the
produced file in virtualdub, it tells me my files uses a framerate of
10000000 fps and contains 99.1% overhead =)

So, I looked at the code a bit and I noticed AVStream.duration is not
used at all in the AVI muxer, it's barelly used in the MOV muxer, and
kinda used in the MKV muxer...
Am I doomed to guess a constant framerate from my video stream and set
that as AVStream.time_base ? What about variable framerate ? is that
seriously supported ? cause it seems OK in the MKV muxer but not realy
in the MOV muxer and not at all in the AVI muxer ...

Thx for your time,

Yann.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to