FFmpeg
Loading...
Searching...
No Matches
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
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
37/* Note: Do not forget to add new entries to the Makefile as well. */
38
39#if CONFIG_AC3_MUXER
41 .p.name = "ac3",
42 .p.long_name = NULL_IF_CONFIG_SMALL("raw AC-3"),
43 .p.mime_type = "audio/x-ac3",
44 .p.extensions = "ac3",
45 .p.audio_codec = AV_CODEC_ID_AC3,
46 .p.video_codec = AV_CODEC_ID_NONE,
47 .p.subtitle_codec = AV_CODEC_ID_NONE,
48 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
50 .write_packet = ff_raw_write_packet,
51 .p.flags = AVFMT_NOTIMESTAMPS,
52};
53#endif
54
55#if CONFIG_ADX_MUXER
56
57static int adx_write_trailer(AVFormatContext *s)
58{
59 AVIOContext *pb = s->pb;
60 AVCodecParameters *par = s->streams[0]->codecpar;
61
63 int64_t file_size = avio_tell(pb);
64 uint64_t sample_count = (file_size - 36) / par->ch_layout.nb_channels / 18 * 32;
65 if (sample_count <= UINT32_MAX) {
66 avio_seek(pb, 12, SEEK_SET);
67 avio_wb32(pb, sample_count);
68 avio_seek(pb, file_size, SEEK_SET);
69 }
70 }
71
72 return 0;
73}
74
76 .p.name = "adx",
77 .p.long_name = NULL_IF_CONFIG_SMALL("CRI ADX"),
78 .p.extensions = "adx",
79 .p.audio_codec = AV_CODEC_ID_ADPCM_ADX,
80 .p.video_codec = AV_CODEC_ID_NONE,
81 .p.subtitle_codec = AV_CODEC_ID_NONE,
82 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
84 .write_packet = ff_raw_write_packet,
85 .write_trailer = adx_write_trailer,
86 .p.flags = AVFMT_NOTIMESTAMPS,
87};
88#endif
89
90#if CONFIG_APTX_MUXER
92 .p.name = "aptx",
93 .p.long_name = NULL_IF_CONFIG_SMALL("raw aptX (Audio Processing Technology for Bluetooth)"),
94 .p.extensions = "aptx",
95 .p.audio_codec = AV_CODEC_ID_APTX,
96 .p.video_codec = AV_CODEC_ID_NONE,
97 .p.subtitle_codec = AV_CODEC_ID_NONE,
98 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
100 .write_packet = ff_raw_write_packet,
101 .p.flags = AVFMT_NOTIMESTAMPS,
102};
103#endif
104
105#if CONFIG_APTX_HD_MUXER
107 .p.name = "aptx_hd",
108 .p.long_name = NULL_IF_CONFIG_SMALL("raw aptX HD (Audio Processing Technology for Bluetooth)"),
109 .p.extensions = "aptxhd",
110 .p.audio_codec = AV_CODEC_ID_APTX_HD,
111 .p.video_codec = AV_CODEC_ID_NONE,
112 .p.subtitle_codec = AV_CODEC_ID_NONE,
113 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
115 .write_packet = ff_raw_write_packet,
116 .p.flags = AVFMT_NOTIMESTAMPS,
117};
118#endif
119
120#if CONFIG_AVS2_MUXER
122 .p.name = "avs2",
123 .p.long_name = NULL_IF_CONFIG_SMALL("raw AVS2-P2/IEEE1857.4 video"),
124 .p.extensions = "avs,avs2",
125 .p.audio_codec = AV_CODEC_ID_NONE,
126 .p.video_codec = AV_CODEC_ID_AVS2,
127 .p.subtitle_codec = AV_CODEC_ID_NONE,
128 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
130 .write_packet = ff_raw_write_packet,
131 .p.flags = AVFMT_NOTIMESTAMPS,
132};
133#endif
134
135#if CONFIG_AVS3_MUXER
137 .p.name = "avs3",
138 .p.long_name = NULL_IF_CONFIG_SMALL("AVS3-P2/IEEE1857.10"),
139 .p.extensions = "avs3",
140 .p.audio_codec = AV_CODEC_ID_NONE,
141 .p.video_codec = AV_CODEC_ID_AVS3,
142 .p.subtitle_codec = AV_CODEC_ID_NONE,
143 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
145 .write_packet = ff_raw_write_packet,
146 .p.flags = AVFMT_NOTIMESTAMPS,
147};
148#endif
149
150
151#if CONFIG_CAVSVIDEO_MUXER
153 .p.name = "cavsvideo",
154 .p.long_name = NULL_IF_CONFIG_SMALL("raw Chinese AVS (Audio Video Standard) video"),
155 .p.extensions = "cavs",
156 .p.audio_codec = AV_CODEC_ID_NONE,
157 .p.video_codec = AV_CODEC_ID_CAVS,
158 .p.subtitle_codec = AV_CODEC_ID_NONE,
159 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
161 .write_packet = ff_raw_write_packet,
162 .p.flags = AVFMT_NOTIMESTAMPS,
163};
164#endif
165
166#if CONFIG_CODEC2RAW_MUXER
168 .p.name = "codec2raw",
169 .p.long_name = NULL_IF_CONFIG_SMALL("raw codec2 muxer"),
170 .p.audio_codec = AV_CODEC_ID_CODEC2,
171 .p.video_codec = AV_CODEC_ID_NONE,
172 .p.subtitle_codec = AV_CODEC_ID_NONE,
173 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
175 .write_packet = ff_raw_write_packet,
176 .p.flags = AVFMT_NOTIMESTAMPS,
177};
178#endif
179
180
181#if CONFIG_DATA_MUXER
182static av_cold int force_one_stream(AVFormatContext *s)
183{
184 if (s->nb_streams != 1) {
185 av_log(s, AV_LOG_ERROR, "This muxer supports only one stream.\n");
186 return AVERROR(EINVAL);
187 }
188 return 0;
189}
190
192 .p.name = "data",
193 .p.long_name = NULL_IF_CONFIG_SMALL("raw data"),
194 .init = force_one_stream,
195 .write_packet = ff_raw_write_packet,
196 .p.flags = AVFMT_NOTIMESTAMPS,
197};
198#endif
199
200#if CONFIG_DFPWM_MUXER
202 .p.name = "dfpwm",
203 .p.long_name = NULL_IF_CONFIG_SMALL("raw DFPWM1a"),
204 .p.extensions = "dfpwm",
205 .p.audio_codec = AV_CODEC_ID_DFPWM,
206 .p.video_codec = AV_CODEC_ID_NONE,
207 .p.subtitle_codec = AV_CODEC_ID_NONE,
208 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
210 .write_packet = ff_raw_write_packet,
211 .p.flags = AVFMT_NOTIMESTAMPS,
212};
213#endif
214
215#if CONFIG_DIRAC_MUXER
217 .p.name = "dirac",
218 .p.long_name = NULL_IF_CONFIG_SMALL("raw Dirac"),
219 .p.extensions = "drc,vc2",
220 .p.audio_codec = AV_CODEC_ID_NONE,
221 .p.video_codec = AV_CODEC_ID_DIRAC,
222 .p.subtitle_codec = AV_CODEC_ID_NONE,
223 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
225 .write_packet = ff_raw_write_packet,
226 .p.flags = AVFMT_NOTIMESTAMPS,
227};
228#endif
229
230#if CONFIG_DNXHD_MUXER
232 .p.name = "dnxhd",
233 .p.long_name = NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
234 .p.extensions = "dnxhd,dnxhr",
235 .p.audio_codec = AV_CODEC_ID_NONE,
236 .p.video_codec = AV_CODEC_ID_DNXHD,
237 .p.subtitle_codec = AV_CODEC_ID_NONE,
238 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
240 .write_packet = ff_raw_write_packet,
241 .p.flags = AVFMT_NOTIMESTAMPS,
242};
243#endif
244
245#if CONFIG_DTS_MUXER
247 .p.name = "dts",
248 .p.long_name = NULL_IF_CONFIG_SMALL("raw DTS"),
249 .p.mime_type = "audio/x-dca",
250 .p.extensions = "dts",
251 .p.audio_codec = AV_CODEC_ID_DTS,
252 .p.video_codec = AV_CODEC_ID_NONE,
253 .p.subtitle_codec = AV_CODEC_ID_NONE,
254 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
256 .write_packet = ff_raw_write_packet,
257 .p.flags = AVFMT_NOTIMESTAMPS,
258};
259#endif
260
261#if CONFIG_EAC3_MUXER
263 .p.name = "eac3",
264 .p.long_name = NULL_IF_CONFIG_SMALL("raw E-AC-3"),
265 .p.mime_type = "audio/x-eac3",
266 .p.extensions = "eac3,ec3",
267 .p.audio_codec = AV_CODEC_ID_EAC3,
268 .p.video_codec = AV_CODEC_ID_NONE,
269 .p.subtitle_codec = AV_CODEC_ID_NONE,
270 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
272 .write_packet = ff_raw_write_packet,
273 .p.flags = AVFMT_NOTIMESTAMPS,
274};
275#endif
276
277#if CONFIG_G722_MUXER
279 .p.name = "g722",
280 .p.long_name = NULL_IF_CONFIG_SMALL("raw G.722"),
281 .p.mime_type = "audio/G722",
282 .p.extensions = "g722",
283 .p.audio_codec = AV_CODEC_ID_ADPCM_G722,
284 .p.video_codec = AV_CODEC_ID_NONE,
285 .p.subtitle_codec = AV_CODEC_ID_NONE,
286 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
288 .write_packet = ff_raw_write_packet,
289 .p.flags = AVFMT_NOTIMESTAMPS,
290};
291#endif
292
293#if CONFIG_G723_1_MUXER
295 .p.name = "g723_1",
296 .p.long_name = NULL_IF_CONFIG_SMALL("raw G.723.1"),
297 .p.mime_type = "audio/g723",
298 .p.extensions = "tco,rco",
299 .p.audio_codec = AV_CODEC_ID_G723_1,
300 .p.video_codec = AV_CODEC_ID_NONE,
301 .p.subtitle_codec = AV_CODEC_ID_NONE,
302 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
304 .write_packet = ff_raw_write_packet,
305 .p.flags = AVFMT_NOTIMESTAMPS,
306};
307#endif
308
309#if CONFIG_G726_MUXER
311 .p.name = "g726",
312 .p.long_name = NULL_IF_CONFIG_SMALL("raw big-endian G.726 (\"left-justified\")"),
313 .p.audio_codec = AV_CODEC_ID_ADPCM_G726,
314 .p.video_codec = AV_CODEC_ID_NONE,
315 .p.subtitle_codec = AV_CODEC_ID_NONE,
316 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
318 .write_packet = ff_raw_write_packet,
319 .p.flags = AVFMT_NOTIMESTAMPS,
320};
321#endif
322
323#if CONFIG_G726LE_MUXER
325 .p.name = "g726le",
326 .p.long_name = NULL_IF_CONFIG_SMALL("raw little-endian G.726 (\"right-justified\")"),
327 .p.audio_codec = AV_CODEC_ID_ADPCM_G726LE,
328 .p.video_codec = AV_CODEC_ID_NONE,
329 .p.subtitle_codec = AV_CODEC_ID_NONE,
330 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
332 .write_packet = ff_raw_write_packet,
333 .p.flags = AVFMT_NOTIMESTAMPS,
334};
335#endif
336
337#if CONFIG_GSM_MUXER
339 .p.name = "gsm",
340 .p.long_name = NULL_IF_CONFIG_SMALL("raw GSM"),
341 .p.mime_type = "audio/x-gsm",
342 .p.extensions = "gsm",
343 .p.audio_codec = AV_CODEC_ID_GSM,
344 .p.video_codec = AV_CODEC_ID_NONE,
345 .p.subtitle_codec = AV_CODEC_ID_NONE,
346 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
348 .write_packet = ff_raw_write_packet,
349 .p.flags = AVFMT_NOTIMESTAMPS,
350};
351#endif
352
353#if CONFIG_H261_MUXER
355 .p.name = "h261",
356 .p.long_name = NULL_IF_CONFIG_SMALL("raw H.261"),
357 .p.mime_type = "video/x-h261",
358 .p.extensions = "h261",
359 .p.audio_codec = AV_CODEC_ID_NONE,
360 .p.video_codec = AV_CODEC_ID_H261,
361 .p.subtitle_codec = AV_CODEC_ID_NONE,
362 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
364 .write_packet = ff_raw_write_packet,
365 .p.flags = AVFMT_NOTIMESTAMPS,
366};
367#endif
368
369#if CONFIG_H263_MUXER
371 .p.name = "h263",
372 .p.long_name = NULL_IF_CONFIG_SMALL("raw H.263"),
373 .p.mime_type = "video/x-h263",
374 .p.extensions = "h263",
375 .p.audio_codec = AV_CODEC_ID_NONE,
376 .p.video_codec = AV_CODEC_ID_H263,
377 .p.subtitle_codec = AV_CODEC_ID_NONE,
378 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
380 .write_packet = ff_raw_write_packet,
381 .p.flags = AVFMT_NOTIMESTAMPS,
382};
383#endif
384
385#if CONFIG_H264_MUXER
386static int h264_check_bitstream(AVFormatContext *s, AVStream *st,
387 const AVPacket *pkt)
388{
389 if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 &&
390 AV_RB24(pkt->data) != 0x000001)
391 return ff_stream_add_bitstream_filter(st, "h264_mp4toannexb", NULL);
392 return 1;
393}
394
396 .p.name = "h264",
397 .p.long_name = NULL_IF_CONFIG_SMALL("raw H.264 video"),
398 .p.extensions = "h264,264",
399 .p.audio_codec = AV_CODEC_ID_NONE,
400 .p.video_codec = AV_CODEC_ID_H264,
401 .p.subtitle_codec = AV_CODEC_ID_NONE,
402 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
404 .write_packet = ff_raw_write_packet,
405 .check_bitstream = h264_check_bitstream,
406 .p.flags = AVFMT_NOTIMESTAMPS,
407};
408#endif
409
410#if CONFIG_VVC_MUXER
411static int vvc_check_bitstream(AVFormatContext *s, AVStream *st,
412 const AVPacket *pkt)
413{
414 if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 &&
415 AV_RB24(pkt->data) != 0x000001)
416 return ff_stream_add_bitstream_filter(st, "vvc_mp4toannexb", NULL);
417 return 1;
418}
419
421 .p.name = "vvc",
422 .p.long_name = NULL_IF_CONFIG_SMALL("raw H.266/VVC video"),
423 .p.extensions = "vvc,h266,266",
424 .p.audio_codec = AV_CODEC_ID_NONE,
425 .p.video_codec = AV_CODEC_ID_VVC,
426 .p.subtitle_codec = AV_CODEC_ID_NONE,
427 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
429 .write_packet = ff_raw_write_packet,
430 .check_bitstream = vvc_check_bitstream,
431 .p.flags = AVFMT_NOTIMESTAMPS,
432};
433#endif
434
435#if CONFIG_HEVC_MUXER
436static int hevc_check_bitstream(AVFormatContext *s, AVStream *st,
437 const AVPacket *pkt)
438{
439 if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 &&
440 AV_RB24(pkt->data) != 0x000001)
441 return ff_stream_add_bitstream_filter(st, "hevc_mp4toannexb", NULL);
442 return 1;
443}
444
446 .p.name = "hevc",
447 .p.long_name = NULL_IF_CONFIG_SMALL("raw HEVC video"),
448 .p.extensions = "hevc,h265,265",
449 .p.audio_codec = AV_CODEC_ID_NONE,
450 .p.video_codec = AV_CODEC_ID_HEVC,
451 .p.subtitle_codec = AV_CODEC_ID_NONE,
452 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
454 .write_packet = ff_raw_write_packet,
455 .check_bitstream = hevc_check_bitstream,
456 .p.flags = AVFMT_NOTIMESTAMPS,
457};
458#endif
459
460#if CONFIG_EVC_MUXER
462 .p.name = "evc",
463 .p.long_name = NULL_IF_CONFIG_SMALL("raw EVC video"),
464 .p.extensions = "evc",
465 .p.audio_codec = AV_CODEC_ID_NONE,
466 .p.video_codec = AV_CODEC_ID_EVC,
467 .p.subtitle_codec = AV_CODEC_ID_NONE,
468 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
470 .write_packet = ff_raw_write_packet,
471 .p.flags = AVFMT_NOTIMESTAMPS,
472};
473#endif
474
475#if CONFIG_M4V_MUXER
477 .p.name = "m4v",
478 .p.long_name = NULL_IF_CONFIG_SMALL("raw MPEG-4 video"),
479 .p.extensions = "m4v",
480 .p.audio_codec = AV_CODEC_ID_NONE,
481 .p.video_codec = AV_CODEC_ID_MPEG4,
482 .p.subtitle_codec = AV_CODEC_ID_NONE,
483 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
485 .write_packet = ff_raw_write_packet,
486 .p.flags = AVFMT_NOTIMESTAMPS,
487};
488#endif
489
490#if CONFIG_MJPEG_MUXER
492 .p.name = "mjpeg",
493 .p.long_name = NULL_IF_CONFIG_SMALL("raw MJPEG video"),
494 .p.mime_type = "video/x-mjpeg",
495 .p.extensions = "mjpg,mjpeg",
496 .p.audio_codec = AV_CODEC_ID_NONE,
497 .p.video_codec = AV_CODEC_ID_MJPEG,
498 .p.subtitle_codec = AV_CODEC_ID_NONE,
499 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
501 .write_packet = ff_raw_write_packet,
502 .p.flags = AVFMT_NOTIMESTAMPS,
503};
504#endif
505
506#if CONFIG_MLP_MUXER
508 .p.name = "mlp",
509 .p.long_name = NULL_IF_CONFIG_SMALL("raw MLP"),
510 .p.extensions = "mlp",
511 .p.audio_codec = AV_CODEC_ID_MLP,
512 .p.video_codec = AV_CODEC_ID_NONE,
513 .p.subtitle_codec = AV_CODEC_ID_NONE,
514 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
516 .write_packet = ff_raw_write_packet,
517 .p.flags = AVFMT_NOTIMESTAMPS,
518};
519#endif
520
521#if CONFIG_MP2_MUXER
523 .p.name = "mp2",
524 .p.long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
525 .p.mime_type = "audio/mpeg",
526 .p.extensions = "mp2,m2a,mpa",
527 .p.audio_codec = AV_CODEC_ID_MP2,
528 .p.video_codec = AV_CODEC_ID_NONE,
529 .p.subtitle_codec = AV_CODEC_ID_NONE,
530 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
532 .write_packet = ff_raw_write_packet,
533 .p.flags = AVFMT_NOTIMESTAMPS,
534};
535#endif
536
537#if CONFIG_MPEG1VIDEO_MUXER
539 .p.name = "mpeg1video",
540 .p.long_name = NULL_IF_CONFIG_SMALL("raw MPEG-1 video"),
541 .p.mime_type = "video/mpeg",
542 .p.extensions = "mpg,mpeg,m1v",
543 .p.audio_codec = AV_CODEC_ID_NONE,
544 .p.video_codec = AV_CODEC_ID_MPEG1VIDEO,
545 .p.subtitle_codec = AV_CODEC_ID_NONE,
546 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
548 .write_packet = ff_raw_write_packet,
549 .p.flags = AVFMT_NOTIMESTAMPS,
550};
551#endif
552
553#if CONFIG_MPEG2VIDEO_MUXER
555 .p.name = "mpeg2video",
556 .p.long_name = NULL_IF_CONFIG_SMALL("raw MPEG-2 video"),
557 .p.extensions = "m2v",
558 .p.audio_codec = AV_CODEC_ID_NONE,
559 .p.video_codec = AV_CODEC_ID_MPEG2VIDEO,
560 .p.subtitle_codec = AV_CODEC_ID_NONE,
561 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
563 .write_packet = ff_raw_write_packet,
564 .p.flags = AVFMT_NOTIMESTAMPS,
565};
566#endif
567
568#if CONFIG_OBU_MUXER
569static int obu_check_bitstream(AVFormatContext *s, AVStream *st,
570 const AVPacket *pkt)
571{
572 return ff_stream_add_bitstream_filter(st, "av1_metadata", "td=insert");
573}
574
576 .p.name = "obu",
577 .p.long_name = NULL_IF_CONFIG_SMALL("AV1 low overhead OBU"),
578 .p.extensions = "obu",
579 .p.audio_codec = AV_CODEC_ID_NONE,
580 .p.video_codec = AV_CODEC_ID_AV1,
581 .p.subtitle_codec = AV_CODEC_ID_NONE,
582 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
584 .write_packet = ff_raw_write_packet,
585 .check_bitstream = obu_check_bitstream,
586 .p.flags = AVFMT_NOTIMESTAMPS,
587};
588#endif
589
590#if CONFIG_RAWVIDEO_MUXER
592 .p.name = "rawvideo",
593 .p.long_name = NULL_IF_CONFIG_SMALL("raw video"),
594 .p.extensions = "yuv,rgb",
595 .p.audio_codec = AV_CODEC_ID_NONE,
596 .p.video_codec = AV_CODEC_ID_RAWVIDEO,
597 .p.subtitle_codec = AV_CODEC_ID_NONE,
598 .write_packet = ff_raw_write_packet,
599 .p.flags = AVFMT_NOTIMESTAMPS,
600};
601#endif
602
603#if CONFIG_SBC_MUXER
605 .p.name = "sbc",
606 .p.long_name = NULL_IF_CONFIG_SMALL("raw SBC"),
607 .p.mime_type = "audio/x-sbc",
608 .p.extensions = "sbc,msbc",
609 .p.audio_codec = AV_CODEC_ID_SBC,
610 .p.video_codec = AV_CODEC_ID_NONE,
611 .p.subtitle_codec = AV_CODEC_ID_NONE,
612 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
614 .write_packet = ff_raw_write_packet,
615 .p.flags = AVFMT_NOTIMESTAMPS,
616};
617#endif
618
619#if CONFIG_TRUEHD_MUXER
621 .p.name = "truehd",
622 .p.long_name = NULL_IF_CONFIG_SMALL("raw TrueHD"),
623 .p.extensions = "thd",
624 .p.audio_codec = AV_CODEC_ID_TRUEHD,
625 .p.video_codec = AV_CODEC_ID_NONE,
626 .p.subtitle_codec = AV_CODEC_ID_NONE,
627 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
629 .write_packet = ff_raw_write_packet,
630 .p.flags = AVFMT_NOTIMESTAMPS,
631};
632#endif
633
634#if CONFIG_VC1_MUXER
636 .p.name = "vc1",
637 .p.long_name = NULL_IF_CONFIG_SMALL("raw VC-1 video"),
638 .p.extensions = "vc1",
639 .p.audio_codec = AV_CODEC_ID_NONE,
640 .p.video_codec = AV_CODEC_ID_VC1,
641 .p.subtitle_codec = AV_CODEC_ID_NONE,
642 .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
644 .write_packet = ff_raw_write_packet,
645 .p.flags = AVFMT_NOTIMESTAMPS,
646};
647#endif
const FFOutputFormat ff_mpeg2video_muxer
const FFOutputFormat ff_eac3_muxer
const FFOutputFormat ff_gsm_muxer
const FFOutputFormat ff_avs2_muxer
const FFOutputFormat ff_h264_muxer
const FFOutputFormat ff_m4v_muxer
const FFOutputFormat ff_mjpeg_muxer
const FFOutputFormat ff_h261_muxer
const FFOutputFormat ff_h263_muxer
const FFOutputFormat ff_sbc_muxer
const FFOutputFormat ff_data_muxer
const FFOutputFormat ff_dnxhd_muxer
const FFOutputFormat ff_mpeg1video_muxer
const FFOutputFormat ff_mp2_muxer
const FFOutputFormat ff_evc_muxer
const FFOutputFormat ff_vc1_muxer
const FFOutputFormat ff_aptx_hd_muxer
const FFOutputFormat ff_dts_muxer
const FFOutputFormat ff_mlp_muxer
const FFOutputFormat ff_ac3_muxer
const FFOutputFormat ff_aptx_muxer
const FFOutputFormat ff_dfpwm_muxer
const FFOutputFormat ff_vvc_muxer
const FFOutputFormat ff_cavsvideo_muxer
const FFOutputFormat ff_g722_muxer
const FFOutputFormat ff_avs3_muxer
const FFOutputFormat ff_dirac_muxer
const FFOutputFormat ff_g726_muxer
const FFOutputFormat ff_hevc_muxer
const FFOutputFormat ff_rawvideo_muxer
const FFOutputFormat ff_codec2raw_muxer
const FFOutputFormat ff_truehd_muxer
const FFOutputFormat ff_adx_muxer
const FFOutputFormat ff_g723_1_muxer
const FFOutputFormat ff_obu_muxer
const FFOutputFormat ff_g726le_muxer
Main libavformat public API header.
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition avformat.h:498
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
Definition aviobuf.c:236
#define AVIO_SEEKABLE_NORMAL
Seeking works like for a local file.
Definition avio.h:41
void avio_wb32(AVIOContext *s, unsigned int val)
Definition aviobuf.c:368
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
Definition avio.h:494
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
Definition aviobuf.c:206
#define s(width, name)
Definition cbs_vp9.c:198
#define NULL
Definition coverity.c:32
long long int64_t
Definition coverity.c:34
static AVPacket * pkt
@ AV_CODEC_ID_DIRAC
Definition codec_id.h:166
@ AV_CODEC_ID_G723_1
Definition codec_id.h:505
@ AV_CODEC_ID_AVS3
Definition codec_id.h:245
@ AV_CODEC_ID_H261
Definition codec_id.h:53
@ AV_CODEC_ID_EAC3
Definition codec_id.h:493
@ AV_CODEC_ID_RAWVIDEO
Definition codec_id.h:63
@ AV_CODEC_ID_GSM
as in Berlin toast format
Definition codec_id.h:471
@ AV_CODEC_ID_ADPCM_G722
Definition codec_id.h:398
@ AV_CODEC_ID_H264
Definition codec_id.h:77
@ AV_CODEC_ID_SBC
Definition codec_id.h:540
@ AV_CODEC_ID_APTX
Definition codec_id.h:538
@ AV_CODEC_ID_NONE
Definition codec_id.h:48
@ AV_CODEC_ID_VVC
Definition codec_id.h:247
@ AV_CODEC_ID_APTX_HD
Definition codec_id.h:539
@ AV_CODEC_ID_ADPCM_G726LE
Definition codec_id.h:405
@ AV_CODEC_ID_AV1
Definition codec_id.h:275
@ AV_CODEC_ID_ADPCM_ADX
Definition codec_id.h:379
@ AV_CODEC_ID_VC1
Definition codec_id.h:120
@ AV_CODEC_ID_CAVS
Definition codec_id.h:137
@ AV_CODEC_ID_CODEC2
Definition codec_id.h:520
@ AV_CODEC_ID_MP2
Definition codec_id.h:453
@ AV_CODEC_ID_DTS
Definition codec_id.h:457
@ AV_CODEC_ID_HEVC
Definition codec_id.h:223
@ AV_CODEC_ID_ADPCM_G726
Definition codec_id.h:381
@ AV_CODEC_ID_TRUEHD
Definition codec_id.h:497
@ AV_CODEC_ID_H263
Definition codec_id.h:54
@ AV_CODEC_ID_AC3
Definition codec_id.h:456
@ AV_CODEC_ID_DNXHD
Definition codec_id.h:149
@ AV_CODEC_ID_MLP
Definition codec_id.h:482
@ AV_CODEC_ID_MPEG4
Definition codec_id.h:62
@ AV_CODEC_ID_MJPEG
Definition codec_id.h:57
@ AV_CODEC_ID_AVS2
Definition codec_id.h:243
@ AV_CODEC_ID_EVC
Definition codec_id.h:316
@ AV_CODEC_ID_DFPWM
Definition codec_id.h:549
@ AV_CODEC_ID_MPEG1VIDEO
Definition codec_id.h:51
@ AV_CODEC_ID_MPEG2VIDEO
preferred ID for MPEG-1/2 video decoding
Definition codec_id.h:52
#define AVERROR(e)
Definition error.h:45
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition log.h:210
#define AV_RB32(p)
#define AV_RB24(x)
int ff_stream_add_bitstream_filter(AVStream *st, const char *name, const char *args)
Add a bitstream filter to a stream.
Definition mux.c:1294
int ff_raw_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition rawenc.c:31
#define av_cold
Definition attributes.h:117
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88
#define FF_OFMT_FLAG_MAX_ONE_OF_EACH
If this flag is set, it indicates that for each codec type whose corresponding default codec (i....
Definition mux.h:50
#define FF_OFMT_FLAG_ONLY_DEFAULT_CODECS
If this flag is set, then the only permitted audio/video/subtitle codec ids are AVOutputFormat....
Definition mux.h:59
int nb_channels
Number of channels in this layout.
This struct describes the properties of an encoded stream.
Definition codec_par.h:49
AVChannelLayout ch_layout
The channel layout and number of channels.
Definition codec_par.h:207
Format I/O context.
Definition avformat.h:1333
Bytestream IO Context.
Definition avio.h:160
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
Definition avio.h:261
This structure stores compressed data.
Definition packet.h:580
Stream structure.
Definition avformat.h:766
#define av_log(a,...)