FFmpeg coverage


Directory: ../../../ffmpeg/
File: src/libavformat/rawenc.c
Date: 2023-10-02 11:06:47
Exec Total Coverage
Lines: 34 47 72.3%
Functions: 6 7 85.7%
Branches: 19 32 59.4%

Line Branch Exec Source
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
31 223446 int ff_raw_write_packet(AVFormatContext *s, AVPacket *pkt)
32 {
33 223446 avio_write(s->pb, pkt->data, pkt->size);
34 223446 return 0;
35 }
36
37 169 static int force_one_stream(AVFormatContext *s)
38 {
39
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 169 times.
169 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
2/2
✓ Branch 0 taken 16 times.
✓ Branch 1 taken 153 times.
169 if ( s->oformat->audio_codec != AV_CODEC_ID_NONE
45
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 16 times.
16 && 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
2/2
✓ Branch 0 taken 153 times.
✓ Branch 1 taken 16 times.
169 if ( s->oformat->video_codec != AV_CODEC_ID_NONE
51
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 153 times.
153 && 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 169 return 0;
57 }
58
59 /* Note: Do not forget to add new entries to the Makefile as well. */
60
61 #if CONFIG_AC3_MUXER
62 const FFOutputFormat ff_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 1 static int adx_write_trailer(AVFormatContext *s)
78 {
79 1 AVIOContext *pb = s->pb;
80 1 AVCodecParameters *par = s->streams[0]->codecpar;
81
82
1/2
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
1 if (pb->seekable & AVIO_SEEKABLE_NORMAL) {
83 1 int64_t file_size = avio_tell(pb);
84 1 uint64_t sample_count = (file_size - 36) / par->ch_layout.nb_channels / 18 * 32;
85
1/2
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
1 if (sample_count <= UINT32_MAX) {
86 1 avio_seek(pb, 12, SEEK_SET);
87 1 avio_wb32(pb, sample_count);
88 1 avio_seek(pb, file_size, SEEK_SET);
89 }
90 }
91
92 1 return 0;
93 }
94
95 const FFOutputFormat ff_adx_muxer = {
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
109 const FFOutputFormat ff_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
122 const FFOutputFormat ff_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
135 const FFOutputFormat ff_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
148 const FFOutputFormat ff_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
162 const FFOutputFormat ff_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
175 const FFOutputFormat ff_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
188 const FFOutputFormat ff_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
198 const FFOutputFormat ff_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
211 const FFOutputFormat ff_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
224 const FFOutputFormat ff_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
237 const FFOutputFormat ff_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
251 const FFOutputFormat ff_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
265 const FFOutputFormat ff_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
279 const FFOutputFormat ff_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
293 const FFOutputFormat ff_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
305 const FFOutputFormat ff_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
317 const FFOutputFormat ff_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
331 const FFOutputFormat ff_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
345 const FFOutputFormat ff_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 25 static int h264_check_bitstream(AVFormatContext *s, AVStream *st,
360 const AVPacket *pkt)
361 {
362
3/4
✓ Branch 0 taken 25 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 23 times.
25 if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 &&
363
1/2
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
2 AV_RB24(pkt->data) != 0x000001)
364 2 return ff_stream_add_bitstream_filter(st, "h264_mp4toannexb", NULL);
365 23 return 1;
366 }
367
368 const FFOutputFormat ff_h264_muxer = {
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_VVC_MUXER
382 26 static int vvc_check_bitstream(AVFormatContext *s, AVStream *st,
383 const AVPacket *pkt)
384 {
385
2/4
✓ Branch 0 taken 26 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 26 times.
26 if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 &&
386 AV_RB24(pkt->data) != 0x000001)
387 return ff_stream_add_bitstream_filter(st, "vvc_mp4toannexb", NULL);
388 26 return 1;
389 }
390
391 const FFOutputFormat ff_vvc_muxer = {
392 .p.name = "vvc",
393 .p.long_name = NULL_IF_CONFIG_SMALL("raw H.266/VVC video"),
394 .p.extensions = "vvc,h266,266",
395 .p.audio_codec = AV_CODEC_ID_NONE,
396 .p.video_codec = AV_CODEC_ID_VVC,
397 .init = force_one_stream,
398 .write_packet = ff_raw_write_packet,
399 .check_bitstream = vvc_check_bitstream,
400 .p.flags = AVFMT_NOTIMESTAMPS,
401 };
402 #endif
403
404 #if CONFIG_HEVC_MUXER
405 25 static int hevc_check_bitstream(AVFormatContext *s, AVStream *st,
406 const AVPacket *pkt)
407 {
408
3/4
✓ Branch 0 taken 25 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 24 times.
25 if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x0000001 &&
409
1/2
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
1 AV_RB24(pkt->data) != 0x000001)
410 1 return ff_stream_add_bitstream_filter(st, "hevc_mp4toannexb", NULL);
411 24 return 1;
412 }
413
414 const FFOutputFormat ff_hevc_muxer = {
415 .p.name = "hevc",
416 .p.long_name = NULL_IF_CONFIG_SMALL("raw HEVC video"),
417 .p.extensions = "hevc,h265,265",
418 .p.audio_codec = AV_CODEC_ID_NONE,
419 .p.video_codec = AV_CODEC_ID_HEVC,
420 .init = force_one_stream,
421 .write_packet = ff_raw_write_packet,
422 .check_bitstream = hevc_check_bitstream,
423 .p.flags = AVFMT_NOTIMESTAMPS,
424 };
425 #endif
426
427 #if CONFIG_EVC_MUXER
428 const FFOutputFormat ff_evc_muxer = {
429 .p.name = "evc",
430 .p.long_name = NULL_IF_CONFIG_SMALL("raw EVC video"),
431 .p.extensions = "evc",
432 .p.audio_codec = AV_CODEC_ID_NONE,
433 .p.video_codec = AV_CODEC_ID_EVC,
434 .init = force_one_stream,
435 .write_packet = ff_raw_write_packet,
436 .p.flags = AVFMT_NOTIMESTAMPS,
437 };
438 #endif
439
440 #if CONFIG_M4V_MUXER
441 const FFOutputFormat ff_m4v_muxer = {
442 .p.name = "m4v",
443 .p.long_name = NULL_IF_CONFIG_SMALL("raw MPEG-4 video"),
444 .p.extensions = "m4v",
445 .p.audio_codec = AV_CODEC_ID_NONE,
446 .p.video_codec = AV_CODEC_ID_MPEG4,
447 .init = force_one_stream,
448 .write_packet = ff_raw_write_packet,
449 .p.flags = AVFMT_NOTIMESTAMPS,
450 };
451 #endif
452
453 #if CONFIG_MJPEG_MUXER
454 const FFOutputFormat ff_mjpeg_muxer = {
455 .p.name = "mjpeg",
456 .p.long_name = NULL_IF_CONFIG_SMALL("raw MJPEG video"),
457 .p.mime_type = "video/x-mjpeg",
458 .p.extensions = "mjpg,mjpeg",
459 .p.audio_codec = AV_CODEC_ID_NONE,
460 .p.video_codec = AV_CODEC_ID_MJPEG,
461 .init = force_one_stream,
462 .write_packet = ff_raw_write_packet,
463 .p.flags = AVFMT_NOTIMESTAMPS,
464 };
465 #endif
466
467 #if CONFIG_MLP_MUXER
468 const FFOutputFormat ff_mlp_muxer = {
469 .p.name = "mlp",
470 .p.long_name = NULL_IF_CONFIG_SMALL("raw MLP"),
471 .p.extensions = "mlp",
472 .p.audio_codec = AV_CODEC_ID_MLP,
473 .p.video_codec = AV_CODEC_ID_NONE,
474 .init = force_one_stream,
475 .write_packet = ff_raw_write_packet,
476 .p.flags = AVFMT_NOTIMESTAMPS,
477 };
478 #endif
479
480 #if CONFIG_MP2_MUXER
481 const FFOutputFormat ff_mp2_muxer = {
482 .p.name = "mp2",
483 .p.long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
484 .p.mime_type = "audio/mpeg",
485 .p.extensions = "mp2,m2a,mpa",
486 .p.audio_codec = AV_CODEC_ID_MP2,
487 .p.video_codec = AV_CODEC_ID_NONE,
488 .init = force_one_stream,
489 .write_packet = ff_raw_write_packet,
490 .p.flags = AVFMT_NOTIMESTAMPS,
491 };
492 #endif
493
494 #if CONFIG_MPEG1VIDEO_MUXER
495 const FFOutputFormat ff_mpeg1video_muxer = {
496 .p.name = "mpeg1video",
497 .p.long_name = NULL_IF_CONFIG_SMALL("raw MPEG-1 video"),
498 .p.mime_type = "video/mpeg",
499 .p.extensions = "mpg,mpeg,m1v",
500 .p.audio_codec = AV_CODEC_ID_NONE,
501 .p.video_codec = AV_CODEC_ID_MPEG1VIDEO,
502 .init = force_one_stream,
503 .write_packet = ff_raw_write_packet,
504 .p.flags = AVFMT_NOTIMESTAMPS,
505 };
506 #endif
507
508 #if CONFIG_MPEG2VIDEO_MUXER
509 const FFOutputFormat ff_mpeg2video_muxer = {
510 .p.name = "mpeg2video",
511 .p.long_name = NULL_IF_CONFIG_SMALL("raw MPEG-2 video"),
512 .p.extensions = "m2v",
513 .p.audio_codec = AV_CODEC_ID_NONE,
514 .p.video_codec = AV_CODEC_ID_MPEG2VIDEO,
515 .init = force_one_stream,
516 .write_packet = ff_raw_write_packet,
517 .p.flags = AVFMT_NOTIMESTAMPS,
518 };
519 #endif
520
521 #if CONFIG_OBU_MUXER
522 static int obu_check_bitstream(AVFormatContext *s, AVStream *st,
523 const AVPacket *pkt)
524 {
525 return ff_stream_add_bitstream_filter(st, "av1_metadata", "td=insert");
526 }
527
528 const FFOutputFormat ff_obu_muxer = {
529 .p.name = "obu",
530 .p.long_name = NULL_IF_CONFIG_SMALL("AV1 low overhead OBU"),
531 .p.extensions = "obu",
532 .p.audio_codec = AV_CODEC_ID_NONE,
533 .p.video_codec = AV_CODEC_ID_AV1,
534 .init = force_one_stream,
535 .write_packet = ff_raw_write_packet,
536 .check_bitstream = obu_check_bitstream,
537 .p.flags = AVFMT_NOTIMESTAMPS,
538 };
539 #endif
540
541 #if CONFIG_RAWVIDEO_MUXER
542 const FFOutputFormat ff_rawvideo_muxer = {
543 .p.name = "rawvideo",
544 .p.long_name = NULL_IF_CONFIG_SMALL("raw video"),
545 .p.extensions = "yuv,rgb",
546 .p.audio_codec = AV_CODEC_ID_NONE,
547 .p.video_codec = AV_CODEC_ID_RAWVIDEO,
548 .write_packet = ff_raw_write_packet,
549 .p.flags = AVFMT_NOTIMESTAMPS,
550 };
551 #endif
552
553 #if CONFIG_SBC_MUXER
554 const FFOutputFormat ff_sbc_muxer = {
555 .p.name = "sbc",
556 .p.long_name = NULL_IF_CONFIG_SMALL("raw SBC"),
557 .p.mime_type = "audio/x-sbc",
558 .p.extensions = "sbc,msbc",
559 .p.audio_codec = AV_CODEC_ID_SBC,
560 .init = force_one_stream,
561 .write_packet = ff_raw_write_packet,
562 .p.flags = AVFMT_NOTIMESTAMPS,
563 };
564 #endif
565
566 #if CONFIG_TRUEHD_MUXER
567 const FFOutputFormat ff_truehd_muxer = {
568 .p.name = "truehd",
569 .p.long_name = NULL_IF_CONFIG_SMALL("raw TrueHD"),
570 .p.extensions = "thd",
571 .p.audio_codec = AV_CODEC_ID_TRUEHD,
572 .p.video_codec = AV_CODEC_ID_NONE,
573 .init = force_one_stream,
574 .write_packet = ff_raw_write_packet,
575 .p.flags = AVFMT_NOTIMESTAMPS,
576 };
577 #endif
578
579 #if CONFIG_VC1_MUXER
580 const FFOutputFormat ff_vc1_muxer = {
581 .p.name = "vc1",
582 .p.long_name = NULL_IF_CONFIG_SMALL("raw VC-1 video"),
583 .p.extensions = "vc1",
584 .p.audio_codec = AV_CODEC_ID_NONE,
585 .p.video_codec = AV_CODEC_ID_VC1,
586 .init = force_one_stream,
587 .write_packet = ff_raw_write_packet,
588 .p.flags = AVFMT_NOTIMESTAMPS,
589 };
590 #endif
591