基于qt,msvc2017-64bits,ffmpeg.opengl的播放器
zhangmeng
2021-03-03 4a6d9312cc1c9d62d66c4def71246d9faae29edb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.13)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.el \{\
.    de IX
..
.\}
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "FFMPEG-BITSTREAM-FILTERS 1"
.TH FFMPEG-BITSTREAM-FILTERS 1 " " " " " "
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
ffmpeg\-bitstream\-filters \- FFmpeg bitstream filters
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This document describes the bitstream filters provided by the
libavcodec library.
.PP
A bitstream filter operates on the encoded stream data, and performs
bitstream level modifications without performing decoding.
.SH "BITSTREAM FILTERS"
.IX Header "BITSTREAM FILTERS"
When you configure your FFmpeg build, all the supported bitstream
filters are enabled by default. You can list all available ones using
the configure option \f(CW\*(C`\-\-list\-bsfs\*(C'\fR.
.PP
You can disable all the bitstream filters using the configure option
\&\f(CW\*(C`\-\-disable\-bsfs\*(C'\fR, and selectively enable any bitstream filter using
the option \f(CW\*(C`\-\-enable\-bsf=BSF\*(C'\fR, or you can disable a particular
bitstream filter using the option \f(CW\*(C`\-\-disable\-bsf=BSF\*(C'\fR.
.PP
The option \f(CW\*(C`\-bsfs\*(C'\fR of the ff* tools will display the list of
all the supported bitstream filters included in your build.
.PP
The ff* tools have a \-bsf option applied per stream, taking a
comma-separated list of filters, whose parameters follow the filter
name after a '='.
.PP
.Vb 1
\&        ffmpeg \-i INPUT \-c:v copy \-bsf:v filter1[=opt1=str1:opt2=str2][,filter2] OUTPUT
.Ve
.PP
Below is a description of the currently available bitstream filters,
with their parameters, if any.
.SS "aac_adtstoasc"
.IX Subsection "aac_adtstoasc"
Convert \s-1MPEG\-2/4\s0 \s-1AAC\s0 \s-1ADTS\s0 to an \s-1MPEG\-4\s0 Audio Specific Configuration
bitstream.
.PP
This filter creates an \s-1MPEG\-4\s0 AudioSpecificConfig from an \s-1MPEG\-2/4\s0
\&\s-1ADTS\s0 header and removes the \s-1ADTS\s0 header.
.PP
This filter is required for example when copying an \s-1AAC\s0 stream from a
raw \s-1ADTS\s0 \s-1AAC\s0 or an MPEG-TS container to \s-1MP4A\-LATM\s0, to an \s-1FLV\s0 file, or
to \s-1MOV/MP4\s0 files and related formats such as 3GP or M4A. Please note
that it is auto-inserted for \s-1MP4A\-LATM\s0 and \s-1MOV/MP4\s0 and related formats.
.SS "av1_metadata"
.IX Subsection "av1_metadata"
Modify metadata embedded in an \s-1AV1\s0 stream.
.IP "\fBtd\fR" 4
.IX Item "td"
Insert or remove temporal delimiter OBUs in all temporal units of the
stream.
.RS 4
.IP "\fBinsert\fR" 4
.IX Item "insert"
Insert a \s-1TD\s0 at the beginning of every \s-1TU\s0 which does not already have one.
.IP "\fBremove\fR" 4
.IX Item "remove"
Remove the \s-1TD\s0 from the beginning of every \s-1TU\s0 which has one.
.RE
.RS 4
.RE
.IP "\fBcolor_primaries\fR" 4
.IX Item "color_primaries"
.PD 0
.IP "\fBtransfer_characteristics\fR" 4
.IX Item "transfer_characteristics"
.IP "\fBmatrix_coefficients\fR" 4
.IX Item "matrix_coefficients"
.PD
Set the color description fields in the stream (see \s-1AV1\s0 section 6.4.2).
.IP "\fBcolor_range\fR" 4
.IX Item "color_range"
Set the color range in the stream (see \s-1AV1\s0 section 6.4.2; note that
this cannot be set for streams using \s-1BT\s0.709 primaries, sRGB transfer
characteristic and identity (\s-1RGB\s0) matrix coefficients).
.RS 4
.IP "\fBtv\fR" 4
.IX Item "tv"
Limited range.
.IP "\fBpc\fR" 4
.IX Item "pc"
Full range.
.RE
.RS 4
.RE
.IP "\fBchroma_sample_position\fR" 4
.IX Item "chroma_sample_position"
Set the chroma sample location in the stream (see \s-1AV1\s0 section 6.4.2).
This can only be set for 4:2:0 streams.
.RS 4
.IP "\fBvertical\fR" 4
.IX Item "vertical"
Left position (matching the default in \s-1MPEG\-2\s0 and H.264).
.IP "\fBcolocated\fR" 4
.IX Item "colocated"
Top-left position.
.RE
.RS 4
.RE
.IP "\fBtick_rate\fR" 4
.IX Item "tick_rate"
Set the tick rate (\fInum_units_in_display_tick / time_scale\fR) in
the timing info in the sequence header.
.IP "\fBnum_ticks_per_picture\fR" 4
.IX Item "num_ticks_per_picture"
Set the number of ticks in each picture, to indicate that the stream
has a fixed framerate.  Ignored if \fBtick_rate\fR is not also set.
.SS "chomp"
.IX Subsection "chomp"
Remove zero padding at the end of a packet.
.SS "dca_core"
.IX Subsection "dca_core"
Extract the core from a \s-1DCA/DTS\s0 stream, dropping extensions such as
DTS-HD.
.SS "dump_extra"
.IX Subsection "dump_extra"
Add extradata to the beginning of the filtered packets.
.IP "\fBfreq\fR" 4
.IX Item "freq"
The additional argument specifies which packets should be filtered.
It accepts the values:
.RS 4
.IP "\fBk\fR" 4
.IX Item "k"
.PD 0
.IP "\fBkeyframe\fR" 4
.IX Item "keyframe"
.PD
add extradata to all key packets
.IP "\fBe\fR" 4
.IX Item "e"
.PD 0
.IP "\fBall\fR" 4
.IX Item "all"
.PD
add extradata to all packets
.RE
.RS 4
.RE
.PP
If not specified it is assumed \fBe\fR.
.PP
For example the following \fBffmpeg\fR command forces a global
header (thus disabling individual packet headers) in the H.264 packets
generated by the \f(CW\*(C`libx264\*(C'\fR encoder, but corrects them by adding
the header stored in extradata to the key packets:
.PP
.Vb 1
\&        ffmpeg \-i INPUT \-map 0 \-flags:v +global_header \-c:v libx264 \-bsf:v dump_extra out.ts
.Ve
.SS "eac3_core"
.IX Subsection "eac3_core"
Extract the core from a E\-AC\-3 stream, dropping extra channels.
.SS "extract_extradata"
.IX Subsection "extract_extradata"
Extract the in-band extradata.
.PP
Certain codecs allow the long-term headers (e.g. \s-1MPEG\-2\s0 sequence headers,
or H.264/HEVC (\s-1VPS/\s0)SPS/PPS) to be transmitted either \*(L"in-band\*(R" (i.e. as a part
of the bitstream containing the coded frames) or \*(L"out of band\*(R" (e.g. on the
container level). This latter form is called \*(L"extradata\*(R" in FFmpeg terminology.
.PP
This bitstream filter detects the in-band headers and makes them available as
extradata.
.IP "\fBremove\fR" 4
.IX Item "remove"
When this option is enabled, the long-term headers are removed from the
bitstream after extraction.
.SS "filter_units"
.IX Subsection "filter_units"
Remove units with types in or not in a given set from the stream.
.IP "\fBpass_types\fR" 4
.IX Item "pass_types"
List of unit types or ranges of unit types to pass through while removing
all others.  This is specified as a '|'\-separated list of unit type values
or ranges of values with '\-'.
.IP "\fBremove_types\fR" 4
.IX Item "remove_types"
Identical to \fBpass_types\fR, except the units in the given set
removed and all others passed through.
.PP
Extradata is unchanged by this transformation, but note that if the stream
contains inline parameter sets then the output may be unusable if they are
removed.
.PP
For example, to remove all non-VCL \s-1NAL\s0 units from an H.264 stream:
.PP
.Vb 1
\&        ffmpeg \-i INPUT \-c:v copy \-bsf:v \*(Aqfilter_units=pass_types=1\-5\*(Aq OUTPUT
.Ve
.PP
To remove all AUDs, \s-1SEI\s0 and filler from an H.265 stream:
.PP
.Vb 1
\&        ffmpeg \-i INPUT \-c:v copy \-bsf:v \*(Aqfilter_units=remove_types=35|38\-40\*(Aq OUTPUT
.Ve
.SS "hapqa_extract"
.IX Subsection "hapqa_extract"
Extract Rgb or Alpha part of an \s-1HAPQA\s0 file, without recompression, in order to create an \s-1HAPQ\s0 or an HAPAlphaOnly file.
.IP "\fBtexture\fR" 4
.IX Item "texture"
Specifies the texture to keep.
.RS 4
.IP "\fBcolor\fR" 4
.IX Item "color"
.PD 0
.IP "\fBalpha\fR" 4
.IX Item "alpha"
.RE
.RS 4
.RE
.PD
.PP
Convert \s-1HAPQA\s0 to \s-1HAPQ\s0
.PP
.Vb 1
\&        ffmpeg \-i hapqa_inputfile.mov \-c copy \-bsf:v hapqa_extract=texture=color \-tag:v HapY \-metadata:s:v:0 encoder="HAPQ" hapq_file.mov
.Ve
.PP
Convert \s-1HAPQA\s0 to HAPAlphaOnly
.PP
.Vb 1
\&        ffmpeg \-i hapqa_inputfile.mov \-c copy \-bsf:v hapqa_extract=texture=alpha \-tag:v HapA \-metadata:s:v:0 encoder="HAPAlpha Only" hapalphaonly_file.mov
.Ve
.SS "h264_metadata"
.IX Subsection "h264_metadata"
Modify metadata embedded in an H.264 stream.
.IP "\fBaud\fR" 4
.IX Item "aud"
Insert or remove \s-1AUD\s0 \s-1NAL\s0 units in all access units of the stream.
.RS 4
.IP "\fBinsert\fR" 4
.IX Item "insert"
.PD 0
.IP "\fBremove\fR" 4
.IX Item "remove"
.RE
.RS 4
.RE
.IP "\fBsample_aspect_ratio\fR" 4
.IX Item "sample_aspect_ratio"
.PD
Set the sample aspect ratio of the stream in the \s-1VUI\s0 parameters.
.IP "\fBvideo_format\fR" 4
.IX Item "video_format"
.PD 0
.IP "\fBvideo_full_range_flag\fR" 4
.IX Item "video_full_range_flag"
.PD
Set the video format in the stream (see H.264 section E.2.1 and
table E\-2).
.IP "\fBcolour_primaries\fR" 4
.IX Item "colour_primaries"
.PD 0
.IP "\fBtransfer_characteristics\fR" 4
.IX Item "transfer_characteristics"
.IP "\fBmatrix_coefficients\fR" 4
.IX Item "matrix_coefficients"
.PD
Set the colour description in the stream (see H.264 section E.2.1
and tables E\-3, E\-4 and E\-5).
.IP "\fBchroma_sample_loc_type\fR" 4
.IX Item "chroma_sample_loc_type"
Set the chroma sample location in the stream (see H.264 section
E.2.1 and figure E\-1).
.IP "\fBtick_rate\fR" 4
.IX Item "tick_rate"
Set the tick rate (num_units_in_tick / time_scale) in the \s-1VUI\s0
parameters.  This is the smallest time unit representable in the
stream, and in many cases represents the field rate of the stream
(double the frame rate).
.IP "\fBfixed_frame_rate_flag\fR" 4
.IX Item "fixed_frame_rate_flag"
Set whether the stream has fixed framerate \- typically this indicates
that the framerate is exactly half the tick rate, but the exact
meaning is dependent on interlacing and the picture structure (see
H.264 section E.2.1 and table E\-6).
.IP "\fBcrop_left\fR" 4
.IX Item "crop_left"
.PD 0
.IP "\fBcrop_right\fR" 4
.IX Item "crop_right"
.IP "\fBcrop_top\fR" 4
.IX Item "crop_top"
.IP "\fBcrop_bottom\fR" 4
.IX Item "crop_bottom"
.PD
Set the frame cropping offsets in the \s-1SPS\s0.  These values will replace
the current ones if the stream is already cropped.
.Sp
These fields are set in pixels.  Note that some sizes may not be
representable if the chroma is subsampled or the stream is interlaced
(see H.264 section 7.4.2.1.1).
.IP "\fBsei_user_data\fR" 4
.IX Item "sei_user_data"
Insert a string as \s-1SEI\s0 unregistered user data.  The argument must
be of the form \fIUUID+string\fR, where the \s-1UUID\s0 is as hex digits
possibly separated by hyphens, and the string can be anything.
.Sp
For example, \fB086f3693\-b7b3\-4f2c\-9653\-21492feee5b8+hello\fR will
insert the string ``hello'' associated with the given \s-1UUID\s0.
.IP "\fBdelete_filler\fR" 4
.IX Item "delete_filler"
Deletes both filler \s-1NAL\s0 units and filler \s-1SEI\s0 messages.
.IP "\fBlevel\fR" 4
.IX Item "level"
Set the level in the \s-1SPS\s0.  Refer to H.264 section A.3 and tables A\-1
to A\-5.
.Sp
The argument must be the name of a level (for example, \fB4.2\fR), a
level_idc value (for example, \fB42\fR), or the special name \fBauto\fR
indicating that the filter should attempt to guess the level from the
input stream properties.
.SS "h264_mp4toannexb"
.IX Subsection "h264_mp4toannexb"
Convert an H.264 bitstream from length prefixed mode to start code
prefixed mode (as defined in the Annex B of the ITU-T H.264
specification).
.PP
This is required by some streaming formats, typically the \s-1MPEG\-2\s0
transport stream format (muxer \f(CW\*(C`mpegts\*(C'\fR).
.PP
For example to remux an \s-1MP4\s0 file containing an H.264 stream to mpegts
format with \fBffmpeg\fR, you can use the command:
.PP
.Vb 1
\&        ffmpeg \-i INPUT.mp4 \-codec copy \-bsf:v h264_mp4toannexb OUTPUT.ts
.Ve
.PP
Please note that this filter is auto-inserted for MPEG-TS (muxer
\&\f(CW\*(C`mpegts\*(C'\fR) and raw H.264 (muxer \f(CW\*(C`h264\*(C'\fR) output formats.
.SS "h264_redundant_pps"
.IX Subsection "h264_redundant_pps"
This applies a specific fixup to some Blu-ray streams which contain
redundant PPSs modifying irrelevant parameters of the stream which
confuse other transformations which require correct extradata.
.PP
A new single global \s-1PPS\s0 is created, and all of the redundant PPSs
within the stream are removed.
.SS "hevc_metadata"
.IX Subsection "hevc_metadata"
Modify metadata embedded in an \s-1HEVC\s0 stream.
.IP "\fBaud\fR" 4
.IX Item "aud"
Insert or remove \s-1AUD\s0 \s-1NAL\s0 units in all access units of the stream.
.RS 4
.IP "\fBinsert\fR" 4
.IX Item "insert"
.PD 0
.IP "\fBremove\fR" 4
.IX Item "remove"
.RE
.RS 4
.RE
.IP "\fBsample_aspect_ratio\fR" 4
.IX Item "sample_aspect_ratio"
.PD
Set the sample aspect ratio in the stream in the \s-1VUI\s0 parameters.
.IP "\fBvideo_format\fR" 4
.IX Item "video_format"
.PD 0
.IP "\fBvideo_full_range_flag\fR" 4
.IX Item "video_full_range_flag"
.PD
Set the video format in the stream (see H.265 section E.3.1 and
table E.2).
.IP "\fBcolour_primaries\fR" 4
.IX Item "colour_primaries"
.PD 0
.IP "\fBtransfer_characteristics\fR" 4
.IX Item "transfer_characteristics"
.IP "\fBmatrix_coefficients\fR" 4
.IX Item "matrix_coefficients"
.PD
Set the colour description in the stream (see H.265 section E.3.1
and tables E.3, E.4 and E.5).
.IP "\fBchroma_sample_loc_type\fR" 4
.IX Item "chroma_sample_loc_type"
Set the chroma sample location in the stream (see H.265 section
E.3.1 and figure E.1).
.IP "\fBtick_rate\fR" 4
.IX Item "tick_rate"
Set the tick rate in the \s-1VPS\s0 and \s-1VUI\s0 parameters (num_units_in_tick /
time_scale).  Combined with \fBnum_ticks_poc_diff_one\fR, this can
set a constant framerate in the stream.  Note that it is likely to be
overridden by container parameters when the stream is in a container.
.IP "\fBnum_ticks_poc_diff_one\fR" 4
.IX Item "num_ticks_poc_diff_one"
Set poc_proportional_to_timing_flag in \s-1VPS\s0 and \s-1VUI\s0 and use this value
to set num_ticks_poc_diff_one_minus1 (see H.265 sections 7.4.3.1 and
E.3.1).  Ignored if \fBtick_rate\fR is not also set.
.IP "\fBcrop_left\fR" 4
.IX Item "crop_left"
.PD 0
.IP "\fBcrop_right\fR" 4
.IX Item "crop_right"
.IP "\fBcrop_top\fR" 4
.IX Item "crop_top"
.IP "\fBcrop_bottom\fR" 4
.IX Item "crop_bottom"
.PD
Set the conformance window cropping offsets in the \s-1SPS\s0.  These values
will replace the current ones if the stream is already cropped.
.Sp
These fields are set in pixels.  Note that some sizes may not be
representable if the chroma is subsampled (H.265 section 7.4.3.2.1).
.SS "hevc_mp4toannexb"
.IX Subsection "hevc_mp4toannexb"
Convert an \s-1HEVC/H\s0.265 bitstream from length prefixed mode to start code
prefixed mode (as defined in the Annex B of the ITU-T H.265
specification).
.PP
This is required by some streaming formats, typically the \s-1MPEG\-2\s0
transport stream format (muxer \f(CW\*(C`mpegts\*(C'\fR).
.PP
For example to remux an \s-1MP4\s0 file containing an \s-1HEVC\s0 stream to mpegts
format with \fBffmpeg\fR, you can use the command:
.PP
.Vb 1
\&        ffmpeg \-i INPUT.mp4 \-codec copy \-bsf:v hevc_mp4toannexb OUTPUT.ts
.Ve
.PP
Please note that this filter is auto-inserted for MPEG-TS (muxer
\&\f(CW\*(C`mpegts\*(C'\fR) and raw \s-1HEVC/H\s0.265 (muxer \f(CW\*(C`h265\*(C'\fR or
\&\f(CW\*(C`hevc\*(C'\fR) output formats.
.SS "imxdump"
.IX Subsection "imxdump"
Modifies the bitstream to fit in \s-1MOV\s0 and to be usable by the Final Cut
Pro decoder. This filter only applies to the mpeg2video codec, and is
likely not needed for Final Cut Pro 7 and newer with the appropriate
\&\fB\-tag:v\fR.
.PP
For example, to remux 30 MB/sec \s-1NTSC\s0 \s-1IMX\s0 to \s-1MOV:\s0
.PP
.Vb 1
\&        ffmpeg \-i input.mxf \-c copy \-bsf:v imxdump \-tag:v mx3n output.mov
.Ve
.SS "mjpeg2jpeg"
.IX Subsection "mjpeg2jpeg"
Convert \s-1MJPEG/AVI1\s0 packets to full \s-1JPEG/JFIF\s0 packets.
.PP
\&\s-1MJPEG\s0 is a video codec wherein each video frame is essentially a
\&\s-1JPEG\s0 image. The individual frames can be extracted without loss,
e.g. by
.PP
.Vb 1
\&        ffmpeg \-i ../some_mjpeg.avi \-c:v copy frames_%d.jpg
.Ve
.PP
Unfortunately, these chunks are incomplete \s-1JPEG\s0 images, because
they lack the \s-1DHT\s0 segment required for decoding. Quoting from
<\fBhttp://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml\fR>:
.PP
Avery Lee, writing in the rec.video.desktop newsgroup in 2001,
commented that \*(L"\s-1MJPEG\s0, or at least the \s-1MJPEG\s0 in AVIs having the
\&\s-1MJPG\s0 fourcc, is restricted \s-1JPEG\s0 with a fixed \*(-- and *omitted* \*(--
Huffman table. The \s-1JPEG\s0 must be YCbCr colorspace, it must be 4:2:2,
and it must use basic Huffman encoding, not arithmetic or
progressive. . . . You can indeed extract the \s-1MJPEG\s0 frames and
decode them with a regular \s-1JPEG\s0 decoder, but you have to prepend
the \s-1DHT\s0 segment to them, or else the decoder won't have any idea
how to decompress the data. The exact table necessary is given in
the OpenDML spec.\*(R"
.PP
This bitstream filter patches the header of frames extracted from an \s-1MJPEG\s0
stream (carrying the \s-1AVI1\s0 header \s-1ID\s0 and lacking a \s-1DHT\s0 segment) to
produce fully qualified \s-1JPEG\s0 images.
.PP
.Vb 3
\&        ffmpeg \-i mjpeg\-movie.avi \-c:v copy \-bsf:v mjpeg2jpeg frame_%d.jpg
\&        exiftran \-i \-9 frame*.jpg
\&        ffmpeg \-i frame_%d.jpg \-c:v copy rotated.avi
.Ve
.SS "mjpegadump"
.IX Subsection "mjpegadump"
Add an \s-1MJPEG\s0 A header to the bitstream, to enable decoding by
Quicktime.
.SS "mov2textsub"
.IX Subsection "mov2textsub"
Extract a representable text file from \s-1MOV\s0 subtitles, stripping the
metadata header from each subtitle packet.
.PP
See also the \fBtext2movsub\fR filter.
.SS "mp3decomp"
.IX Subsection "mp3decomp"
Decompress non-standard compressed \s-1MP3\s0 audio headers.
.SS "mpeg2_metadata"
.IX Subsection "mpeg2_metadata"
Modify metadata embedded in an \s-1MPEG\-2\s0 stream.
.IP "\fBdisplay_aspect_ratio\fR" 4
.IX Item "display_aspect_ratio"
Set the display aspect ratio in the stream.
.Sp
The following fixed values are supported:
.RS 4
.IP "\fB4/3\fR" 4
.IX Item "4/3"
.PD 0
.IP "\fB16/9\fR" 4
.IX Item "16/9"
.IP "\fB221/100\fR" 4
.IX Item "221/100"
.RE
.RS 4
.PD
.Sp
Any other value will result in square pixels being signalled instead
(see H.262 section 6.3.3 and table 6\-3).
.RE
.IP "\fBframe_rate\fR" 4
.IX Item "frame_rate"
Set the frame rate in the stream.  This is constructed from a table
of known values combined with a small multiplier and divisor \- if
the supplied value is not exactly representable, the nearest
representable value will be used instead (see H.262 section 6.3.3
and table 6\-4).
.IP "\fBvideo_format\fR" 4
.IX Item "video_format"
Set the video format in the stream (see H.262 section 6.3.6 and
table 6\-6).
.IP "\fBcolour_primaries\fR" 4
.IX Item "colour_primaries"
.PD 0
.IP "\fBtransfer_characteristics\fR" 4
.IX Item "transfer_characteristics"
.IP "\fBmatrix_coefficients\fR" 4
.IX Item "matrix_coefficients"
.PD
Set the colour description in the stream (see H.262 section 6.3.6
and tables 6\-7, 6\-8 and 6\-9).
.SS "mpeg4_unpack_bframes"
.IX Subsection "mpeg4_unpack_bframes"
Unpack DivX-style packed B\-frames.
.PP
DivX-style packed B\-frames are not valid \s-1MPEG\-4\s0 and were only a
workaround for the broken Video for Windows subsystem.
They use more space, can cause minor \s-1AV\s0 sync issues, require more
\&\s-1CPU\s0 power to decode (unless the player has some decoded picture queue
to compensate the 2,0,2,0 frame per packet style) and cause
trouble if copied into a standard container like mp4 or mpeg\-ps/ts,
because \s-1MPEG\-4\s0 decoders may not be able to decode them, since they are
not valid \s-1MPEG\-4\s0.
.PP
For example to fix an \s-1AVI\s0 file containing an \s-1MPEG\-4\s0 stream with
DivX-style packed B\-frames using \fBffmpeg\fR, you can use the command:
.PP
.Vb 1
\&        ffmpeg \-i INPUT.avi \-codec copy \-bsf:v mpeg4_unpack_bframes OUTPUT.avi
.Ve
.SS "noise"
.IX Subsection "noise"
Damages the contents of packets or simply drops them without damaging the
container. Can be used for fuzzing or testing error resilience/concealment.
.PP
Parameters:
.IP "\fBamount\fR" 4
.IX Item "amount"
A numeral string, whose value is related to how often output bytes will
be modified. Therefore, values below or equal to 0 are forbidden, and
the lower the more frequent bytes will be modified, with 1 meaning
every byte is modified.
.IP "\fBdropamount\fR" 4
.IX Item "dropamount"
A numeral string, whose value is related to how often packets will be dropped.
Therefore, values below or equal to 0 are forbidden, and the lower the more
frequent packets will be dropped, with 1 meaning every packet is dropped.
.PP
The following example applies the modification to every byte but does not drop
any packets.
.PP
.Vb 1
\&        ffmpeg \-i INPUT \-c copy \-bsf noise[=1] output.mkv
.Ve
.SS "null"
.IX Subsection "null"
This bitstream filter passes the packets through unchanged.
.SS "remove_extra"
.IX Subsection "remove_extra"
Remove extradata from packets.
.PP
It accepts the following parameter:
.IP "\fBfreq\fR" 4
.IX Item "freq"
Set which frame types to remove extradata from.
.RS 4
.IP "\fBk\fR" 4
.IX Item "k"
Remove extradata from non-keyframes only.
.IP "\fBkeyframe\fR" 4
.IX Item "keyframe"
Remove extradata from keyframes only.
.IP "\fBe, all\fR" 4
.IX Item "e, all"
Remove extradata from all frames.
.RE
.RS 4
.RE
.SS "text2movsub"
.IX Subsection "text2movsub"
Convert text subtitles to \s-1MOV\s0 subtitles (as used by the \f(CW\*(C`mov_text\*(C'\fR
codec) with metadata headers.
.PP
See also the \fBmov2textsub\fR filter.
.SS "trace_headers"
.IX Subsection "trace_headers"
Log trace output containing all syntax elements in the coded stream
headers (everything above the level of individual coded blocks).
This can be useful for debugging low-level stream issues.
.PP
Supports H.264, H.265, \s-1MPEG\-2\s0 and \s-1VP9\s0.
.SS "vp9_metadata"
.IX Subsection "vp9_metadata"
Modify metadata embedded in a \s-1VP9\s0 stream.
.IP "\fBcolor_space\fR" 4
.IX Item "color_space"
Set the color space value in the frame header.
.RS 4
.IP "\fBunknown\fR" 4
.IX Item "unknown"
.PD 0
.IP "\fBbt601\fR" 4
.IX Item "bt601"
.IP "\fBbt709\fR" 4
.IX Item "bt709"
.IP "\fBsmpte170\fR" 4
.IX Item "smpte170"
.IP "\fBsmpte240\fR" 4
.IX Item "smpte240"
.IP "\fBbt2020\fR" 4
.IX Item "bt2020"
.IP "\fBrgb\fR" 4
.IX Item "rgb"
.RE
.RS 4
.RE
.IP "\fBcolor_range\fR" 4
.IX Item "color_range"
.PD
Set the color range value in the frame header.  Note that this cannot
be set in \s-1RGB\s0 streams.
.RS 4
.IP "\fBtv\fR" 4
.IX Item "tv"
.PD 0
.IP "\fBpc\fR" 4
.IX Item "pc"
.RE
.RS 4
.RE
.PD
.SS "vp9_superframe"
.IX Subsection "vp9_superframe"
Merge \s-1VP9\s0 invisible (alt-ref) frames back into \s-1VP9\s0 superframes. This
fixes merging of split/segmented \s-1VP9\s0 streams where the alt-ref frame
was split from its visible counterpart.
.SS "vp9_superframe_split"
.IX Subsection "vp9_superframe_split"
Split \s-1VP9\s0 superframes into single frames.
.SS "vp9_raw_reorder"
.IX Subsection "vp9_raw_reorder"
Given a \s-1VP9\s0 stream with correct timestamps but possibly out of order,
insert additional show-existing-frame packets to correct the ordering.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fIffmpeg\fR\|(1), \fIffplay\fR\|(1), \fIffprobe\fR\|(1), \fIlibavcodec\fR\|(3)
.SH "AUTHORS"
.IX Header "AUTHORS"
The FFmpeg developers.
.PP
For details about the authorship, see the Git history of the project
(git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
\&\fBgit log\fR in the FFmpeg source directory, or browsing the
online repository at <\fBhttp://source.ffmpeg.org\fR>.
.PP
Maintainers for the specific components are listed in the file
\&\fI\s-1MAINTAINERS\s0\fR in the source code tree.