FFMPEG 使用记录
ffmpeg官方文档提供了详细的描述
ffmpeg Documentationhttp://ffmpeg.org/ffmpeg.html#Main-options
ffmpeg是一个非常快速的视频和音频转换器,也可以从实时音频/视频源抓取。它还可以在任意采样率之间转换,并使用高质量的多相滤波器动态调整视频大小。
以下是常用的参数说明
-f指定文件的格式,-i指定输入文件(即ffmpeg要处理的文件),-y直接覆盖输出文件(不用询问要不要覆盖)
1. -f 参数说明
-f 参数指定了输入输出文件的格式,在linux终端敲入 ffmpeg -formats即可看到ffmpeg所支持的所有格式的文件
(base) sh@sh:~/Documents/video/converfile$ ffmpeg -formats
ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
File formats:
D. = Demuxing supported
.E = Muxing supported
--
D 3dostr 3DO STR
E 3g2 3GP2 (3GPP2 file format)
E 3gp 3GP (3GPP file format)
D 4xm 4X Technologies
E a64 a64 - video for Commodore 64
D aa Audible AA format files
D aac raw ADTS AAC (Advanced Audio Coding)
DE ac3 raw AC-3
D acm Interplay ACM
D act ACT Voice file format
D adf Artworx Data Format
D adp ADP
D ads Sony PS2 ADS
E adts ADTS AAC (Advanced Audio Coding)
DE adx CRI ADX
D aea MD STUDIO audio
D afc AFC
DE aiff Audio IFF
D aix CRI AIX
DE alaw PCM A-law
D alias_pix Alias/Wavefront PIX image
DE alsa ALSA audio output
DE amr 3GPP AMR
D anm Deluxe Paint Animation
D apc CRYO APC
D ape Monkey's Audio
DE apng Animated Portable Network Graphics
D aqtitle AQTitle subtitles
DE asf ASF (Advanced / Active Streaming Format)
D asf_o ASF (Advanced / Active Streaming Format)
E asf_stream ASF (Advanced / Active Streaming Format)
DE ass SSA (SubStation Alpha) subtitle
DE ast AST (Audio Stream)
DE au Sun AU
DE avi AVI (Audio Video Interleaved)
D avisynth AviSynth script
E avm2 SWF (ShockWave Flash) (AVM2)
D avr AVR (Audio Visual Research)
D avs AVS
D bethsoftvid Bethesda Softworks VID
D bfi Brute Force & Ignorance
D bfstm BFSTM (Binary Cafe Stream)
D bin Binary text
D bink Bink
DE bit G.729 BIT file format
D bmp_pipe piped bmp sequence
D bmv Discworld II BMV
D boa Black Ops Audio
D brender_pix BRender PIX image
D brstm BRSTM (Binary Revolution Stream)
D c93 Interplay C93
E caca caca (color ASCII art) output device
DE caf Apple CAF (Core Audio Format)
DE cavsvideo raw Chinese AVS (Audio Video Standard) video
D cdg CD Graphics
D cdxl Commodore CDXL video
E chromaprint Chromaprint
D cine Phantom Cine
D concat Virtual concatenation script
E crc CRC testing
DE dash DASH Muxer
DE data raw data
DE daud D-Cinema audio
D dcstr Sega DC STR
D dds_pipe piped dds sequence
D dfa Chronomaster DFA
DE dirac raw Dirac
DE dnxhd raw DNxHD (SMPTE VC-3)
D dpx_pipe piped dpx sequence
D dsf DSD Stream File (DSF)
D dsicin Delphine Software International CIN
D dss Digital Speech Standard (DSS)
DE dts raw DTS
D dtshd raw DTS-HD
DE dv DV (Digital Video)
D dvbsub raw dvbsub
D dvbtxt dvbtxt
E dvd MPEG-2 PS (DVD VOB)
D dxa DXA
D ea Electronic Arts Multimedia
D ea_cdata Electronic Arts cdata
DE eac3 raw E-AC-3
D epaf Ensoniq Paris Audio File
D exr_pipe piped exr sequence
DE f32be PCM 32-bit floating-point big-endian
DE f32le PCM 32-bit floating-point little-endian
E f4v F4V Adobe Flash Video
DE f64be PCM 64-bit floating-point big-endian
DE f64le PCM 64-bit floating-point little-endian
DE fbdev Linux framebuffer
DE ffm FFM (FFserver live feed)
DE ffmetadata FFmpeg metadata in text
E fifo FIFO queue pseudo-muxer
D film_cpk Sega FILM / CPK
DE filmstrip Adobe Filmstrip
DE fits Flexible Image Transport System
DE flac raw FLAC
D flic FLI/FLC/FLX animation
DE flv FLV (Flash Video)
E framecrc framecrc testing
E framehash Per-frame hash testing
E framemd5 Per-frame MD5 testing
D frm Megalux Frame
D fsb FMOD Sample Bank
DE g722 raw G.722
DE g723_1 raw G.723.1
DE g726 raw big-endian G.726 ("left-justified")
DE g726le raw little-endian G.726 ("right-justified")
D g729 G.729 raw format demuxer
D gdv Gremlin Digital Video
D genh GENeric Header
DE gif GIF Animation
DE gsm raw GSM
DE gxf GXF (General eXchange Format)
DE h261 raw H.261
DE h263 raw H.263
DE h264 raw H.264 video
E hash Hash testing
E hds HDS Muxer
DE hevc raw HEVC video
E hls Apple HTTP Live Streaming
D hls,applehttp Apple HTTP Live Streaming
D hnm Cryo HNM v4
DE ico Microsoft Windows ICO
D idcin id Cinematic
D idf iCE Draw File
D iec61883 libiec61883 (new DV1394) A/V input device
D iff IFF (Interchange File Format)
DE ilbc iLBC storage
DE image2 image2 sequence
DE image2pipe piped image2 sequence
D ingenient raw Ingenient MJPEG
D ipmovie Interplay MVE
E ipod iPod H.264 MP4 (MPEG-4 Part 14)
DE ircam Berkeley/IRCAM/CARL Sound Format
E ismv ISMV/ISMA (Smooth Streaming)
D iss Funcom ISS
D iv8 IndigoVision 8000 video
DE ivf On2 IVF
D ivr IVR (Internet Video Recording)
D j2k_pipe piped j2k sequence
D jack JACK Audio Connection Kit
DE jacosub JACOsub subtitle format
D jpeg_pipe piped jpeg sequence
D jpegls_pipe piped jpegls sequence
D jv Bitmap Brothers JV
D kmsgrab KMS screen capture
E latm LOAS/LATM
D lavfi Libavfilter virtual input device
D libcdio
D libdc1394 dc1394 v.2 A/V grab
D libgme Game Music Emu demuxer
D libopenmpt Tracker formats (libopenmpt)
D live_flv live RTMP FLV (Flash Video)
D lmlm4 raw lmlm4
D loas LOAS AudioSyncStream
DE lrc LRC lyrics
D lvf LVF
D lxf VR native stream (LXF)
DE m4v raw MPEG-4 video
E matroska Matroska
D matroska,webm Matroska / WebM
E md5 MD5 testing
D mgsts Metal Gear Solid: The Twin Snakes
DE microdvd MicroDVD subtitle format
DE mjpeg raw MJPEG video
D mjpeg_2000 raw MJPEG 2000 video
E mkvtimestamp_v2 extract pts as timecode v2 format, as defined by mkvtoolnix
DE mlp raw MLP
D mlv Magic Lantern Video (MLV)
D mm American Laser Games MM
DE mmf Yamaha SMAF
E mov QuickTime / MOV
D mov,mp4,m4a,3gp,3g2,mj2 QuickTime / MOV
E mp2 MP2 (MPEG audio layer 2)
DE mp3 MP3 (MPEG audio layer 3)
E mp4 MP4 (MPEG-4 Part 14)
D mpc Musepack
D mpc8 Musepack SV8
DE mpeg MPEG-1 Systems / MPEG program stream
E mpeg1video raw MPEG-1 video
E mpeg2video raw MPEG-2 video
DE mpegts MPEG-TS (MPEG-2 Transport Stream)
D mpegtsraw raw MPEG-TS (MPEG-2 Transport Stream)
D mpegvideo raw MPEG video
DE mpjpeg MIME multipart JPEG
D mpl2 MPL2 subtitles
D mpsub MPlayer subtitles
D msf Sony PS3 MSF
D msnwctcp MSN TCP Webcam stream
D mtaf Konami PS2 MTAF
D mtv MTV
DE mulaw PCM mu-law
D musx Eurocom MUSX
D mv Silicon Graphics Movie
D mvi Motion Pixels MVI
DE mxf MXF (Material eXchange Format)
E mxf_d10 MXF (Material eXchange Format) D-10 Mapping
E mxf_opatom MXF (Material eXchange Format) Operational Pattern Atom
D mxg MxPEG clip
D nc NC camera feed
D nistsphere NIST SPeech HEader REsources
D nsv Nullsoft Streaming Video
E null raw null video
DE nut NUT
D nuv NuppelVideo
E oga Ogg Audio
DE ogg Ogg
E ogv Ogg Video
DE oma Sony OpenMG audio
D openal OpenAL audio capture device
E opengl OpenGL output
E opus Ogg Opus
DE oss OSS (Open Sound System) playback
D paf Amazing Studio Packed Animation File
D pam_pipe piped pam sequence
D pbm_pipe piped pbm sequence
D pcx_pipe piped pcx sequence
D pgm_pipe piped pgm sequence
D pgmyuv_pipe piped pgmyuv sequence
D pictor_pipe piped pictor sequence
D pjs PJS (Phoenix Japanimation Society) subtitles
D pmp Playstation Portable PMP
D png_pipe piped png sequence
D ppm_pipe piped ppm sequence
D psd_pipe piped psd sequence
E psp PSP MP4 (MPEG-4 Part 14)
D psxstr Sony Playstation STR
DE pulse Pulse audio output
D pva TechnoTrend PVA
D pvf PVF (Portable Voice Format)
D qcp QCP
D qdraw_pipe piped qdraw sequence
D r3d REDCODE R3D
DE rawvideo raw video
D realtext RealText subtitle format
D redspark RedSpark
D rl2 RL2
DE rm RealMedia
DE roq raw id RoQ
D rpl RPL / ARMovie
D rsd GameCube RSD
DE rso Lego Mindstorms RSO
DE rtp RTP output
E rtp_mpegts RTP/mpegts output format
DE rtsp RTSP output
DE s16be PCM signed 16-bit big-endian
DE s16le PCM signed 16-bit little-endian
DE s24be PCM signed 24-bit big-endian
DE s24le PCM signed 24-bit little-endian
DE s32be PCM signed 32-bit big-endian
DE s32le PCM signed 32-bit little-endian
D s337m SMPTE 337M
DE s8 PCM signed 8-bit
D sami SAMI subtitle format
DE sap SAP output
D sbg SBaGen binaural beats script
DE scc Scenarist Closed Captions
E sdl,sdl2 SDL2 output device
D sdp SDP
D sdr2 SDR2
D sds MIDI Sample Dump Standard
D sdx Sample Dump eXchange
E segment segment
D sgi_pipe piped sgi sequence
D shn raw Shorten
D siff Beam Software SIFF
E singlejpeg JPEG single image
D sln Asterisk raw pcm
DE smjpeg Loki SDL MJPEG
D smk Smacker
E smoothstreaming Smooth Streaming Muxer
D smush LucasArts Smush
DE sndio sndio audio playback
D sol Sierra SOL
DE sox SoX native
DE spdif IEC 61937 (used on S/PDIF - IEC958)
E spx Ogg Speex
DE srt SubRip subtitle
D stl Spruce subtitle format
E stream_segment,ssegment streaming segment muxer
D subviewer SubViewer subtitle format
D subviewer1 SubViewer v1 subtitle format
D sunrast_pipe piped sunrast sequence
DE sup raw HDMV Presentation Graphic Stream subtitles
D svag Konami PS2 SVAG
E svcd MPEG-2 PS (SVCD)
D svg_pipe piped svg sequence
DE swf SWF (ShockWave Flash)
D tak raw TAK
D tedcaptions TED Talks captions
E tee Multiple muxer tee
D thp THP
D tiertexseq Tiertex Limited SEQ
D tiff_pipe piped tiff sequence
D tmv 8088flex TMV
DE truehd raw TrueHD
DE tta TTA (True Audio)
D tty Tele-typewriter
D txd Renderware TeXture Dictionary
DE u16be PCM unsigned 16-bit big-endian
DE u16le PCM unsigned 16-bit little-endian
DE u24be PCM unsigned 24-bit big-endian
DE u24le PCM unsigned 24-bit little-endian
DE u32be PCM unsigned 32-bit big-endian
DE u32le PCM unsigned 32-bit little-endian
DE u8 PCM unsigned 8-bit
E uncodedframecrc uncoded framecrc testing
D v210 Uncompressed 4:2:2 10-bit
D v210x Uncompressed 4:2:2 10-bit
E v4l2 Video4Linux2 output device
D vag Sony PS2 VAG
DE vc1 raw VC-1 video
DE vc1test VC-1 test bitstream
E vcd MPEG-1 Systems / MPEG program stream (VCD)
D video4linux2,v4l2 Video4Linux2 device grab
D vivo Vivo
D vmd Sierra VMD
E vob MPEG-2 PS (VOB)
D vobsub VobSub subtitle format
DE voc Creative Voice
D vpk Sony PS2 VPK
D vplayer VPlayer subtitles
D vqf Nippon Telegraph and Telephone Corporation (NTT) TwinVQ
DE w64 Sony Wave64
DE wav WAV / WAVE (Waveform Audio)
D wc3movie Wing Commander III movie
E webm WebM
E webm_chunk WebM Chunk Muxer
DE webm_dash_manifest WebM DASH Manifest
E webp WebP
D webp_pipe piped webp sequence
DE webvtt WebVTT subtitle
D wsaud Westwood Studios audio
D wsd Wideband Single-bit Data (WSD)
D wsvqa Westwood Studios VQA
DE wtv Windows Television (WTV)
DE wv raw WavPack
D wve Psion 3 audio
D x11grab X11 screen capture, using XCB
D xa Maxis XA
D xbin eXtended BINary text (XBIN)
D xmv Microsoft XMV
D xpm_pipe piped xpm sequence
E xv XV (XVideo) output device
D xvag Sony PS3 XVAG
D xwma Microsoft xWMA
D yop Psygnosis YOP
DE yuv4mpegpipe YUV4MPEG pipe
可以看出,ffmpeg支持我们常见的视频格式文件avi,flv,mov,mp4.
其中.E =Muxing supported 可以简单理解为合并文件的意思,如将视频文件、音频文件和字幕文件合并为某一个视频格式。而D. = Demuxing supported是拆分这些文件的。参考下面博客说明
2. -pix_fmt 参数说明
pix_fmt是指像素格式,比如说rgb, rgba, rgb24, yuv420p,nv12等,使用ffmepg -pix_fmts可以看到所有支持的格式.
(base) sh@sh:~/Documents/video/converfile$ ffmpeg -pix_fmts
ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Pixel formats:
I.... = Supported Input format for conversion
.O... = Supported Output format for conversion
..H.. = Hardware accelerated format
...P. = Paletted format
....B = Bitstream format
FLAGS NAME NB_COMPONENTS BITS_PER_PIXEL
-----
IO... yuv420p 3 12
IO... yuyv422 3 16
IO... rgb24 3 24
IO... bgr24 3 24
IO... yuv422p 3 16
IO... yuv444p 3 24
IO... yuv410p 3 9
IO... yuv411p 3 12
IO... gray 1 8
IO..B monow 1 1
IO..B monob 1 1
I..P. pal8 1 8
IO... yuvj420p 3 12
IO... yuvj422p 3 16
IO... yuvj444p 3 24
..H.. xvmcmc 0 0
..H.. xvmcidct 0 0
IO... uyvy422 3 16
..... uyyvyy411 3 12
IO... bgr8 3 8
.O..B bgr4 3 4
IO... bgr4_byte 3 4
IO... rgb8 3 8
.O..B rgb4 3 4
IO... rgb4_byte 3 4
IO... nv12 3 12
IO... nv21 3 12
IO... argb 4 32
IO... rgba 4 32
IO... abgr 4 32
IO... bgra 4 32
IO... gray16be 1 16
IO... gray16le 1 16
IO... yuv440p 3 16
IO... yuvj440p 3 16
IO... yuva420p 4 20
..H.. vdpau_h264 0 0
..H.. vdpau_mpeg1 0 0
..H.. vdpau_mpeg2 0 0
..H.. vdpau_wmv3 0 0
..H.. vdpau_vc1 0 0
IO... rgb48be 3 48
IO... rgb48le 3 48
IO... rgb565be 3 16
IO... rgb565le 3 16
IO... rgb555be 3 15
IO... rgb555le 3 15
IO... bgr565be 3 16
IO... bgr565le 3 16
IO... bgr555be 3 15
IO... bgr555le 3 15
..H.. vaapi_moco 0 0
..H.. vaapi_idct 0 0
..H.. vaapi_vld 0 0
IO... yuv420p16le 3 24
IO... yuv420p16be 3 24
IO... yuv422p16le 3 32
IO... yuv422p16be 3 32
IO... yuv444p16le 3 48
IO... yuv444p16be 3 48
..H.. vdpau_mpeg4 0 0
..H.. dxva2_vld 0 0
IO... rgb444le 3 12
IO... rgb444be 3 12
IO... bgr444le 3 12
IO... bgr444be 3 12
IO... ya8 2 16
IO... bgr48be 3 48
IO... bgr48le 3 48
IO... yuv420p9be 3 13
IO... yuv420p9le 3 13
IO... yuv420p10be 3 15
IO... yuv420p10le 3 15
IO... yuv422p10be 3 20
IO... yuv422p10le 3 20
IO... yuv444p9be 3 27
IO... yuv444p9le 3 27
IO... yuv444p10be 3 30
IO... yuv444p10le 3 30
IO... yuv422p9be 3 18
IO... yuv422p9le 3 18
..H.. vda_vld 0 0
IO... gbrp 3 24
IO... gbrp9be 3 27
IO... gbrp9le 3 27
IO... gbrp10be 3 30
IO... gbrp10le 3 30
IO... gbrp16be 3 48
IO... gbrp16le 3 48
IO... yuva422p 4 24
IO... yuva444p 4 32
IO... yuva420p9be 4 22
IO... yuva420p9le 4 22
IO... yuva422p9be 4 27
IO... yuva422p9le 4 27
IO... yuva444p9be 4 36
IO... yuva444p9le 4 36
IO... yuva420p10be 4 25
IO... yuva420p10le 4 25
IO... yuva422p10be 4 30
IO... yuva422p10le 4 30
IO... yuva444p10be 4 40
IO... yuva444p10le 4 40
IO... yuva420p16be 4 40
IO... yuva420p16le 4 40
IO... yuva422p16be 4 48
IO... yuva422p16le 4 48
IO... yuva444p16be 4 64
IO... yuva444p16le 4 64
..H.. vdpau 0 0
IO... xyz12le 3 36
IO... xyz12be 3 36
..... nv16 3 16
..... nv20le 3 20
..... nv20be 3 20
IO... rgba64be 4 64
IO... rgba64le 4 64
IO... bgra64be 4 64
IO... bgra64le 4 64
IO... yvyu422 3 16
..H.. vda 0 0
I.... ya16be 2 32
I.... ya16le 2 32
IO... gbrap 4 32
IO... gbrap16be 4 64
IO... gbrap16le 4 64
..H.. qsv 0 0
..H.. mmal 0 0
..H.. d3d11va_vld 0 0
..H.. cuda 0 0
IO... 0rgb 3 24
IO... rgb0 3 24
IO... 0bgr 3 24
IO... bgr0 3 24
IO... yuv420p12be 3 18
IO... yuv420p12le 3 18
IO... yuv420p14be 3 21
IO... yuv420p14le 3 21
IO... yuv422p12be 3 24
IO... yuv422p12le 3 24
IO... yuv422p14be 3 28
IO... yuv422p14le 3 28
IO... yuv444p12be 3 36
IO... yuv444p12le 3 36
IO... yuv444p14be 3 42
IO... yuv444p14le 3 42
IO... gbrp12be 3 36
IO... gbrp12le 3 36
IO... gbrp14be 3 42
IO... gbrp14le 3 42
IO... yuvj411p 3 12
I.... bayer_bggr8 3 8
I.... bayer_rggb8 3 8
I.... bayer_gbrg8 3 8
I.... bayer_grbg8 3 8
I.... bayer_bggr16le 3 16
I.... bayer_bggr16be 3 16
I.... bayer_rggb16le 3 16
I.... bayer_rggb16be 3 16
I.... bayer_gbrg16le 3 16
I.... bayer_gbrg16be 3 16
I.... bayer_grbg16le 3 16
I.... bayer_grbg16be 3 16
IO... yuv440p10le 3 20
IO... yuv440p10be 3 20
IO... yuv440p12le 3 24
IO... yuv440p12be 3 24
IO... ayuv64le 4 64
..... ayuv64be 4 64
..H.. videotoolbox_vld 0 0
IO... p010le 3 15
IO... p010be 3 15
IO... gbrap12be 4 48
IO... gbrap12le 4 48
IO... gbrap10be 4 40
IO... gbrap10le 4 40
..H.. mediacodec 0 0
IO... gray12be 1 12
IO... gray12le 1 12
IO... gray10be 1 10
IO... gray10le 1 10
I.... p016le 3 24
I.... p016be 3 24
..H.. d3d11 0 0
IO... gray9be 1 9
IO... gray9le 1 9
..... gbrpf32be 3 96
..... gbrpf32le 3 96
..... gbrapf32be 4 128
..... gbrapf32le 4 128
..H.. drm_prime 0 0
3. -s参数说明
-s参数用来设置图像帧的大小
作为输入选项,这是 video_size 私有选项的快捷方式(意思是可以用-s 参数替代-video_size参数),被一些解复用器识别,其帧大小未存储在文件中或可配置 - 例如 原始视频或视频采集器。
也就说rawvideo完全存储的是图像的像素值,并没有存储图像分辨率信息(或者说是图像的大小,比如说1080*1080),如果要将rawvideo的数据转换成jpg,需要带上的参数有-f,-s,-pix_fmt
ffmpeg -f rawvideo -pix_fmt rgb24 -s 1080x1080 -i test.bin test.jpg
文章来自于网络,如果侵犯了您的权益,请联系站长删除!