[FFmpeg-devel] NC camera patch
nicolas martin
elvadrias
Thu Jan 15 16:52:07 CET 2009
Le 09-01-14 ? 15:33, Michael Niedermayer a ?crit :
> On Mon, Jan 12, 2009 at 04:56:13PM -0500, nicolas martin wrote:
> [...]
>>>
>>>
>>>
>>> [...]
>>>> +static int nc_read_header(AVFormatContext *s, AVFormatParameters
>>>> *ap)
>>>> +{
>>>> + AVStream *st = av_new_stream(s, 0);
>>>> +
>>>> + if (!st)
>>>> + return AVERROR(ENOMEM);
>>>> +
>>>> + st->codec->codec_type = CODEC_TYPE_VIDEO;
>>>> + st->codec->codec_id = CODEC_ID_MPEG4;
>>>> + st->need_parsing = AVSTREAM_PARSE_FULL;
>>>> +
>>>
>>>> + av_set_pts_info(st, 64, 1, 25);
>>>
>>> is 25 always correct, if there are 30fps files than it is not
>>> correct ...
>>
>> Changed it for
>> av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den);
>>
>> I suppose this is the standard way for MPEG4 streams
>
> no, the timebase or framerate has to be set correctly if it is stored
> in the file
Well, the major problem is that I don't know how to find/estimate it ...
Is it not standardly expressed in some of MPEG-4's header of the video ?
>
>
> [...]
> --
> Michael GnuPG fingerprint:
> 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> I hate to see young programmers poisoned by the kind of thinking
> Ulrich Drepper puts forward since it is simply too narrow -- Roman
> Shaposhnik
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list