FFmpeg简介

FFmpeg的官网,功能强大是每位学习音视频开发者所必须掌握的。

命令行简述

ffmpeg -i /Users/twin/Desktop/input.mp4 -r 24 output.mp4

ffmpeg version git-2019-11-09-bb190de Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.8)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-appkit --enable-avfoundation --enable-coreimage --enable-audiotoolbox
  libavutil      56. 35.101 / 56. 35.101
  libavcodec     58. 60.100 / 58. 60.100
  libavformat    58. 34.101 / 58. 34.101
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 66.100 /  7. 66.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/twin/Desktop/input.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.58.101
  Duration: 00:00:10.75, start: 0.000000, bitrate: 528 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 384x640, 488 kb/s, 24 fps, 24 tbr, 12288 tbn, 96 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 48 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x7fa98a811600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fa98a811600] profile High, level 3.0, 4:2:0, 8-bit
[libx264 @ 0x7fa98a811600] 264 - core 158 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.34.101
    Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 384x640, q=-1--1, 24 fps, 12288 tbn, 24 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc58.60.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      encoder         : Lavc58.60.100 aac
frame=  136 fps=0.0 q=28.0 size=       0kB time=00:00:05.92 bitrate=   0.1kbits/frame=  249 fps=247 q=28.0 size=     512kB time=00:00:10.65 bitrate= 393.6kbits/frame=  250 fps=209 q=-1.0 Lsize=     862kB time=00:00:10.72 bitrate= 658.1kbits/s speed=8.96x    
video:683kB audio:170kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.068347%
[libx264 @ 0x7fa98a811600] frame I:3     Avg QP:22.22  size:  6281
[libx264 @ 0x7fa98a811600] frame P:72    Avg QP:23.72  size:  4758
[libx264 @ 0x7fa98a811600] frame B:175   Avg QP:25.33  size:  1928
[libx264 @ 0x7fa98a811600] consecutive B-frames:  1.2%  9.6% 20.4% 68.8%
[libx264 @ 0x7fa98a811600] mb I  I16..4: 17.2% 78.9%  4.0%
[libx264 @ 0x7fa98a811600] mb P  I16..4:  9.5% 38.3%  1.0%  P16..4: 35.2%  9.3%  2.1%  0.0%  0.0%    skip: 4.7%
[libx264 @ 0x7fa98a811600] mb B  I16..4:  1.8%  5.3%  0.1%  B16..8: 45.5%  5.4%  0.4%  direct: 2.5%  skip:39.1%  L0:46.3% L1:50.5% BI: 3.3%
[libx264 @ 0x7fa98a811600] 8x8 transform intra:77.3% inter:92.8%
[libx264 @ 0x7fa98a811600] coded y,uvDC,uvAC intra: 44.0% 72.9% 7.1% inter: 12.1% 26.3% 0.1%
[libx264 @ 0x7fa98a811600] i16 v,h,dc,p: 20% 16%  5% 60%
[libx264 @ 0x7fa98a811600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 15% 14%  6%  8%  9%  8% 10%  5%
[libx264 @ 0x7fa98a811600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 16% 11%  6% 11%  9%  7%  8%  3%
[libx264 @ 0x7fa98a811600] i8c dc,h,v,p: 49% 19% 21% 11%
[libx264 @ 0x7fa98a811600] Weighted P-Frames: Y:6.9% UV:4.2%
[libx264 @ 0x7fa98a811600] ref P L0: 66.6% 12.1% 15.2%  5.6%  0.4%
[libx264 @ 0x7fa98a811600] ref B L0: 92.2%  6.4%  1.5%
[libx264 @ 0x7fa98a811600] ref B L1: 98.1%  1.9%
[libx264 @ 0x7fa98a811600] kb/s:536.73
[aac @ 0x7fa98a812e00] Qavg: 955.508
  • ffmpeg:包含FFmpeg的各种功能,如GIF、格式转换、截图、编解码等。
  • ffmpeg-all:包含FFmpeg工具及FFmpeg组件。
  • ffplay:一个使用FFmpeg和SDL库的、简单的、可移植的媒体播放器
  • ffplay-all:包含ffplay工具及FFmpeg组件。
  • ffprobe:用来查多媒体信息。
  • ffprobe-all:包含ffprobe工具及FFmpeg组件。
  • ffserver:与流媒体服务器有关,负责响应客户端的流媒体请求,把流媒体数据发送给客户端。
  • ffserver-all:包含ffserver工具及FFmpeg组件。
    组件概述
  • Utilities:libavutils提供的通用的features及工具
  • Video scaling and pixel format converter:视频缩放和像素格式转换
  • Audio resampler:音频重新取样
  • Encoders and decoders:编码和解码
  • Bitstream filters:码流过滤器
  • Muxers and demuxers:数据合成及数据分离
  • Protocol:协议
  • Input and output devices:输入和输出设备
  • Filters:过滤器
    类库概述
  • libavutil:包含一些公共的工具函数的使用库
  • libswscale:原视频比列缩放、色彩映射转换、图像颜色空间或格式转换(RGB565、RGB888等与YUV420等之间的转换)
  • libswresample:原始音频格式转码
  • libavcodec:编解码(核心库)
  • libavformat:音视频封装格式的生成和解析
  • libavdevice:硬件采集、加速、显示
  • libavfilter:音视频数据做一些效果处理如去色调、模糊、水平翻转、裁剪、加方框、叠加文字等功能。
  • libswresample:音视频封装编解码格式预设等
  • libpostproc:后期效果处理(图像的去块效应)

FFMPEG源码目录结构

你可能感兴趣的:(FFmpeg简介)