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  .name = "ac3",
64  .long_name = NULL_IF_CONFIG_SMALL("raw AC-3"),
65  .mime_type = "audio/x-ac3",
66  .extensions = "ac3",
67  .audio_codec = AV_CODEC_ID_AC3,
68  .video_codec = AV_CODEC_ID_NONE,
69  .init = force_one_stream,
70  .write_packet = ff_raw_write_packet,
71  .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  .name = "adx",
97  .long_name = NULL_IF_CONFIG_SMALL("CRI ADX"),
98  .extensions = "adx",
99  .audio_codec = AV_CODEC_ID_ADPCM_ADX,
100  .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  .flags = AVFMT_NOTIMESTAMPS,
105 };
106 #endif
107 
108 #if CONFIG_APTX_MUXER
110  .name = "aptx",
111  .long_name = NULL_IF_CONFIG_SMALL("raw aptX (Audio Processing Technology for Bluetooth)"),
112  .extensions = "aptx",
113  .audio_codec = AV_CODEC_ID_APTX,
114  .video_codec = AV_CODEC_ID_NONE,
115  .init = force_one_stream,
116  .write_packet = ff_raw_write_packet,
117  .flags = AVFMT_NOTIMESTAMPS,
118 };
119 #endif
120 
121 #if CONFIG_APTX_HD_MUXER
123  .name = "aptx_hd",
124  .long_name = NULL_IF_CONFIG_SMALL("raw aptX HD (Audio Processing Technology for Bluetooth)"),
125  .extensions = "aptxhd",
126  .audio_codec = AV_CODEC_ID_APTX_HD,
127  .video_codec = AV_CODEC_ID_NONE,
128  .init = force_one_stream,
129  .write_packet = ff_raw_write_packet,
130  .flags = AVFMT_NOTIMESTAMPS,
131 };
132 #endif
133 
134 #if CONFIG_AVS2_MUXER
136  .name = "avs2",
137  .long_name = NULL_IF_CONFIG_SMALL("raw AVS2-P2/IEEE1857.4 video"),
138  .extensions = "avs,avs2",
139  .audio_codec = AV_CODEC_ID_NONE,
140  .video_codec = AV_CODEC_ID_AVS2,
141  .init = force_one_stream,
142  .write_packet = ff_raw_write_packet,
143  .flags = AVFMT_NOTIMESTAMPS,
144 };
145 #endif
146 
147 #if CONFIG_AVS3_MUXER
149  .name = "avs3",
150  .long_name = NULL_IF_CONFIG_SMALL("AVS3-P2/IEEE1857.10"),
151  .extensions = "avs3",
152  .audio_codec = AV_CODEC_ID_NONE,
153  .video_codec = AV_CODEC_ID_AVS3,
154  .init = force_one_stream,
155  .write_packet = ff_raw_write_packet,
156  .flags = AVFMT_NOTIMESTAMPS,
157 };
158 #endif
159 
160 
161 #if CONFIG_CAVSVIDEO_MUXER
163  .name = "cavsvideo",
164  .long_name = NULL_IF_CONFIG_SMALL("raw Chinese AVS (Audio Video Standard) video"),
165  .extensions = "cavs",
166  .audio_codec = AV_CODEC_ID_NONE,
167  .video_codec = AV_CODEC_ID_CAVS,
168  .init = force_one_stream,
169  .write_packet = ff_raw_write_packet,
170  .flags = AVFMT_NOTIMESTAMPS,
171 };
172 #endif
173 
174 #if CONFIG_CODEC2RAW_MUXER
176  .name = "codec2raw",
177  .long_name = NULL_IF_CONFIG_SMALL("raw codec2 muxer"),
178  .audio_codec = AV_CODEC_ID_CODEC2,
179  .video_codec = AV_CODEC_ID_NONE,
180  .init = force_one_stream,
181  .write_packet = ff_raw_write_packet,
182  .flags = AVFMT_NOTIMESTAMPS,
183 };
184 #endif
185 
186 
187 #if CONFIG_DATA_MUXER
189  .name = "data",
190  .long_name = NULL_IF_CONFIG_SMALL("raw data"),
191  .init = force_one_stream,
192  .write_packet = ff_raw_write_packet,
193  .flags = AVFMT_NOTIMESTAMPS,
194 };
195 #endif
196 
197 #if CONFIG_DFPWM_MUXER
199  .name = "dfpwm",
200  .long_name = NULL_IF_CONFIG_SMALL("raw DFPWM1a"),
201  .extensions = "dfpwm",
202  .audio_codec = AV_CODEC_ID_DFPWM,
203  .video_codec = AV_CODEC_ID_NONE,
204  .init = force_one_stream,
205  .write_packet = ff_raw_write_packet,
206  .flags = AVFMT_NOTIMESTAMPS,
207 };
208 #endif
209 
210 #if CONFIG_DIRAC_MUXER
212  .name = "dirac",
213  .long_name = NULL_IF_CONFIG_SMALL("raw Dirac"),
214  .extensions = "drc,vc2",
215  .audio_codec = AV_CODEC_ID_NONE,
216  .video_codec = AV_CODEC_ID_DIRAC,
217  .init = force_one_stream,
218  .write_packet = ff_raw_write_packet,
219  .flags = AVFMT_NOTIMESTAMPS,
220 };
221 #endif
222 
223 #if CONFIG_DNXHD_MUXER
225  .name = "dnxhd",
226  .long_name = NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
227  .extensions = "dnxhd,dnxhr",
228  .audio_codec = AV_CODEC_ID_NONE,
229  .video_codec = AV_CODEC_ID_DNXHD,
230  .init = force_one_stream,
231  .write_packet = ff_raw_write_packet,
232  .flags = AVFMT_NOTIMESTAMPS,
233 };
234 #endif
235 
236 #if CONFIG_DTS_MUXER
238  .name = "dts",
239  .long_name = NULL_IF_CONFIG_SMALL("raw DTS"),
240  .mime_type = "audio/x-dca",
241  .extensions = "dts",
242  .audio_codec = AV_CODEC_ID_DTS,
243  .video_codec = AV_CODEC_ID_NONE,
244  .init = force_one_stream,
245  .write_packet = ff_raw_write_packet,
246  .flags = AVFMT_NOTIMESTAMPS,
247 };
248 #endif
249 
250 #if CONFIG_EAC3_MUXER
252  .name = "eac3",
253  .long_name = NULL_IF_CONFIG_SMALL("raw E-AC-3"),
254  .mime_type = "audio/x-eac3",
255  .extensions = "eac3",
256  .audio_codec = AV_CODEC_ID_EAC3,
257  .video_codec = AV_CODEC_ID_NONE,
258  .init = force_one_stream,
259  .write_packet = ff_raw_write_packet,
260  .flags = AVFMT_NOTIMESTAMPS,
261 };
262 #endif
263 
264 #if CONFIG_G722_MUXER
266  .name = "g722",
267  .long_name = NULL_IF_CONFIG_SMALL("raw G.722"),
268  .mime_type = "audio/G722",
269  .extensions = "g722",
270  .audio_codec = AV_CODEC_ID_ADPCM_G722,
271  .video_codec = AV_CODEC_ID_NONE,
272  .init = force_one_stream,
273  .write_packet = ff_raw_write_packet,
274  .flags = AVFMT_NOTIMESTAMPS,
275 };
276 #endif
277 
278 #if CONFIG_G723_1_MUXER
280  .name = "g723_1",
281  .long_name = NULL_IF_CONFIG_SMALL("raw G.723.1"),
282  .mime_type = "audio/g723",
283  .extensions = "tco,rco",
284  .audio_codec = AV_CODEC_ID_G723_1,
285  .video_codec = AV_CODEC_ID_NONE,
286  .init = force_one_stream,
287  .write_packet = ff_raw_write_packet,
288  .flags = AVFMT_NOTIMESTAMPS,
289 };
290 #endif
291 
292 #if CONFIG_G726_MUXER
294  .name = "g726",
295  .long_name = NULL_IF_CONFIG_SMALL("raw big-endian G.726 (\"left-justified\")"),
296  .audio_codec = AV_CODEC_ID_ADPCM_G726,
297  .video_codec = AV_CODEC_ID_NONE,
298  .init = force_one_stream,
299  .write_packet = ff_raw_write_packet,
300  .flags = AVFMT_NOTIMESTAMPS,
301 };
302 #endif
303 
304 #if CONFIG_G726LE_MUXER
306  .name = "g726le",
307  .long_name = NULL_IF_CONFIG_SMALL("raw little-endian G.726 (\"right-justified\")"),
308  .audio_codec = AV_CODEC_ID_ADPCM_G726LE,
309  .video_codec = AV_CODEC_ID_NONE,
310  .init = force_one_stream,
311  .write_packet = ff_raw_write_packet,
312  .flags = AVFMT_NOTIMESTAMPS,
313 };
314 #endif
315 
316 #if CONFIG_GSM_MUXER
318  .name = "gsm",
319  .long_name = NULL_IF_CONFIG_SMALL("raw GSM"),
320  .mime_type = "audio/x-gsm",
321  .extensions = "gsm",
322  .audio_codec = AV_CODEC_ID_GSM,
323  .video_codec = AV_CODEC_ID_NONE,
324  .init = force_one_stream,
325  .write_packet = ff_raw_write_packet,
326  .flags = AVFMT_NOTIMESTAMPS,
327 };
328 #endif
329 
330 #if CONFIG_H261_MUXER
332  .name = "h261",
333  .long_name = NULL_IF_CONFIG_SMALL("raw H.261"),
334  .mime_type = "video/x-h261",
335  .extensions = "h261",
336  .audio_codec = AV_CODEC_ID_NONE,
337  .video_codec = AV_CODEC_ID_H261,
338  .init = force_one_stream,
339  .write_packet = ff_raw_write_packet,
340  .flags = AVFMT_NOTIMESTAMPS,
341 };
342 #endif
343 
344 #if CONFIG_H263_MUXER
346  .name = "h263",
347  .long_name = NULL_IF_CONFIG_SMALL("raw H.263"),
348  .mime_type = "video/x-h263",
349  .extensions = "h263",
350  .audio_codec = AV_CODEC_ID_NONE,
351  .video_codec = AV_CODEC_ID_H263,
352  .init = force_one_stream,
353  .write_packet = ff_raw_write_packet,
354  .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  .name = "h264",
370  .long_name = NULL_IF_CONFIG_SMALL("raw H.264 video"),
371  .extensions = "h264,264",
372  .audio_codec = AV_CODEC_ID_NONE,
373  .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  .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  .name = "hevc",
393  .long_name = NULL_IF_CONFIG_SMALL("raw HEVC video"),
394  .extensions = "hevc,h265,265",
395  .audio_codec = AV_CODEC_ID_NONE,
396  .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  .flags = AVFMT_NOTIMESTAMPS,
401 };
402 #endif
403 
404 #if CONFIG_M4V_MUXER
406  .name = "m4v",
407  .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-4 video"),
408  .extensions = "m4v",
409  .audio_codec = AV_CODEC_ID_NONE,
410  .video_codec = AV_CODEC_ID_MPEG4,
411  .init = force_one_stream,
412  .write_packet = ff_raw_write_packet,
413  .flags = AVFMT_NOTIMESTAMPS,
414 };
415 #endif
416 
417 #if CONFIG_MJPEG_MUXER
419  .name = "mjpeg",
420  .long_name = NULL_IF_CONFIG_SMALL("raw MJPEG video"),
421  .mime_type = "video/x-mjpeg",
422  .extensions = "mjpg,mjpeg",
423  .audio_codec = AV_CODEC_ID_NONE,
424  .video_codec = AV_CODEC_ID_MJPEG,
425  .init = force_one_stream,
426  .write_packet = ff_raw_write_packet,
427  .flags = AVFMT_NOTIMESTAMPS,
428 };
429 #endif
430 
431 #if CONFIG_MLP_MUXER
433  .name = "mlp",
434  .long_name = NULL_IF_CONFIG_SMALL("raw MLP"),
435  .extensions = "mlp",
436  .audio_codec = AV_CODEC_ID_MLP,
437  .video_codec = AV_CODEC_ID_NONE,
438  .init = force_one_stream,
439  .write_packet = ff_raw_write_packet,
440  .flags = AVFMT_NOTIMESTAMPS,
441 };
442 #endif
443 
444 #if CONFIG_MP2_MUXER
446  .name = "mp2",
447  .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
448  .mime_type = "audio/mpeg",
449  .extensions = "mp2,m2a,mpa",
450  .audio_codec = AV_CODEC_ID_MP2,
451  .video_codec = AV_CODEC_ID_NONE,
452  .init = force_one_stream,
453  .write_packet = ff_raw_write_packet,
454  .flags = AVFMT_NOTIMESTAMPS,
455 };
456 #endif
457 
458 #if CONFIG_MPEG1VIDEO_MUXER
460  .name = "mpeg1video",
461  .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-1 video"),
462  .mime_type = "video/mpeg",
463  .extensions = "mpg,mpeg,m1v",
464  .audio_codec = AV_CODEC_ID_NONE,
465  .video_codec = AV_CODEC_ID_MPEG1VIDEO,
466  .init = force_one_stream,
467  .write_packet = ff_raw_write_packet,
468  .flags = AVFMT_NOTIMESTAMPS,
469 };
470 #endif
471 
472 #if CONFIG_MPEG2VIDEO_MUXER
474  .name = "mpeg2video",
475  .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-2 video"),
476  .extensions = "m2v",
477  .audio_codec = AV_CODEC_ID_NONE,
478  .video_codec = AV_CODEC_ID_MPEG2VIDEO,
479  .init = force_one_stream,
480  .write_packet = ff_raw_write_packet,
481  .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  .name = "obu",
494  .long_name = NULL_IF_CONFIG_SMALL("AV1 low overhead OBU"),
495  .extensions = "obu",
496  .audio_codec = AV_CODEC_ID_NONE,
497  .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  .flags = AVFMT_NOTIMESTAMPS,
502 };
503 #endif
504 
505 #if CONFIG_RAWVIDEO_MUXER
507  .name = "rawvideo",
508  .long_name = NULL_IF_CONFIG_SMALL("raw video"),
509  .extensions = "yuv,rgb",
510  .audio_codec = AV_CODEC_ID_NONE,
511  .video_codec = AV_CODEC_ID_RAWVIDEO,
512  .write_packet = ff_raw_write_packet,
513  .flags = AVFMT_NOTIMESTAMPS,
514 };
515 #endif
516 
517 #if CONFIG_SBC_MUXER
519  .name = "sbc",
520  .long_name = NULL_IF_CONFIG_SMALL("raw SBC"),
521  .mime_type = "audio/x-sbc",
522  .extensions = "sbc,msbc",
523  .audio_codec = AV_CODEC_ID_SBC,
524  .init = force_one_stream,
525  .write_packet = ff_raw_write_packet,
526  .flags = AVFMT_NOTIMESTAMPS,
527 };
528 #endif
529 
530 #if CONFIG_TRUEHD_MUXER
532  .name = "truehd",
533  .long_name = NULL_IF_CONFIG_SMALL("raw TrueHD"),
534  .extensions = "thd",
535  .audio_codec = AV_CODEC_ID_TRUEHD,
536  .video_codec = AV_CODEC_ID_NONE,
537  .init = force_one_stream,
538  .write_packet = ff_raw_write_packet,
539  .flags = AVFMT_NOTIMESTAMPS,
540 };
541 #endif
542 
543 #if CONFIG_VC1_MUXER
545  .name = "vc1",
546  .long_name = NULL_IF_CONFIG_SMALL("raw VC-1 video"),
547  .extensions = "vc1",
548  .audio_codec = AV_CODEC_ID_NONE,
549  .video_codec = AV_CODEC_ID_VC1,
550  .init = force_one_stream,
551  .write_packet = ff_raw_write_packet,
552  .flags = AVFMT_NOTIMESTAMPS,
553 };
554 #endif
ff_g726le_muxer
const AVOutputFormat ff_g726le_muxer
AV_CODEC_ID_AC3
@ AV_CODEC_ID_AC3
Definition: codec_id.h:430
AVOutputFormat::name
const char * name
Definition: avformat.h:510
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
ff_dfpwm_muxer
const AVOutputFormat ff_dfpwm_muxer
AVCodecParameters
This struct describes the properties of an encoded stream.
Definition: codec_par.h:53
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:481
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:374
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:385
ff_g726_muxer
const AVOutputFormat ff_g726_muxer
AVChannelLayout::nb_channels
int nb_channels
Number of channels in this layout.
Definition: channel_layout.h:300
AV_CODEC_ID_TRUEHD
@ AV_CODEC_ID_TRUEHD
Definition: codec_id.h:471
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
avio_tell
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
Definition: avio.h:505
ff_dnxhd_muxer
const AVOutputFormat ff_dnxhd_muxer
AV_CODEC_ID_SBC
@ AV_CODEC_ID_SBC
Definition: codec_id.h:514
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:368
intreadwrite.h
s
#define s(width, name)
Definition: cbs_vp9.c:256
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:427
ff_data_muxer
const AVOutputFormat ff_data_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:494
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:1213
ff_hevc_muxer
const AVOutputFormat ff_hevc_muxer
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:37
AV_CODEC_ID_G723_1
@ AV_CODEC_ID_G723_1
Definition: codec_id.h:479
AVCodecParameters::ch_layout
AVChannelLayout ch_layout
Audio only.
Definition: codec_par.h:212
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:445
AV_CODEC_ID_EAC3
@ AV_CODEC_ID_EAC3
Definition: codec_id.h:467
AVIOContext
Bytestream IO Context.
Definition: avio.h:162
AV_CODEC_ID_ADPCM_ADX
@ AV_CODEC_ID_ADPCM_ADX
Definition: codec_id.h:366
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: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:263
AV_CODEC_ID_DTS
@ AV_CODEC_ID_DTS
Definition: codec_id.h:431
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:509
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:948
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
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:1307
AV_CODEC_ID_ADPCM_G726LE
@ AV_CODEC_ID_ADPCM_G726LE
Definition: codec_id.h:392
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:41
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:351
AV_CODEC_ID_DFPWM
@ AV_CODEC_ID_DFPWM
Definition: codec_id.h:523
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
AV_CODEC_ID_APTX
@ AV_CODEC_ID_APTX
Definition: codec_id.h:512
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:513
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:456
ff_avs2_muxer
const AVOutputFormat ff_avs2_muxer
mux.h