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 "config_components.h"
24 
25 #include "libavutil/intreadwrite.h"
26 
27 #include "avformat.h"
28 #include "rawenc.h"
29 #include "mux.h"
30 
32 {
33  avio_write(s->pb, pkt->data, pkt->size);
34  return 0;
35 }
36 
38 {
39  if (s->nb_streams != 1) {
40  av_log(s, AV_LOG_ERROR, "%s files have exactly one stream\n",
41  s->oformat->name);
42  return AVERROR(EINVAL);
43  }
44  if ( s->oformat->audio_codec != AV_CODEC_ID_NONE
45  && s->streams[0]->codecpar->codec_type != AVMEDIA_TYPE_AUDIO) {
46  av_log(s, AV_LOG_ERROR, "%s files have exactly one audio stream\n",
47  s->oformat->name);
48  return AVERROR(EINVAL);
49  }
50  if ( s->oformat->video_codec != AV_CODEC_ID_NONE
51  && s->streams[0]->codecpar->codec_type != AVMEDIA_TYPE_VIDEO) {
52  av_log(s, AV_LOG_ERROR, "%s files have exactly one video stream\n",
53  s->oformat->name);
54  return AVERROR(EINVAL);
55  }
56  return 0;
57 }
58 
59 /* Note: Do not forget to add new entries to the Makefile as well. */
60 
61 #if CONFIG_AC3_MUXER
63  .p.name = "ac3",
64  .p.long_name = NULL_IF_CONFIG_SMALL("raw AC-3"),
65  .p.mime_type = "audio/x-ac3",
66  .p.extensions = "ac3",
67  .p.audio_codec = AV_CODEC_ID_AC3,
68  .p.video_codec = AV_CODEC_ID_NONE,
69  .init = force_one_stream,
70  .write_packet = ff_raw_write_packet,
71  .p.flags = AVFMT_NOTIMESTAMPS,
72 };
73 #endif
74 
75 #if CONFIG_ADX_MUXER
76 
77 static int adx_write_trailer(AVFormatContext *s)
78 {
79  AVIOContext *pb = s->pb;
80  AVCodecParameters *par = s->streams[0]->codecpar;
81 
82  if (pb->seekable & AVIO_SEEKABLE_NORMAL) {
83  int64_t file_size = avio_tell(pb);
84  uint64_t sample_count = (file_size - 36) / par->ch_layout.nb_channels / 18 * 32;
85  if (sample_count <= UINT32_MAX) {
86  avio_seek(pb, 12, SEEK_SET);
87  avio_wb32(pb, sample_count);
88  avio_seek(pb, file_size, SEEK_SET);
89  }
90  }
91 
92  return 0;
93 }
94 
96  .p.name = "adx",
97  .p.long_name = NULL_IF_CONFIG_SMALL("CRI ADX"),
98  .p.extensions = "adx",
99  .p.audio_codec = AV_CODEC_ID_ADPCM_ADX,
100  .p.video_codec = AV_CODEC_ID_NONE,
101  .init = force_one_stream,
102  .write_packet = ff_raw_write_packet,
103  .write_trailer = adx_write_trailer,
104  .p.flags = AVFMT_NOTIMESTAMPS,
105 };
106 #endif
107 
108 #if CONFIG_APTX_MUXER
110  .p.name = "aptx",
111  .p.long_name = NULL_IF_CONFIG_SMALL("raw aptX (Audio Processing Technology for Bluetooth)"),
112  .p.extensions = "aptx",
113  .p.audio_codec = AV_CODEC_ID_APTX,
114  .p.video_codec = AV_CODEC_ID_NONE,
115  .init = force_one_stream,
116  .write_packet = ff_raw_write_packet,
117  .p.flags = AVFMT_NOTIMESTAMPS,
118 };
119 #endif
120 
121 #if CONFIG_APTX_HD_MUXER
123  .p.name = "aptx_hd",
124  .p.long_name = NULL_IF_CONFIG_SMALL("raw aptX HD (Audio Processing Technology for Bluetooth)"),
125  .p.extensions = "aptxhd",
126  .p.audio_codec = AV_CODEC_ID_APTX_HD,
127  .p.video_codec = AV_CODEC_ID_NONE,
128  .init = force_one_stream,
129  .write_packet = ff_raw_write_packet,
130  .p.flags = AVFMT_NOTIMESTAMPS,
131 };
132 #endif
133 
134 #if CONFIG_AVS2_MUXER
136  .p.name = "avs2",
137  .p.long_name = NULL_IF_CONFIG_SMALL("raw AVS2-P2/IEEE1857.4 video"),
138  .p.extensions = "avs,avs2",
139  .p.audio_codec = AV_CODEC_ID_NONE,
140  .p.video_codec = AV_CODEC_ID_AVS2,
141  .init = force_one_stream,
142  .write_packet = ff_raw_write_packet,
143  .p.flags = AVFMT_NOTIMESTAMPS,
144 };
145 #endif
146 
147 #if CONFIG_AVS3_MUXER
149  .p.name = "avs3",
150  .p.long_name = NULL_IF_CONFIG_SMALL("AVS3-P2/IEEE1857.10"),
151  .p.extensions = "avs3",
152  .p.audio_codec = AV_CODEC_ID_NONE,
153  .p.video_codec = AV_CODEC_ID_AVS3,
154  .init = force_one_stream,
155  .write_packet = ff_raw_write_packet,
156  .p.flags = AVFMT_NOTIMESTAMPS,
157 };
158 #endif
159 
160 
161 #if CONFIG_CAVSVIDEO_MUXER
163  .p.name = "cavsvideo",
164  .p.long_name = NULL_IF_CONFIG_SMALL("raw Chinese AVS (Audio Video Standard) video"),
165  .p.extensions = "cavs",
166  .p.audio_codec = AV_CODEC_ID_NONE,
167  .p.video_codec = AV_CODEC_ID_CAVS,
168  .init = force_one_stream,
169  .write_packet = ff_raw_write_packet,
170  .p.flags = AVFMT_NOTIMESTAMPS,
171 };
172 #endif
173 
174 #if CONFIG_CODEC2RAW_MUXER
176  .p.name = "codec2raw",
177  .p.long_name = NULL_IF_CONFIG_SMALL("raw codec2 muxer"),
178  .p.audio_codec = AV_CODEC_ID_CODEC2,
179  .p.video_codec = AV_CODEC_ID_NONE,
180  .init = force_one_stream,
181  .write_packet = ff_raw_write_packet,
182  .p.flags = AVFMT_NOTIMESTAMPS,
183 };
184 #endif
185 
186 
187 #if CONFIG_DATA_MUXER
189  .p.name = "data",
190  .p.long_name = NULL_IF_CONFIG_SMALL("raw data"),
191  .init = force_one_stream,
192  .write_packet = ff_raw_write_packet,
193  .p.flags = AVFMT_NOTIMESTAMPS,
194 };
195 #endif
196 
197 #if CONFIG_DFPWM_MUXER
199  .p.name = "dfpwm",
200  .p.long_name = NULL_IF_CONFIG_SMALL("raw DFPWM1a"),
201  .p.extensions = "dfpwm",
202  .p.audio_codec = AV_CODEC_ID_DFPWM,
203  .p.video_codec = AV_CODEC_ID_NONE,
204  .init = force_one_stream,
205  .write_packet = ff_raw_write_packet,
206  .p.flags = AVFMT_NOTIMESTAMPS,
207 };
208 #endif
209 
210 #if CONFIG_DIRAC_MUXER
212  .p.name = "dirac",
213  .p.long_name = NULL_IF_CONFIG_SMALL("raw Dirac"),
214  .p.extensions = "drc,vc2",
215  .p.audio_codec = AV_CODEC_ID_NONE,
216  .p.video_codec = AV_CODEC_ID_DIRAC,
217  .init = force_one_stream,
218  .write_packet = ff_raw_write_packet,
219  .p.flags = AVFMT_NOTIMESTAMPS,
220 };
221 #endif
222 
223 #if CONFIG_DNXHD_MUXER
225  .p.name = "dnxhd",
226  .p.long_name = NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
227  .p.extensions = "dnxhd,dnxhr",
228  .p.audio_codec = AV_CODEC_ID_NONE,
229  .p.video_codec = AV_CODEC_ID_DNXHD,
230  .init = force_one_stream,
231  .write_packet = ff_raw_write_packet,
232  .p.flags = AVFMT_NOTIMESTAMPS,
233 };
234 #endif
235 
236 #if CONFIG_DTS_MUXER
238  .p.name = "dts",
239  .p.long_name = NULL_IF_CONFIG_SMALL("raw DTS"),
240  .p.mime_type = "audio/x-dca",
241  .p.extensions = "dts",
242  .p.audio_codec = AV_CODEC_ID_DTS,
243  .p.video_codec = AV_CODEC_ID_NONE,
244  .init = force_one_stream,
245  .write_packet = ff_raw_write_packet,
246  .p.flags = AVFMT_NOTIMESTAMPS,
247 };
248 #endif
249 
250 #if CONFIG_EAC3_MUXER
252  .p.name = "eac3",
253  .p.long_name = NULL_IF_CONFIG_SMALL("raw E-AC-3"),
254  .p.mime_type = "audio/x-eac3",
255  .p.extensions = "eac3,ec3",
256  .p.audio_codec = AV_CODEC_ID_EAC3,
257  .p.video_codec = AV_CODEC_ID_NONE,
258  .init = force_one_stream,
259  .write_packet = ff_raw_write_packet,
260  .p.flags = AVFMT_NOTIMESTAMPS,
261 };
262 #endif
263 
264 #if CONFIG_G722_MUXER
266  .p.name = "g722",
267  .p.long_name = NULL_IF_CONFIG_SMALL("raw G.722"),
268  .p.mime_type = "audio/G722",
269  .p.extensions = "g722",
270  .p.audio_codec = AV_CODEC_ID_ADPCM_G722,
271  .p.video_codec = AV_CODEC_ID_NONE,
272  .init = force_one_stream,
273  .write_packet = ff_raw_write_packet,
274  .p.flags = AVFMT_NOTIMESTAMPS,
275 };
276 #endif
277 
278 #if CONFIG_G723_1_MUXER
280  .p.name = "g723_1",
281  .p.long_name = NULL_IF_CONFIG_SMALL("raw G.723.1"),
282  .p.mime_type = "audio/g723",
283  .p.extensions = "tco,rco",
284  .p.audio_codec = AV_CODEC_ID_G723_1,
285  .p.video_codec = AV_CODEC_ID_NONE,
286  .init = force_one_stream,
287  .write_packet = ff_raw_write_packet,
288  .p.flags = AVFMT_NOTIMESTAMPS,
289 };
290 #endif
291 
292 #if CONFIG_G726_MUXER
294  .p.name = "g726",
295  .p.long_name = NULL_IF_CONFIG_SMALL("raw big-endian G.726 (\"left-justified\")"),
296  .p.audio_codec = AV_CODEC_ID_ADPCM_G726,
297  .p.video_codec = AV_CODEC_ID_NONE,
298  .init = force_one_stream,
299  .write_packet = ff_raw_write_packet,
300  .p.flags = AVFMT_NOTIMESTAMPS,
301 };
302 #endif
303 
304 #if CONFIG_G726LE_MUXER
306  .p.name = "g726le",
307  .p.long_name = NULL_IF_CONFIG_SMALL("raw little-endian G.726 (\"right-justified\")"),
308  .p.audio_codec = AV_CODEC_ID_ADPCM_G726LE,
309  .p.video_codec = AV_CODEC_ID_NONE,
310  .init = force_one_stream,
311  .write_packet = ff_raw_write_packet,
312  .p.flags = AVFMT_NOTIMESTAMPS,
313 };
314 #endif
315 
316 #if CONFIG_GSM_MUXER
318  .p.name = "gsm",
319  .p.long_name = NULL_IF_CONFIG_SMALL("raw GSM"),
320  .p.mime_type = "audio/x-gsm",
321  .p.extensions = "gsm",
322  .p.audio_codec = AV_CODEC_ID_GSM,
323  .p.video_codec = AV_CODEC_ID_NONE,
324  .init = force_one_stream,
325  .write_packet = ff_raw_write_packet,
326  .p.flags = AVFMT_NOTIMESTAMPS,
327 };
328 #endif
329 
330 #if CONFIG_H261_MUXER
332  .p.name = "h261",
333  .p.long_name = NULL_IF_CONFIG_SMALL("raw H.261"),
334  .p.mime_type = "video/x-h261",
335  .p.extensions = "h261",
336  .p.audio_codec = AV_CODEC_ID_NONE,
337  .p.video_codec = AV_CODEC_ID_H261,
338  .init = force_one_stream,
339  .write_packet = ff_raw_write_packet,
340  .p.flags = AVFMT_NOTIMESTAMPS,
341 };
342 #endif
343 
344 #if CONFIG_H263_MUXER
346  .p.name = "h263",
347  .p.long_name = NULL_IF_CONFIG_SMALL("raw H.263"),
348  .p.mime_type = "video/x-h263",
349  .p.extensions = "h263",
350  .p.audio_codec = AV_CODEC_ID_NONE,
351  .p.video_codec = AV_CODEC_ID_H263,
352  .init = force_one_stream,
353  .write_packet = ff_raw_write_packet,
354  .p.flags = AVFMT_NOTIMESTAMPS,
355 };
356 #endif
357 
358 #if CONFIG_H264_MUXER
359 static int h264_check_bitstream(AVFormatContext *s, AVStream *st,
360  const AVPacket *pkt)
361 {
362  if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 &&
363  AV_RB24(pkt->data) != 0x000001)
364  return ff_stream_add_bitstream_filter(st, "h264_mp4toannexb", NULL);
365  return 1;
366 }
367 
369  .p.name = "h264",
370  .p.long_name = NULL_IF_CONFIG_SMALL("raw H.264 video"),
371  .p.extensions = "h264,264",
372  .p.audio_codec = AV_CODEC_ID_NONE,
373  .p.video_codec = AV_CODEC_ID_H264,
374  .init = force_one_stream,
375  .write_packet = ff_raw_write_packet,
376  .check_bitstream = h264_check_bitstream,
377  .p.flags = AVFMT_NOTIMESTAMPS,
378 };
379 #endif
380 
381 #if CONFIG_HEVC_MUXER
382 static int hevc_check_bitstream(AVFormatContext *s, AVStream *st,
383  const AVPacket *pkt)
384 {
385  if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 &&
386  AV_RB24(pkt->data) != 0x000001)
387  return ff_stream_add_bitstream_filter(st, "hevc_mp4toannexb", NULL);
388  return 1;
389 }
390 
392  .p.name = "hevc",
393  .p.long_name = NULL_IF_CONFIG_SMALL("raw HEVC video"),
394  .p.extensions = "hevc,h265,265",
395  .p.audio_codec = AV_CODEC_ID_NONE,
396  .p.video_codec = AV_CODEC_ID_HEVC,
397  .init = force_one_stream,
398  .write_packet = ff_raw_write_packet,
399  .check_bitstream = hevc_check_bitstream,
400  .p.flags = AVFMT_NOTIMESTAMPS,
401 };
402 #endif
403 
404 #if CONFIG_M4V_MUXER
406  .p.name = "m4v",
407  .p.long_name = NULL_IF_CONFIG_SMALL("raw MPEG-4 video"),
408  .p.extensions = "m4v",
409  .p.audio_codec = AV_CODEC_ID_NONE,
410  .p.video_codec = AV_CODEC_ID_MPEG4,
411  .init = force_one_stream,
412  .write_packet = ff_raw_write_packet,
413  .p.flags = AVFMT_NOTIMESTAMPS,
414 };
415 #endif
416 
417 #if CONFIG_MJPEG_MUXER
419  .p.name = "mjpeg",
420  .p.long_name = NULL_IF_CONFIG_SMALL("raw MJPEG video"),
421  .p.mime_type = "video/x-mjpeg",
422  .p.extensions = "mjpg,mjpeg",
423  .p.audio_codec = AV_CODEC_ID_NONE,
424  .p.video_codec = AV_CODEC_ID_MJPEG,
425  .init = force_one_stream,
426  .write_packet = ff_raw_write_packet,
427  .p.flags = AVFMT_NOTIMESTAMPS,
428 };
429 #endif
430 
431 #if CONFIG_MLP_MUXER
433  .p.name = "mlp",
434  .p.long_name = NULL_IF_CONFIG_SMALL("raw MLP"),
435  .p.extensions = "mlp",
436  .p.audio_codec = AV_CODEC_ID_MLP,
437  .p.video_codec = AV_CODEC_ID_NONE,
438  .init = force_one_stream,
439  .write_packet = ff_raw_write_packet,
440  .p.flags = AVFMT_NOTIMESTAMPS,
441 };
442 #endif
443 
444 #if CONFIG_MP2_MUXER
446  .p.name = "mp2",
447  .p.long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
448  .p.mime_type = "audio/mpeg",
449  .p.extensions = "mp2,m2a,mpa",
450  .p.audio_codec = AV_CODEC_ID_MP2,
451  .p.video_codec = AV_CODEC_ID_NONE,
452  .init = force_one_stream,
453  .write_packet = ff_raw_write_packet,
454  .p.flags = AVFMT_NOTIMESTAMPS,
455 };
456 #endif
457 
458 #if CONFIG_MPEG1VIDEO_MUXER
460  .p.name = "mpeg1video",
461  .p.long_name = NULL_IF_CONFIG_SMALL("raw MPEG-1 video"),
462  .p.mime_type = "video/mpeg",
463  .p.extensions = "mpg,mpeg,m1v",
464  .p.audio_codec = AV_CODEC_ID_NONE,
465  .p.video_codec = AV_CODEC_ID_MPEG1VIDEO,
466  .init = force_one_stream,
467  .write_packet = ff_raw_write_packet,
468  .p.flags = AVFMT_NOTIMESTAMPS,
469 };
470 #endif
471 
472 #if CONFIG_MPEG2VIDEO_MUXER
474  .p.name = "mpeg2video",
475  .p.long_name = NULL_IF_CONFIG_SMALL("raw MPEG-2 video"),
476  .p.extensions = "m2v",
477  .p.audio_codec = AV_CODEC_ID_NONE,
478  .p.video_codec = AV_CODEC_ID_MPEG2VIDEO,
479  .init = force_one_stream,
480  .write_packet = ff_raw_write_packet,
481  .p.flags = AVFMT_NOTIMESTAMPS,
482 };
483 #endif
484 
485 #if CONFIG_OBU_MUXER
486 static int obu_check_bitstream(AVFormatContext *s, AVStream *st,
487  const AVPacket *pkt)
488 {
489  return ff_stream_add_bitstream_filter(st, "av1_metadata", "td=insert");
490 }
491 
493  .p.name = "obu",
494  .p.long_name = NULL_IF_CONFIG_SMALL("AV1 low overhead OBU"),
495  .p.extensions = "obu",
496  .p.audio_codec = AV_CODEC_ID_NONE,
497  .p.video_codec = AV_CODEC_ID_AV1,
498  .init = force_one_stream,
499  .write_packet = ff_raw_write_packet,
500  .check_bitstream = obu_check_bitstream,
501  .p.flags = AVFMT_NOTIMESTAMPS,
502 };
503 #endif
504 
505 #if CONFIG_RAWVIDEO_MUXER
507  .p.name = "rawvideo",
508  .p.long_name = NULL_IF_CONFIG_SMALL("raw video"),
509  .p.extensions = "yuv,rgb",
510  .p.audio_codec = AV_CODEC_ID_NONE,
511  .p.video_codec = AV_CODEC_ID_RAWVIDEO,
512  .write_packet = ff_raw_write_packet,
513  .p.flags = AVFMT_NOTIMESTAMPS,
514 };
515 #endif
516 
517 #if CONFIG_SBC_MUXER
519  .p.name = "sbc",
520  .p.long_name = NULL_IF_CONFIG_SMALL("raw SBC"),
521  .p.mime_type = "audio/x-sbc",
522  .p.extensions = "sbc,msbc",
523  .p.audio_codec = AV_CODEC_ID_SBC,
524  .init = force_one_stream,
525  .write_packet = ff_raw_write_packet,
526  .p.flags = AVFMT_NOTIMESTAMPS,
527 };
528 #endif
529 
530 #if CONFIG_TRUEHD_MUXER
532  .p.name = "truehd",
533  .p.long_name = NULL_IF_CONFIG_SMALL("raw TrueHD"),
534  .p.extensions = "thd",
535  .p.audio_codec = AV_CODEC_ID_TRUEHD,
536  .p.video_codec = AV_CODEC_ID_NONE,
537  .init = force_one_stream,
538  .write_packet = ff_raw_write_packet,
539  .p.flags = AVFMT_NOTIMESTAMPS,
540 };
541 #endif
542 
543 #if CONFIG_VC1_MUXER
545  .p.name = "vc1",
546  .p.long_name = NULL_IF_CONFIG_SMALL("raw VC-1 video"),
547  .p.extensions = "vc1",
548  .p.audio_codec = AV_CODEC_ID_NONE,
549  .p.video_codec = AV_CODEC_ID_VC1,
550  .init = force_one_stream,
551  .write_packet = ff_raw_write_packet,
552  .p.flags = AVFMT_NOTIMESTAMPS,
553 };
554 #endif
ff_aptx_hd_muxer
const FFOutputFormat ff_aptx_hd_muxer
ff_dfpwm_muxer
const FFOutputFormat ff_dfpwm_muxer
AV_CODEC_ID_AC3
@ AV_CODEC_ID_AC3
Definition: codec_id.h:441
ff_dirac_muxer
const FFOutputFormat ff_dirac_muxer
AVOutputFormat::name
const char * name
Definition: avformat.h:508
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_aptx_muxer
const FFOutputFormat ff_aptx_muxer
AVCodecParameters
This struct describes the properties of an encoded stream.
Definition: codec_par.h:54
ff_avs2_muxer
const FFOutputFormat ff_avs2_muxer
AVFMT_NOTIMESTAMPS
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition: avformat.h:479
AV_CODEC_ID_DIRAC
@ AV_CODEC_ID_DIRAC
Definition: codec_id.h:168
AV_CODEC_ID_RAWVIDEO
@ AV_CODEC_ID_RAWVIDEO
Definition: codec_id.h:65
ff_mp2_muxer
const FFOutputFormat ff_mp2_muxer
AV_CODEC_ID_MPEG4
@ AV_CODEC_ID_MPEG4
Definition: codec_id.h:64
ff_g723_1_muxer
const FFOutputFormat ff_g723_1_muxer
AVPacket::data
uint8_t * data
Definition: packet.h:374
ff_g726le_muxer
const FFOutputFormat ff_g726le_muxer
AV_CODEC_ID_AVS2
@ AV_CODEC_ID_AVS2
Definition: codec_id.h:246
ff_h261_muxer
const FFOutputFormat ff_h261_muxer
AV_CODEC_ID_ADPCM_G722
@ AV_CODEC_ID_ADPCM_G722
Definition: codec_id.h:393
AVChannelLayout::nb_channels
int nb_channels
Number of channels in this layout.
Definition: channel_layout.h:311
AV_CODEC_ID_TRUEHD
@ AV_CODEC_ID_TRUEHD
Definition: codec_id.h:482
FFOutputFormat::p
AVOutputFormat p
The public AVOutputFormat.
Definition: mux.h:34
AV_CODEC_ID_H261
@ AV_CODEC_ID_H261
Definition: codec_id.h:55
ff_adx_muxer
const FFOutputFormat ff_adx_muxer
ff_data_muxer
const FFOutputFormat ff_data_muxer
avio_tell
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
Definition: avio.h:500
ff_dts_muxer
const FFOutputFormat ff_dts_muxer
AV_CODEC_ID_SBC
@ AV_CODEC_ID_SBC
Definition: codec_id.h:525
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
AV_CODEC_ID_ADPCM_G726
@ AV_CODEC_ID_ADPCM_G726
Definition: codec_id.h:376
intreadwrite.h
s
#define s(width, name)
Definition: cbs_vp9.c:256
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
AV_CODEC_ID_MP2
@ AV_CODEC_ID_MP2
Definition: codec_id.h:438
ff_cavsvideo_muxer
const FFOutputFormat ff_cavsvideo_muxer
ff_g726_muxer
const FFOutputFormat ff_g726_muxer
ff_raw_write_packet
int ff_raw_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: rawenc.c:31
AV_CODEC_ID_CODEC2
@ AV_CODEC_ID_CODEC2
Definition: codec_id.h:505
AV_CODEC_ID_H264
@ AV_CODEC_ID_H264
Definition: codec_id.h:79
ff_ac3_muxer
const FFOutputFormat ff_ac3_muxer
if
if(ret)
Definition: filter_design.txt:179
ff_sbc_muxer
const FFOutputFormat ff_sbc_muxer
AV_CODEC_ID_AVS3
@ AV_CODEC_ID_AVS3
Definition: codec_id.h:248
AVFormatContext
Format I/O context.
Definition: avformat.h:1104
ff_eac3_muxer
const FFOutputFormat ff_eac3_muxer
ff_m4v_muxer
const FFOutputFormat ff_m4v_muxer
NULL
#define NULL
Definition: coverity.c:32
AV_CODEC_ID_AV1
@ AV_CODEC_ID_AV1
Definition: codec_id.h:283
force_one_stream
static int force_one_stream(AVFormatContext *s)
Definition: rawenc.c:37
AV_CODEC_ID_G723_1
@ AV_CODEC_ID_G723_1
Definition: codec_id.h:490
FFOutputFormat
Definition: mux.h:30
ff_vc1_muxer
const FFOutputFormat ff_vc1_muxer
AVCodecParameters::ch_layout
AVChannelLayout ch_layout
Audio only.
Definition: codec_par.h:213
AV_CODEC_ID_MPEG1VIDEO
@ AV_CODEC_ID_MPEG1VIDEO
Definition: codec_id.h:53
AV_CODEC_ID_GSM
@ AV_CODEC_ID_GSM
as in Berlin toast format
Definition: codec_id.h:456
AV_CODEC_ID_EAC3
@ AV_CODEC_ID_EAC3
Definition: codec_id.h:478
AVIOContext
Bytestream IO Context.
Definition: avio.h:166
AV_CODEC_ID_ADPCM_ADX
@ AV_CODEC_ID_ADPCM_ADX
Definition: codec_id.h:374
AVPacket::size
int size
Definition: packet.h:375
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:115
ff_dnxhd_muxer
const FFOutputFormat ff_dnxhd_muxer
AVIOContext::seekable
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
Definition: avio.h:267
ff_mlp_muxer
const FFOutputFormat ff_mlp_muxer
AV_CODEC_ID_DTS
@ AV_CODEC_ID_DTS
Definition: codec_id.h:442
AV_CODEC_ID_H263
@ AV_CODEC_ID_H263
Definition: codec_id.h:56
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
avio_write
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
Definition: aviobuf.c:222
avio_wb32
void avio_wb32(AVIOContext *s, unsigned int val)
Definition: aviobuf.c:386
ff_mjpeg_muxer
const FFOutputFormat ff_mjpeg_muxer
rawenc.h
AV_CODEC_ID_MJPEG
@ AV_CODEC_ID_MJPEG
Definition: codec_id.h:59
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
ff_h263_muxer
const FFOutputFormat ff_h263_muxer
AV_CODEC_ID_CAVS
@ AV_CODEC_ID_CAVS
Definition: codec_id.h:139
ff_avs3_muxer
const FFOutputFormat ff_avs3_muxer
AV_CODEC_ID_HEVC
@ AV_CODEC_ID_HEVC
Definition: codec_id.h:226
AV_CODEC_ID_VC1
@ AV_CODEC_ID_VC1
Definition: codec_id.h:122
ff_truehd_muxer
const FFOutputFormat ff_truehd_muxer
AVStream
Stream structure.
Definition: avformat.h:838
avio_seek
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
Definition: aviobuf.c:252
avformat.h
ff_obu_muxer
const FFOutputFormat ff_obu_muxer
ff_hevc_muxer
const FFOutputFormat ff_hevc_muxer
AV_CODEC_ID_ADPCM_G726LE
@ AV_CODEC_ID_ADPCM_G726LE
Definition: codec_id.h:400
AVIO_SEEKABLE_NORMAL
#define AVIO_SEEKABLE_NORMAL
Seeking works like for a local file.
Definition: avio.h:41
ff_g722_muxer
const FFOutputFormat ff_g722_muxer
ff_codec2raw_muxer
const FFOutputFormat ff_codec2raw_muxer
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
ff_gsm_muxer
const FFOutputFormat ff_gsm_muxer
AVPacket
This structure stores compressed data.
Definition: packet.h:351
ff_mpeg1video_muxer
const FFOutputFormat ff_mpeg1video_muxer
AV_CODEC_ID_DFPWM
@ AV_CODEC_ID_DFPWM
Definition: codec_id.h:534
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
ff_rawvideo_muxer
const FFOutputFormat ff_rawvideo_muxer
AV_CODEC_ID_APTX
@ AV_CODEC_ID_APTX
Definition: codec_id.h:523
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_h264_muxer
const FFOutputFormat ff_h264_muxer
AV_CODEC_ID_MPEG2VIDEO
@ AV_CODEC_ID_MPEG2VIDEO
preferred ID for MPEG-1/2 video decoding
Definition: codec_id.h:54
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: mux.c:1312
AV_CODEC_ID_APTX_HD
@ AV_CODEC_ID_APTX_HD
Definition: codec_id.h:524
AV_CODEC_ID_DNXHD
@ AV_CODEC_ID_DNXHD
Definition: codec_id.h:151
AV_CODEC_ID_MLP
@ AV_CODEC_ID_MLP
Definition: codec_id.h:467
ff_mpeg2video_muxer
const FFOutputFormat ff_mpeg2video_muxer
mux.h