OK, so it looks like the packet PTS coming from FFMPEG are in respect
to the time_base numerator. This is different than Quicktime and
Libquicktime, but understandable. It also isn't what's implied in the
docs or in the tutorials, IMHO.
So, for those coming after:
PTS_in_timescaleunits = packet_pts * time_base.num
Bruce
On Oct 13, 2009, at 5:20 PM, Bruce Wheaton wrote:
On Oct 13, 2009, at 3:27 PM, Sean McAllister wrote:
On Tue, Oct 13, 2009 at 3:05 PM, Bruce Wheaton
<[email protected]>wrote:
I'm getting packets back and decoding them just fine, but I'm
confused now
- aren't the time stamps in timescale units? The movie I'm testing
now has a
timescale of 2997, but the packets are coming in as 0, 1, 2, 3,
not 0, 100,
200 etc.
Is there another timescale I need to look at to decode packet times?
I can't really tell if it varies, or I'm just lucky that some
movies do
have a timescale that makes sense, because some are playing.
I know I ran into problems confusing the two time_stamp values that
are
present
There's:
p_format_ctx_->streams[video_stream_]->codec->time_base
and then:
p_format_ctx_->streams[video_stream_]->time_base
The latter is what I use to convert my PTS values, and it seems to
work
fine.
Sounds like a good thing to look at. I'm using:
ffmpeg::AVRational time_base = pFormatCtx->streams[videoStream]-
>time_base;
movieTimeScale = time_base.den;
So that's the same as yours, as far as I can tell. But the packet
PTS is in frame numbers. Maybe the other way around?
Bruce
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user