FFmpeg
rawenc.c
Go to the documentation of this file.
1 /*
2  * RAW muxers
3  * Copyright (c) 2001 Fabrice Bellard
4  * Copyright (c) 2005 Alex Beregszaszi
5  *
6  * This file is part of FFmpeg.
7  *
8  * FFmpeg is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * FFmpeg is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with FFmpeg; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #include "libavutil/intreadwrite.h"
24 
25 #include "avformat.h"
26 #include "rawenc.h"
27 #include "internal.h"
28 
30 {
31  avio_write(s->pb, pkt->data, pkt->size);
32  return 0;
33 }
34 
36 {
37  if (s->nb_streams != 1) {
38  av_log(s, AV_LOG_ERROR, "%s files have exactly one stream\n",
39  s->oformat->name);
40  return AVERROR(EINVAL);
41  }
42  if ( s->oformat->audio_codec != AV_CODEC_ID_NONE
43  && s->streams[0]->codecpar->codec_type != AVMEDIA_TYPE_AUDIO) {
44  av_log(s, AV_LOG_ERROR, "%s files have exactly one audio stream\n",
45  s->oformat->name);
46  return AVERROR(EINVAL);
47  }
48  if ( s->oformat->video_codec != AV_CODEC_ID_NONE
49  && s->streams[0]->codecpar->codec_type != AVMEDIA_TYPE_VIDEO) {
50  av_log(s, AV_LOG_ERROR, "%s files have exactly one video stream\n",
51  s->oformat->name);
52  return AVERROR(EINVAL);
53  }
54  return 0;
55 }
56 
57 /* Note: Do not forget to add new entries to the Makefile as well. */
58 
59 #if CONFIG_AC3_MUXER
61  .name = "ac3",
62  .long_name = NULL_IF_CONFIG_SMALL("raw AC-3"),
63  .mime_type = "audio/x-ac3",
64  .extensions = "ac3",
65  .audio_codec = AV_CODEC_ID_AC3,
66  .video_codec = AV_CODEC_ID_NONE,
67  .init = force_one_stream,
68  .write_packet = ff_raw_write_packet,
69  .flags = AVFMT_NOTIMESTAMPS,
70 };
71 #endif
72 
73 #if CONFIG_ADX_MUXER
74 
75 static int adx_write_trailer(AVFormatContext *s)
76 {
77  AVIOContext *pb = s->pb;
78  AVCodecParameters *par = s->streams[0]->codecpar;
79 
80  if (pb->seekable & AVIO_SEEKABLE_NORMAL) {
81  int64_t file_size = avio_tell(pb);
82  uint64_t sample_count = (file_size - 36) / par->channels / 18 * 32;
83  if (sample_count <= UINT32_MAX) {
84  avio_seek(pb, 12, SEEK_SET);
85  avio_wb32(pb, sample_count);
86  avio_seek(pb, file_size, SEEK_SET);
87  }
88  }
89 
90  return 0;
91 }
92 
94  .name = "adx",
95  .long_name = NULL_IF_CONFIG_SMALL("CRI ADX"),
96  .extensions = "adx",
97  .audio_codec = AV_CODEC_ID_ADPCM_ADX,
98  .video_codec = AV_CODEC_ID_NONE,
99  .init = force_one_stream,
100  .write_packet = ff_raw_write_packet,
101  .write_trailer = adx_write_trailer,
102  .flags = AVFMT_NOTIMESTAMPS,
103 };
104 #endif
105 
106 #if CONFIG_APTX_MUXER
108  .name = "aptx",
109  .long_name = NULL_IF_CONFIG_SMALL("raw aptX (Audio Processing Technology for Bluetooth)"),
110  .extensions = "aptx",
111  .audio_codec = AV_CODEC_ID_APTX,
112  .video_codec = AV_CODEC_ID_NONE,
113  .init = force_one_stream,
114  .write_packet = ff_raw_write_packet,
115  .flags = AVFMT_NOTIMESTAMPS,
116 };
117 #endif
118 
119 #if CONFIG_APTX_HD_MUXER
121  .name = "aptx_hd",
122  .long_name = NULL_IF_CONFIG_SMALL("raw aptX HD (Audio Processing Technology for Bluetooth)"),
123  .extensions = "aptxhd",
124  .audio_codec = AV_CODEC_ID_APTX_HD,
125  .video_codec = AV_CODEC_ID_NONE,
126  .init = force_one_stream,
127  .write_packet = ff_raw_write_packet,
128  .flags = AVFMT_NOTIMESTAMPS,
129 };
130 #endif
131 
132 #if CONFIG_AVS2_MUXER
134  .name = "avs2",
135  .long_name = NULL_IF_CONFIG_SMALL("raw AVS2-P2/IEEE1857.4 video"),
136  .extensions = "avs,avs2",
137  .audio_codec = AV_CODEC_ID_NONE,
138  .video_codec = AV_CODEC_ID_AVS2,
139  .init = force_one_stream,
140  .write_packet = ff_raw_write_packet,
141  .flags = AVFMT_NOTIMESTAMPS,
142 };
143 #endif
144 
145 #if CONFIG_AVS3_MUXER
147  .name = "avs3",
148  .long_name = NULL_IF_CONFIG_SMALL("AVS3-P2/IEEE1857.10"),
149  .extensions = "avs3",
150  .audio_codec = AV_CODEC_ID_NONE,
151  .video_codec = AV_CODEC_ID_AVS3,
152  .init = force_one_stream,
153  .write_packet = ff_raw_write_packet,
154  .flags = AVFMT_NOTIMESTAMPS,
155 };
156 #endif
157 
158 
159 #if CONFIG_CAVSVIDEO_MUXER
161  .name = "cavsvideo",
162  .long_name = NULL_IF_CONFIG_SMALL("raw Chinese AVS (Audio Video Standard) video"),
163  .extensions = "cavs",
164  .audio_codec = AV_CODEC_ID_NONE,
165  .video_codec = AV_CODEC_ID_CAVS,
166  .init = force_one_stream,
167  .write_packet = ff_raw_write_packet,
168  .flags = AVFMT_NOTIMESTAMPS,
169 };
170 #endif
171 
172 #if CONFIG_CODEC2RAW_MUXER
174  .name = "codec2raw",
175  .long_name = NULL_IF_CONFIG_SMALL("raw codec2 muxer"),
176  .audio_codec = AV_CODEC_ID_CODEC2,
177  .video_codec = AV_CODEC_ID_NONE,
178  .init = force_one_stream,
179  .write_packet = ff_raw_write_packet,
180  .flags = AVFMT_NOTIMESTAMPS,
181 };
182 #endif
183 
184 
185 #if CONFIG_DATA_MUXER
187  .name = "data",
188  .long_name = NULL_IF_CONFIG_SMALL("raw data"),
189  .init = force_one_stream,
190  .write_packet = ff_raw_write_packet,
191  .flags = AVFMT_NOTIMESTAMPS,
192 };
193 #endif
194 
195 #if CONFIG_DIRAC_MUXER
197  .name = "dirac",
198  .long_name = NULL_IF_CONFIG_SMALL("raw Dirac"),
199  .extensions = "drc,vc2",
200  .audio_codec = AV_CODEC_ID_NONE,
201  .video_codec = AV_CODEC_ID_DIRAC,
202  .init = force_one_stream,
203  .write_packet = ff_raw_write_packet,
204  .flags = AVFMT_NOTIMESTAMPS,
205 };
206 #endif
207 
208 #if CONFIG_DNXHD_MUXER
210  .name = "dnxhd",
211  .long_name = NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
212  .extensions = "dnxhd,dnxhr",
213  .audio_codec = AV_CODEC_ID_NONE,
214  .video_codec = AV_CODEC_ID_DNXHD,
215  .init = force_one_stream,
216  .write_packet = ff_raw_write_packet,
217  .flags = AVFMT_NOTIMESTAMPS,
218 };
219 #endif
220 
221 #if CONFIG_DTS_MUXER
223  .name = "dts",
224  .long_name = NULL_IF_CONFIG_SMALL("raw DTS"),
225  .mime_type = "audio/x-dca",
226  .extensions = "dts",
227  .audio_codec = AV_CODEC_ID_DTS,
228  .video_codec = AV_CODEC_ID_NONE,
229  .init = force_one_stream,
230  .write_packet = ff_raw_write_packet,
231  .flags = AVFMT_NOTIMESTAMPS,
232 };
233 #endif
234 
235 #if CONFIG_EAC3_MUXER
237  .name = "eac3",
238  .long_name = NULL_IF_CONFIG_SMALL("raw E-AC-3"),
239  .mime_type = "audio/x-eac3",
240  .extensions = "eac3",
241  .audio_codec = AV_CODEC_ID_EAC3,
242  .video_codec = AV_CODEC_ID_NONE,
243  .init = force_one_stream,
244  .write_packet = ff_raw_write_packet,
245  .flags = AVFMT_NOTIMESTAMPS,
246 };
247 #endif
248 
249 #if CONFIG_G722_MUXER
251  .name = "g722",
252  .long_name = NULL_IF_CONFIG_SMALL("raw G.722"),
253  .mime_type = "audio/G722",
254  .extensions = "g722",
255  .audio_codec = AV_CODEC_ID_ADPCM_G722,
256  .video_codec = AV_CODEC_ID_NONE,
257  .init = force_one_stream,
258  .write_packet = ff_raw_write_packet,
259  .flags = AVFMT_NOTIMESTAMPS,
260 };
261 #endif
262 
263 #if CONFIG_G723_1_MUXER
265  .name = "g723_1",
266  .long_name = NULL_IF_CONFIG_SMALL("raw G.723.1"),
267  .mime_type = "audio/g723",
268  .extensions = "tco,rco",
269  .audio_codec = AV_CODEC_ID_G723_1,
270  .video_codec = AV_CODEC_ID_NONE,
271  .init = force_one_stream,
272  .write_packet = ff_raw_write_packet,
273  .flags = AVFMT_NOTIMESTAMPS,
274 };
275 #endif
276 
277 #if CONFIG_G726_MUXER
279  .name = "g726",
280  .long_name = NULL_IF_CONFIG_SMALL("raw big-endian G.726 (\"left-justified\")"),
281  .audio_codec = AV_CODEC_ID_ADPCM_G726,
282  .video_codec = AV_CODEC_ID_NONE,
283  .init = force_one_stream,
284  .write_packet = ff_raw_write_packet,
285  .flags = AVFMT_NOTIMESTAMPS,
286 };
287 #endif
288 
289 #if CONFIG_G726LE_MUXER
291  .name = "g726le",
292  .long_name = NULL_IF_CONFIG_SMALL("raw little-endian G.726 (\"right-justified\")"),
293  .audio_codec = AV_CODEC_ID_ADPCM_G726LE,
294  .video_codec = AV_CODEC_ID_NONE,
295  .init = force_one_stream,
296  .write_packet = ff_raw_write_packet,
297  .flags = AVFMT_NOTIMESTAMPS,
298 };
299 #endif
300 
301 #if CONFIG_GSM_MUXER
303  .name = "gsm",
304  .long_name = NULL_IF_CONFIG_SMALL("raw GSM"),
305  .mime_type = "audio/x-gsm",
306  .extensions = "gsm",
307  .audio_codec = AV_CODEC_ID_GSM,
308  .video_codec = AV_CODEC_ID_NONE,
309  .init = force_one_stream,
310  .write_packet = ff_raw_write_packet,
311  .flags = AVFMT_NOTIMESTAMPS,
312 };
313 #endif
314 
315 #if CONFIG_H261_MUXER
317  .name = "h261",
318  .long_name = NULL_IF_CONFIG_SMALL("raw H.261"),
319  .mime_type = "video/x-h261",
320  .extensions = "h261",
321  .audio_codec = AV_CODEC_ID_NONE,
322  .video_codec = AV_CODEC_ID_H261,
323  .init = force_one_stream,
324  .write_packet = ff_raw_write_packet,
325  .flags = AVFMT_NOTIMESTAMPS,
326 };
327 #endif
328 
329 #if CONFIG_H263_MUXER
331  .name = "h263",
332  .long_name = NULL_IF_CONFIG_SMALL("raw H.263"),
333  .mime_type = "video/x-h263",
334  .extensions = "h263",
335  .audio_codec = AV_CODEC_ID_NONE,
336  .video_codec = AV_CODEC_ID_H263,
337  .init = force_one_stream,
338  .write_packet = ff_raw_write_packet,
339  .flags = AVFMT_NOTIMESTAMPS,
340 };
341 #endif
342 
343 #if CONFIG_H264_MUXER
344 static int h264_check_bitstream(AVFormatContext *s, AVStream *st,
345  const AVPacket *pkt)
346 {
347  if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 &&
348  AV_RB24(pkt->data) != 0x000001)
349  return ff_stream_add_bitstream_filter(st, "h264_mp4toannexb", NULL);
350  return 1;
351 }
352 
354  .name = "h264",
355  .long_name = NULL_IF_CONFIG_SMALL("raw H.264 video"),
356  .extensions = "h264,264",
357  .audio_codec = AV_CODEC_ID_NONE,
358  .video_codec = AV_CODEC_ID_H264,
359  .init = force_one_stream,
360  .write_packet = ff_raw_write_packet,
361  .check_bitstream = h264_check_bitstream,
362  .flags = AVFMT_NOTIMESTAMPS,
363 };
364 #endif
365 
366 #if CONFIG_HEVC_MUXER
367 static int hevc_check_bitstream(AVFormatContext *s, AVStream *st,
368  const AVPacket *pkt)
369 {
370  if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 &&
371  AV_RB24(pkt->data) != 0x000001)
372  return ff_stream_add_bitstream_filter(st, "hevc_mp4toannexb", NULL);
373  return 1;
374 }
375 
377  .name = "hevc",
378  .long_name = NULL_IF_CONFIG_SMALL("raw HEVC video"),
379  .extensions = "hevc,h265,265",
380  .audio_codec = AV_CODEC_ID_NONE,
381  .video_codec = AV_CODEC_ID_HEVC,
382  .init = force_one_stream,
383  .write_packet = ff_raw_write_packet,
384  .check_bitstream = hevc_check_bitstream,
385  .flags = AVFMT_NOTIMESTAMPS,
386 };
387 #endif
388 
389 #if CONFIG_M4V_MUXER
391  .name = "m4v",
392  .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-4 video"),
393  .extensions = "m4v",
394  .audio_codec = AV_CODEC_ID_NONE,
395  .video_codec = AV_CODEC_ID_MPEG4,
396  .init = force_one_stream,
397  .write_packet = ff_raw_write_packet,
398  .flags = AVFMT_NOTIMESTAMPS,
399 };
400 #endif
401 
402 #if CONFIG_MJPEG_MUXER
404  .name = "mjpeg",
405  .long_name = NULL_IF_CONFIG_SMALL("raw MJPEG video"),
406  .mime_type = "video/x-mjpeg",
407  .extensions = "mjpg,mjpeg",
408  .audio_codec = AV_CODEC_ID_NONE,
409  .video_codec = AV_CODEC_ID_MJPEG,
410  .init = force_one_stream,
411  .write_packet = ff_raw_write_packet,
412  .flags = AVFMT_NOTIMESTAMPS,
413 };
414 #endif
415 
416 #if CONFIG_MLP_MUXER
418  .name = "mlp",
419  .long_name = NULL_IF_CONFIG_SMALL("raw MLP"),
420  .extensions = "mlp",
421  .audio_codec = AV_CODEC_ID_MLP,
422  .video_codec = AV_CODEC_ID_NONE,
423  .init = force_one_stream,
424  .write_packet = ff_raw_write_packet,
425  .flags = AVFMT_NOTIMESTAMPS,
426 };
427 #endif
428 
429 #if CONFIG_MP2_MUXER
431  .name = "mp2",
432  .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
433  .mime_type = "audio/mpeg",
434  .extensions = "mp2,m2a,mpa",
435  .audio_codec = AV_CODEC_ID_MP2,
436  .video_codec = AV_CODEC_ID_NONE,
437  .init = force_one_stream,
438  .write_packet = ff_raw_write_packet,
439  .flags = AVFMT_NOTIMESTAMPS,
440 };
441 #endif
442 
443 #if CONFIG_MPEG1VIDEO_MUXER
445  .name = "mpeg1video",
446  .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-1 video"),
447  .mime_type = "video/mpeg",
448  .extensions = "mpg,mpeg,m1v",
449  .audio_codec = AV_CODEC_ID_NONE,
450  .video_codec = AV_CODEC_ID_MPEG1VIDEO,
451  .init = force_one_stream,
452  .write_packet = ff_raw_write_packet,
453  .flags = AVFMT_NOTIMESTAMPS,
454 };
455 #endif
456 
457 #if CONFIG_MPEG2VIDEO_MUXER
459  .name = "mpeg2video",
460  .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-2 video"),
461  .extensions = "m2v",
462  .audio_codec = AV_CODEC_ID_NONE,
463  .video_codec = AV_CODEC_ID_MPEG2VIDEO,
464  .init = force_one_stream,
465  .write_packet = ff_raw_write_packet,
466  .flags = AVFMT_NOTIMESTAMPS,
467 };
468 #endif
469 
470 #if CONFIG_OBU_MUXER
471 static int obu_check_bitstream(AVFormatContext *s, AVStream *st,
472  const AVPacket *pkt)
473 {
474  return ff_stream_add_bitstream_filter(st, "av1_metadata", "td=insert");
475 }
476 
478  .name = "obu",
479  .long_name = NULL_IF_CONFIG_SMALL("AV1 low overhead OBU"),
480  .extensions = "obu",
481  .audio_codec = AV_CODEC_ID_NONE,
482  .video_codec = AV_CODEC_ID_AV1,
483  .init = force_one_stream,
484  .write_packet = ff_raw_write_packet,
485  .check_bitstream = obu_check_bitstream,
486  .flags = AVFMT_NOTIMESTAMPS,
487 };
488 #endif
489 
490 #if CONFIG_RAWVIDEO_MUXER
492  .name = "rawvideo",
493  .long_name = NULL_IF_CONFIG_SMALL("raw video"),
494  .extensions = "yuv,rgb",
495  .audio_codec = AV_CODEC_ID_NONE,
496  .video_codec = AV_CODEC_ID_RAWVIDEO,
497  .write_packet = ff_raw_write_packet,
498  .flags = AVFMT_NOTIMESTAMPS,
499 };
500 #endif
501 
502 #if CONFIG_SBC_MUXER
504  .name = "sbc",
505  .long_name = NULL_IF_CONFIG_SMALL("raw SBC"),
506  .mime_type = "audio/x-sbc",
507  .extensions = "sbc,msbc",
508  .audio_codec = AV_CODEC_ID_SBC,
509  .init = force_one_stream,
510  .write_packet = ff_raw_write_packet,
511  .flags = AVFMT_NOTIMESTAMPS,
512 };
513 #endif
514 
515 #if CONFIG_TRUEHD_MUXER
517  .name = "truehd",
518  .long_name = NULL_IF_CONFIG_SMALL("raw TrueHD"),
519  .extensions = "thd",
520  .audio_codec = AV_CODEC_ID_TRUEHD,
521  .video_codec = AV_CODEC_ID_NONE,
522  .init = force_one_stream,
523  .write_packet = ff_raw_write_packet,
524  .flags = AVFMT_NOTIMESTAMPS,
525 };
526 #endif
527 
528 #if CONFIG_VC1_MUXER
530  .name = "vc1",
531  .long_name = NULL_IF_CONFIG_SMALL("raw VC-1 video"),
532  .extensions = "vc1",
533  .audio_codec = AV_CODEC_ID_NONE,
534  .video_codec = AV_CODEC_ID_VC1,
535  .init = force_one_stream,
536  .write_packet = ff_raw_write_packet,
537  .flags = AVFMT_NOTIMESTAMPS,
538 };
539 #endif
ff_g726le_muxer
const AVOutputFormat ff_g726le_muxer
AV_CODEC_ID_AC3
@ AV_CODEC_ID_AC3
Definition: codec_id.h:426
AVOutputFormat::name
const char * name
Definition: avformat.h:504
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame 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. Frame references ownership and permissions
ff_mp2_muxer
const AVOutputFormat ff_mp2_muxer
AVCodecParameters
This struct describes the properties of an encoded stream.
Definition: codec_par.h:52
ff_aptx_hd_muxer
const AVOutputFormat ff_aptx_hd_muxer
AVFMT_NOTIMESTAMPS
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition: avformat.h:475
AV_CODEC_ID_DIRAC
@ AV_CODEC_ID_DIRAC
Definition: codec_id.h:166
AV_CODEC_ID_RAWVIDEO
@ AV_CODEC_ID_RAWVIDEO
Definition: codec_id.h:63
ff_gsm_muxer
const AVOutputFormat ff_gsm_muxer
AV_CODEC_ID_MPEG4
@ AV_CODEC_ID_MPEG4
Definition: codec_id.h:62
ff_rawvideo_muxer
const AVOutputFormat ff_rawvideo_muxer
AVPacket::data
uint8_t * data
Definition: packet.h:373
AV_CODEC_ID_AVS2
@ AV_CODEC_ID_AVS2
Definition: codec_id.h:244
AV_CODEC_ID_ADPCM_G722
@ AV_CODEC_ID_ADPCM_G722
Definition: codec_id.h:381
ff_g726_muxer
const AVOutputFormat ff_g726_muxer
AV_CODEC_ID_TRUEHD
@ AV_CODEC_ID_TRUEHD
Definition: codec_id.h:467
AV_CODEC_ID_H261
@ AV_CODEC_ID_H261
Definition: codec_id.h:53
ff_g722_muxer
const AVOutputFormat ff_g722_muxer
ff_cavsvideo_muxer
const AVOutputFormat ff_cavsvideo_muxer
AVCodecParameters::channels
int channels
Audio only.
Definition: codec_par.h:166
avio_tell
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
Definition: avio.h:504
ff_dnxhd_muxer
const AVOutputFormat ff_dnxhd_muxer
AV_CODEC_ID_SBC
@ AV_CODEC_ID_SBC
Definition: codec_id.h:510
ff_h263_muxer
const AVOutputFormat ff_h263_muxer
ff_avs3_muxer
const AVOutputFormat ff_avs3_muxer
pkt
AVPacket * pkt
Definition: movenc.c:59
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
ff_dirac_muxer
const AVOutputFormat ff_dirac_muxer
AV_CODEC_ID_ADPCM_G726
@ AV_CODEC_ID_ADPCM_G726
Definition: codec_id.h:364
intreadwrite.h
s
#define s(width, name)
Definition: cbs_vp9.c:257
ff_aptx_muxer
const AVOutputFormat ff_aptx_muxer
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
AV_CODEC_ID_MP2
@ AV_CODEC_ID_MP2
Definition: codec_id.h:423
ff_data_muxer
const AVOutputFormat ff_data_muxer
ff_raw_write_packet
int ff_raw_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: rawenc.c:29
AV_CODEC_ID_CODEC2
@ AV_CODEC_ID_CODEC2
Definition: codec_id.h:490
ff_vc1_muxer
const AVOutputFormat ff_vc1_muxer
AV_CODEC_ID_H264
@ AV_CODEC_ID_H264
Definition: codec_id.h:77
if
if(ret)
Definition: filter_design.txt:179
AV_CODEC_ID_AVS3
@ AV_CODEC_ID_AVS3
Definition: codec_id.h:246
AVFormatContext
Format I/O context.
Definition: avformat.h:1200
ff_hevc_muxer
const AVOutputFormat ff_hevc_muxer
internal.h
NULL
#define NULL
Definition: coverity.c:32
AV_CODEC_ID_AV1
@ AV_CODEC_ID_AV1
Definition: codec_id.h:279
force_one_stream
static int force_one_stream(AVFormatContext *s)
Definition: rawenc.c:35
AV_CODEC_ID_G723_1
@ AV_CODEC_ID_G723_1
Definition: codec_id.h:475
ff_stream_add_bitstream_filter
int ff_stream_add_bitstream_filter(AVStream *st, const char *name, const char *args)
Add a bitstream filter to a stream.
Definition: utils.c:1789
ff_mlp_muxer
const AVOutputFormat ff_mlp_muxer
AV_CODEC_ID_MPEG1VIDEO
@ AV_CODEC_ID_MPEG1VIDEO
Definition: codec_id.h:51
AV_CODEC_ID_GSM
@ AV_CODEC_ID_GSM
as in Berlin toast format
Definition: codec_id.h:441
AV_CODEC_ID_EAC3
@ AV_CODEC_ID_EAC3
Definition: codec_id.h:463
AVIOContext
Bytestream IO Context.
Definition: avio.h:161
AV_CODEC_ID_ADPCM_ADX
@ AV_CODEC_ID_ADPCM_ADX
Definition: codec_id.h:362
AVPacket::size
int size
Definition: packet.h:374
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
ff_dts_muxer
const AVOutputFormat ff_dts_muxer
AVIOContext::seekable
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
Definition: avio.h:262
AV_CODEC_ID_DTS
@ AV_CODEC_ID_DTS
Definition: codec_id.h:427
AV_CODEC_ID_H263
@ AV_CODEC_ID_H263
Definition: codec_id.h:54
AV_RB32
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
Definition: bytestream.h:96
ff_ac3_muxer
const AVOutputFormat ff_ac3_muxer
avio_write
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
Definition: aviobuf.c:232
avio_wb32
void avio_wb32(AVIOContext *s, unsigned int val)
Definition: aviobuf.c:394
ff_adx_muxer
const AVOutputFormat ff_adx_muxer
ff_h264_muxer
const AVOutputFormat ff_h264_muxer
rawenc.h
ff_eac3_muxer
const AVOutputFormat ff_eac3_muxer
AV_CODEC_ID_MJPEG
@ AV_CODEC_ID_MJPEG
Definition: codec_id.h:57
ff_h261_muxer
const AVOutputFormat ff_h261_muxer
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:48
AVOutputFormat
Definition: avformat.h:503
AV_CODEC_ID_CAVS
@ AV_CODEC_ID_CAVS
Definition: codec_id.h:137
ff_mjpeg_muxer
const AVOutputFormat ff_mjpeg_muxer
AV_CODEC_ID_HEVC
@ AV_CODEC_ID_HEVC
Definition: codec_id.h:224
AV_CODEC_ID_VC1
@ AV_CODEC_ID_VC1
Definition: codec_id.h:120
AVStream
Stream structure.
Definition: avformat.h:935
avio_seek
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
Definition: aviobuf.c:260
ff_sbc_muxer
const AVOutputFormat ff_sbc_muxer
avformat.h
ff_g723_1_muxer
const AVOutputFormat ff_g723_1_muxer
AV_CODEC_ID_ADPCM_G726LE
@ AV_CODEC_ID_ADPCM_G726LE
Definition: codec_id.h:388
ff_truehd_muxer
const AVOutputFormat ff_truehd_muxer
AVIO_SEEKABLE_NORMAL
#define AVIO_SEEKABLE_NORMAL
Seeking works like for a local file.
Definition: avio.h:40
ff_codec2raw_muxer
const AVOutputFormat ff_codec2raw_muxer
ff_mpeg1video_muxer
const AVOutputFormat ff_mpeg1video_muxer
ff_obu_muxer
const AVOutputFormat ff_obu_muxer
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
ff_mpeg2video_muxer
const AVOutputFormat ff_mpeg2video_muxer
AVPacket
This structure stores compressed data.
Definition: packet.h:350
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:28
AV_CODEC_ID_APTX
@ AV_CODEC_ID_APTX
Definition: codec_id.h:508
AV_RB24
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_RB24
Definition: bytestream.h:97
ff_m4v_muxer
const AVOutputFormat ff_m4v_muxer
AV_CODEC_ID_MPEG2VIDEO
@ AV_CODEC_ID_MPEG2VIDEO
preferred ID for MPEG-1/2 video decoding
Definition: codec_id.h:52
AV_CODEC_ID_APTX_HD
@ AV_CODEC_ID_APTX_HD
Definition: codec_id.h:509
AV_CODEC_ID_DNXHD
@ AV_CODEC_ID_DNXHD
Definition: codec_id.h:149
AV_CODEC_ID_MLP
@ AV_CODEC_ID_MLP
Definition: codec_id.h:452
ff_avs2_muxer
const AVOutputFormat ff_avs2_muxer