El 31/07/18 a las 04:16, ganesh mundhe escribió:

Hello all,

I have been trying to decode videos where I need to offset start position.

I have tried to use AV_seek_frame but it works on raw video format (.y4m) but fails on mpeg2 compressed formats.

Generally videos are in mp4 or wmv and I need to write for those directly instead of converting them into .y4m

Here how I’m using it

intfrmaeno = 100;

int64_tpoint = (int64_t(frameno) * pavStream->r_frame_rate.den * pavStream->time_base.den) / (int64_t(pavStream->r_frame_rate.num) *pavStream->time_base.num);

av_seek_frame(fmt_ctx, VideoStreamIndex, point, 0);


Here point is always 0 as you are dividing integers.   Also, as a flag, you may want to use AVSEEK_FLAG_BACKWARD.

--
Gonzalo Garramuño

_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to