86 "flv only supports wideband (16kHz) Speex audio\n");
114 "flv does not support that sample rate, " 115 "choose from (44100, 22050, 11025).\n");
166 size_t len = strlen(str);
176 avio_w8(pb, (ts >> 24) & 0x7F);
200 int metadata_count = 0;
201 int64_t metadata_size_pos, data_size, metadata_count_pos;
290 data_size =
avio_tell(pb) - metadata_size_pos - 10;
292 avio_seek(pb, metadata_count_pos, SEEK_SET);
295 avio_seek(pb, metadata_size_pos, SEEK_SET);
306 "%s codec %s not compatible with flv\n",
308 desc ? desc->
name :
"unknown");
330 "at most one video stream is supported in flv\n");
340 "at most one audio stream is supported in flv\n");
408 avio_seek(pb, -data_size - 10, SEEK_CUR);
460 int flags = 0, flags_size;
475 "Packets are not in the proper order with respect to DTS\n");
520 "8 frames per packet. Adobe Flash " 521 "Player cannot handle this!\n");
528 avio_w8(pb, (ts >> 24) & 0x7F);
533 int64_t metadata_size_pos =
avio_tell(pb);
547 data_size =
avio_tell(pb) - metadata_size_pos;
548 avio_seek(pb, metadata_size_pos - 10, SEEK_SET);
550 avio_seek(pb, data_size + 10 - 3, SEEK_CUR);
582 .mime_type =
"video/x-flv",
void avio_wb64(AVIOContext *s, uint64_t val)
#define CONFIG_LIBMP3LAME
int64_t delay
first dts delay (needed for AVC & Speex)
#define AV_LOG_WARNING
Something somehow does not look correct.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (%s)\, 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)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
static av_always_inline uint64_t av_double2int(double f)
Reinterpret a double as a 64-bit integer.
int event_flags
Flags for the user to detect events happening on the file.
This struct describes the properties of an encoded stream.
Opaque data information usually continuous.
AVCodecParameters * video_par
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
void avio_write_marker(AVIOContext *s, int64_t time, enum AVIODataMarkerType type)
Mark the written bytestream as a specific type.
AVStream ** streams
A list of all streams in the file.
A point in the output bytestream where a demuxer can start parsing (for non self synchronizing bytest...
static double av_q2d(AVRational a)
Convert rational to double.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
AVCodecParameters * audio_par
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVDictionary * metadata
Metadata that applies to the whole file.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
preferred ID for decoding MPEG audio layer 1, 2 or 3
enum AVMediaType codec_type
General type of the encoded data.
AVRational avg_frame_rate
Average framerate.
int ff_avc_parse_nal_units_buf(const uint8_t *buf_in, uint8_t **buf, int *size)
int flags
A combination of AV_PKT_FLAG values.
const AVCodecDescriptor * avcodec_descriptor_get(enum AVCodecID id)
int extradata_size
Size of the extradata content in bytes.
int bit_rate
The average bitrate of the encoded data (in bits per second).
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
#define AV_TIME_BASE
Internal time base represented as integer.
void avio_wb24(AVIOContext *s, unsigned int val)
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
AVIOContext * pb
I/O context.
void avio_w8(AVIOContext *s, int b)
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost)
AVCodecParameters * data_par
const char * name
Name of the codec described by this descriptor.
int error
contains the error code or 0 if no error happened
This struct describes the properties of a single codec described by an AVCodecID. ...
void avio_wb16(AVIOContext *s, unsigned int val)
int sample_rate
Audio only.
A point in the output bytestream where a decoder can start decoding (i.e.
void * priv_data
Format private data.
static void write_header(FFV1Context *f)
int bits_per_coded_sample
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
void avio_wb32(AVIOContext *s, unsigned int val)
int64_t duration
Duration of the stream, in AV_TIME_BASE fractional seconds.
#define AV_DICT_IGNORE_SUFFIX
AVCodecParameters * codecpar
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
This structure stores compressed data.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
int64_t last_ts
last timestamp for each stream
int ff_isom_write_avcc(AVIOContext *pb, const uint8_t *data, int len)
#define AV_NOPTS_VALUE
Undefined timestamp value.