For example to remux an MP4 file containing an HEVC stream to mpegts format with ffmpeg, you can use the command:

ffmpeg -i INPUT.mp4 -codec copy -bsf:v hevc_mp4toannexb OUTPUT.ts
For example to remux an MP4 file containing an HEVC stream to mpegts format with ffmpeg, you can use the command:

ffmpeg -i INPUT.mp4 -codec copy -bsf:v hevc_mp4toannexb OUTPUT.ts
For example to remux an MP4 file containing an HEVC stream to mpegts format with ffmpeg, you can use the command:

ffmpeg -i INPUT.mp4 -codec copy -bsf:v hevc_mp4toannexb OUTPUT.ts
For example to remux an MP4 file containing an HEVC stream to mpegts format with ffmpeg, you can use the command:

ffmpeg -i INPUT.mp4 -codec copy -bsf:v hevc_mp4toannexb OUTPUT.ts
For example to remux an MP4 file containing an H.264 stream to mpegts format with ffmpeg, you can use the command:

ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.ts
For example to remux an MP4 file containing an H.264 stream to mpegts format with ffmpeg, you can use the command:

ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.ts
For example to remux an MP4 file containing an H.264 stream to mpegts format with ffmpeg, you can use the command:

ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.ts
This bitstream filter patches the header of frames extracted from an MJPEG stream (carrying the AVI1 header ID and lacking a DHT segment) to produce fully qualified JPEG images.

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
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 ’=’.

ffmpeg -i INPUT -c:v copy -bsf:v filter1[=opt1=str1:opt2=str2][,filter2] OUTPUT
For example the following ffmpeg command forces a global header (thus disabling individual packet headers) in the H.264 packets generated by the libx264 encoder, but corrects them by adding the header stored in extradata to the key packets:

ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra out.ts
For example to fix an AVI file containing an MPEG-4 stream with DivX-style packed B-frames using ffmpeg, you can use the command:

ffmpeg -i INPUT.avi -codec copy -bsf:v mpeg4_unpack_bframes OUTPUT.avi

Recommend

FFMPEG ffmpeg Documentation 18 Bitstream Filters 18.12 h264_mp4toannexb

FFMPEG ffmpeg Documentation 18 Bitstream Filters 18.10 hapqa_extract

FFMPEG ffmpeg Documentation 18 Bitstream Filters 18.9 filter_units

FFMPEG ffmpeg Documentation 18 Bitstream Filters 18.5 dump_extra

FFMPEG ffmpeg Documentation 18 Bitstream Filters

FFMPEG ffmpeg Documentation 16 Video Encoders 16.16 libxvid 16.16.1 Options

FFMPEG ffmpeg Documentation 16 Video Encoders 16.15 libxavs2 16.15.1 Options

FFMPEG ffmpeg Documentation 16 Video Encoders 16.14 libx265 16.14.1 Options

FFMPEG ffmpeg Documentation 16 Video Encoders 16.13 libx264, libx264rgb 16.13.2 Options

FFMPEG ffmpeg Documentation 16 Video Encoders 16.11 libvpx 16.11.1 Options

FFMPEG ffmpeg Documentation 16 Video Encoders 16.10 libtheora 16.10.2 Examples

FFMPEG ffmpeg Documentation 16 Video Encoders 16.6 libaom-av1 16.6.1 Options

FFMPEG ffmpeg Documentation 16 Video Encoders 16.5 librav1e 16.5.1 Options

FFMPEG ffmpeg Documentation 16 Video Encoders 16.4 jpeg2000 16.4.1 Options

FFMPEG ffmpeg Documentation 15 Audio Encoders 15.5 libfdk_aac 15.5.2 Examples

FFMPEG ffmpeg Documentation 9 Codec Options

FFMPEG ffmpeg Documentation 8 Expression Evaluation

FFMPEG ffmpeg Documentation 7 Syntax 7.3 Time duration

FFMPEG ffmpeg Documentation 7 Syntax 7.2 Date

FFMPEG ffmpeg Documentation 7 Syntax 7.1 Quoting and escaping 7.1.1 Examples

FFMPEG FFmpeg Bitstream Filters Documentation 2 Bitstream Filters 2.26 prores_metadata

FFMPEG FFmpeg Bitstream Filters Documentation 2 Bitstream Filters 2.25 pcm_rechunk

FFMPEG FFmpeg Bitstream Filters Documentation 2 Bitstream Filters 2.23 noise 2.23.1 Examples

FFMPEG FFmpeg Bitstream Filters Documentation 2 Bitstream Filters 2.22 mpeg4_unpack_bframes

FFMPEG FFmpeg Bitstream Filters Documentation 2 Bitstream Filters 2.17 mjpeg2jpeg

FFMPEG FFmpeg Bitstream Filters Documentation 2 Bitstream Filters 2.16 imxdump

FFMPEG FFmpeg Bitstream Filters Documentation 2 Bitstream Filters 2.15 hevc_mp4toannexb

FFMPEG FFmpeg Bitstream Filters Documentation 2 Bitstream Filters 2.12 h264_mp4toannexb

FFMPEG FFmpeg Bitstream Filters Documentation 2 Bitstream Filters 2.10 hapqa_extract

FFMPEG FFmpeg Bitstream Filters Documentation 2 Bitstream Filters 2.9 filter_units

FFMPEG FFmpeg Bitstream Filters Documentation 2 Bitstream Filters 2.5 dump_extra

FFMPEG FFmpeg Bitstream Filters Documentation 2 Bitstream Filters

FFMPEG FFmpeg Filters Documentation 17 Multimedia Sources 17.2 movie

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.32 zmq, azmq 16.32.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.32 zmq, azmq

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.31 split, asplit 16.31.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.30 spectrumsynth 16.30.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.28 showwavespic 16.28.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.27 showwaves 16.27.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.25 showspectrumpic 16.25.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.24 showspectrum 16.24.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.21 showcqt 16.21.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.20 settb, asettb 16.20.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.18 setpts, asetpts 16.18.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.17 sendcmd, asendcmd 16.17.2 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.17 sendcmd, asendcmd 16.17.1 Commands syntax

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.16 select, aselect 16.16.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.15 segment, asegment 16.15.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.12 metadata, ametadata 16.12.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.10 interleave, ainterleave 16.10.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.9 ebur128 16.9.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.8 concat 16.8.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.7 bench, abench 16.7.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.6 avectorscope 16.6.1 Examples

FFMPEG FFmpeg Filters Documentation 16 Multimedia Filters 16.5 aphasemeter 16.5.2 Examples

FFMPEG FFmpeg Filters Documentation 14 Video Sources 14.9 allrgb, allyuv, color, colorspectrum, haldclutsrc, nullsrc, pal75bars, pal100bars, rgbtestsrc, smptebars, smptehdbars, testsrc, testsrc2, yuvtestsrc 14.9.1 Examples

FFMPEG FFmpeg Filters Documentation 14 Video Sources 14.8 life 14.8.1 Examples

FFMPEG FFmpeg Filters Documentation 14 Video Sources 14.7 frei0r_src

FFMPEG FFmpeg Filters Documentation 14 Video Sources 14.3 coreimagesrc 14.3.1 Examples

FFMPEG FFmpeg Filters Documentation 14 Video Sources 14.3 coreimagesrc

FFMPEG FFmpeg Filters Documentation 14 Video Sources 14.2 cellauto 14.2.1 Examples

FFMPEG FFmpeg Filters Documentation 14 Video Sources 14.1 buffer

FFMPEG FFmpeg Filters Documentation 13 VAAPI Video Filters 13.1 overlay_vaapi 13.1.1 Examples

FFMPEG FFmpeg Filters Documentation 12 OpenCL Video Filters 12.15 tonemap_opencl 12.15.1 Example

FFMPEG FFmpeg Filters Documentation 12 OpenCL Video Filters 12.12 program_opencl

FFMPEG FFmpeg Filters Documentation 12 OpenCL Video Filters 12.11 prewitt_opencl 12.11.1 Example

FFMPEG FFmpeg Filters Documentation 12 OpenCL Video Filters 12.9 overlay_opencl 12.9.1 Examples

FFMPEG FFmpeg Filters Documentation 12 OpenCL Video Filters 12.6 deshake_opencl 12.6.1 Examples

FFMPEG FFmpeg Filters Documentation 12 OpenCL Video Filters 12.5 erosion_opencl 12.5.1 Example

FFMPEG FFmpeg Filters Documentation 12 OpenCL Video Filters 12.4 convolution_opencl 12.4.1 Examples

FFMPEG FFmpeg Filters Documentation 12 OpenCL Video Filters 12.3 colorkey_opencl 12.3.1 Examples

FFMPEG FFmpeg Filters Documentation 12 OpenCL Video Filters 12.2 boxblur_opencl 12.2.1 Examples

FFMPEG FFmpeg Filters Documentation 12 OpenCL Video Filters 12.1 avgblur_opencl 12.1.1 Example

FFMPEG FFmpeg Filters Documentation 12 OpenCL Video Filters

FFMPEG FFmpeg Filters Documentation 11 Video Filters 11.274 zoompan 11.274.1 Examples

FFMPEG FFmpeg Filters Documentation 11 Video Filters 11.270 xstack 11.270.1 Examples

FFMPEG FFmpeg Filters Documentation 11 Video Filters 11.268 xfade 11.268.1 Examples

FFMPEG FFmpeg Filters Documentation 11 Video Filters 11.265 weave, doubleweave 11.265.1 Examples