FFmpeg
|
mpegtsenc.c
Go to the documentation of this file.
96 offsetof(MpegTSWrite, transport_stream_id), AV_OPT_TYPE_INT, {.i64 = 0x0001 }, 0x0001, 0xffff, AV_OPT_FLAG_ENCODING_PARAM},
98 offsetof(MpegTSWrite, original_network_id), AV_OPT_TYPE_INT, {.i64 = 0x0001 }, 0x0001, 0xffff, AV_OPT_FLAG_ENCODING_PARAM},
100 offsetof(MpegTSWrite, service_id), AV_OPT_TYPE_INT, {.i64 = 0x0001 }, 0x0001, 0xffff, AV_OPT_FLAG_ENCODING_PARAM},
102 offsetof(MpegTSWrite, pmt_start_pid), AV_OPT_TYPE_INT, {.i64 = 0x1000 }, 0x0010, 0x1f00, AV_OPT_FLAG_ENCODING_PARAM},
104 offsetof(MpegTSWrite, start_pid), AV_OPT_TYPE_INT, {.i64 = 0x0100 }, 0x0100, 0x0f00, AV_OPT_FLAG_ENCODING_PARAM},
108 { "muxrate", NULL, offsetof(MpegTSWrite, mux_rate), AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
110 offsetof(MpegTSWrite, pes_payload_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT_PES_PAYLOAD_SIZE}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
111 { "mpegts_flags", "MPEG-TS muxing flags", offsetof(MpegTSWrite, flags), AV_OPT_TYPE_FLAGS, {.i64 = 0}, 0, INT_MAX,
121 offsetof(MpegTSWrite, reemit_pat_pmt), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
303 stream_type = (ts->flags & MPEGTS_FLAG_AAC_LATM) ? STREAM_TYPE_AUDIO_AAC_LATM : STREAM_TYPE_AUDIO_AAC;
543 ts->pat.cc = 15; // Initialize at 15 so that it wraps and be equal to 0 for the first packet we write
614 ts_st->amux->oformat = av_guess_format((ts->flags & MPEGTS_FLAG_AAC_LATM) ? "latm" : "adts", NULL, NULL);
1069 av_log(s, AV_LOG_WARNING, "resend_headers option is deprecated, use -mpegts_flags resend_headers\n");
static void retransmit_si_info(AVFormatContext *s, int force_pat)
Definition: mpegtsenc.c:715
Definition: avio.h:68
Definition: dict.h:80
uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length)
Definition: crc.c:275
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
Definition: aviobuf.c:988
int avformat_write_header(AVFormatContext *s, AVDictionary **options)
Definition: mux.c:383
void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits, unsigned int pts_num, unsigned int pts_den)
Definition: libavformat/utils.c:3952
Definition: opt.h:222
title('Sinusoid at 1/4 the Spampling Rate')
Definition: libavcodec/avcodec.h:115
av_dlog(ac->avr,"%d samples - audio_convert: %s to %s (%s)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic?ac->func_descr_generic:ac->func_descr)
AVDictionaryEntry * av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Definition: dict.c:39
Definition: libavcodec/avcodec.h:130
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
Definition: libavcodec/options.c:182
Definition: opt.h:221
Definition: avformat.h:944
Definition: opt.h:229
Definition: ffprobe.c:78
Definition: libavcodec/avcodec.h:219
Definition: libavcodec/avcodec.h:383
trying all byte sequences megabyte in length and selecting the best looking sequence will yield cases to try But first
Definition: rate_distortion.txt:12
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Definition: libavformat/utils.c:3362
Definition: mpegtsenc.c:228
AVFormatContext * avformat_alloc_context(void)
Definition: libavformat/options.c:106
static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: mpegtsenc.c:1220
Definition: libavcodec/avcodec.h:325
static void mpegts_insert_null_packet(AVFormatContext *s)
Definition: mpegtsenc.c:748
struct MpegTSService MpegTSService
int av_match_ext(const char *filename, const char *extensions)
Definition: libavformat/utils.c:143
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
Definition: aviobuf.c:173
Definition: mpegtsenc.c:41
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:281
const uint8_t * avpriv_find_start_code(const uint8_t *p, const uint8_t *end, uint32_t *state)
Definition: libavcodec/avcodec.h:103
static void mpegts_prefix_m2ts_header(AVFormatContext *s)
Definition: mpegtsenc.c:490
static int mpegts_write_section1(MpegTSSection *s, int tid, int id, int version, int sec_num, int last_sec_num, uint8_t *buf, int len)
Definition: mpegtsenc.c:190
preferred ID for decoding MPEG audio layer 1, 2 or 3
Definition: libavcodec/avcodec.h:382
Definition: avutil.h:144
static void mpegts_insert_pcr_only(AVFormatContext *s, AVStream *st)
Definition: mpegtsenc.c:764
Definition: mpegtsenc.c:48
static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt)
Definition: mpegtsenc.c:1057
AVOutputFormat * av_guess_format(const char *short_name, const char *filename, const char *mime_type)
Definition: libavformat/utils.c:188
static void mpegts_write_pes(AVFormatContext *s, AVStream *st, const uint8_t *payload, int payload_size, int64_t pts, int64_t dts, int key)
Definition: mpegtsenc.c:841
void(* write_packet)(struct MpegTSSection *s, const uint8_t *packet)
Definition: mpegtsenc.c:44
Definition: avformat.h:643
Definition: libavcodec/avcodec.h:384
Definition: crc.h:34
Definition: libavcodec/avcodec.h:422
void avformat_free_context(AVFormatContext *s)
Definition: libavformat/utils.c:3291
Definition: libavcodec/avcodec.h:381
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later.That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another.Buffer references ownership and permissions
static void section_write_packet(MpegTSSection *s, const uint8_t *packet)
Definition: mpegtsenc.c:502
Definition: libavcodec/avcodec.h:431
Definition: libavcodec/avcodec.h:190
Definition: mpegtsenc.c:58
struct MpegTSWriteStream MpegTSWriteStream
Definition: avformat.h:377
struct MpegTSWrite MpegTSWrite
static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
Definition: mpegtsenc.c:259
Definition: avutil.h:143
struct MpegTSSection MpegTSSection
Definition: avutil.h:146
Definition: libavcodec/avcodec.h:1028
static void mpegts_write_section(MpegTSSection *s, uint8_t *buf, int len)
Definition: mpegtsenc.c:135
static MpegTSService * mpegts_add_service(MpegTSWrite *ts, int sid, const char *provider_name, const char *name)
Definition: mpegtsenc.c:465
Generated on Tue Sep 2 2025 06:55:57 for FFmpeg by
