>
>
> In this case, I need the two options "reset_timestamps" and "segment_time".
>

reset_timestamps is the option that you have to implement by yourself.
Simply subtract the value of the first
packet DTS /PTS per each stream and you will effectively reset timestamps
to zero.

segment_time is HLS option, and if you want to set these options on the
output file use this code:

avformat_alloc_output_context2(&ofmt_ctx, NULL, "hls", "output.m3u8");
AVDictionary* headerOptions = NULL;

av_dict_set(&headerOptions, "hls_segment_type", "fmp4", 0);
av_dict_set(&headerOptions, "hls_playlist_type", "event", 0);
av_dict_set(&headerOptions, "hls_flags", "append_list", 0);
av_dict_set_int(&headerOptions, "hls_list_size", hls_list_size, 0);
av_dict_set(&headerOptions, "segment_time_delta",
to_string(hls_segment_time_delta), 0);
av_dict_set(&headerOptions, "hls_time", to_string(hls_segment_duration), 0);
av_dict_set(&headerOptions, "hls_fmp4_init_filename", init_segment_name, 0);

avformat_write_header(oc->ofmt_ctx, &headerOptions);
-- 

Regards
Strahinja Radman
_______________________________________________
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".

Reply via email to