Alex,
Thanks for your reply.
I’m still puzzled how to do this.
I’ve just tried to do this in the get_video_frame of muxing.c example
ost->frame->pkt_dts = av_rescale_q(timestamp, AVRational{1, 1000},
ost->st->time_base);
ost->frame->pts = ost->frame->pkt_dts;
But the program crashes even more quickly:
[mp4 @ 0x7fc9a6242600] pts (817920) < dts (841472) in stream 0
There is another place in the muxing.c example that uses a rescale function,
av_packet_rescale_ts actually, on the write_frame function. But this function
is used for both video and audio frames writing. Since the problem with frame
producing is only for video, I would say that the rescale must be on the video
side only, so it kind makes sense doing this adjustment on the get_video_frame
function.
Any tips?
Thanks!
Regards,
Nuno
> On 2 Sep 2021, at 22:06, Alexandr Kasyan <[email protected]> wrote:
>
> Nuno,
>
> I was too wordy. Assign dts, make dts = pts, they come together in the case.
> Is it getting better or do you still need a better way to calculate pts?
>
> Regards, Alex
> _______________________________________________
> Libav-user mailing list
> [email protected]
> https://ffmpeg.org/mailman/listinfo/libav-user
>
> To unsubscribe, visit link above, or email
> [email protected] with subject "unsubscribe".
_______________________________________________
Libav-user mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/libav-user
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".