Fireship · @fireship

FFmpeg in 100 Seconds

Uploaded March 9, 2023 · Length 2:20

FFmpeg in 100 Seconds

Summary

FFmpeg tutorial covering its features, usage, and command line options for processing audio and video files.

  • ffmpeg
  • video processing
  • audio processing
  • command line tool
  • multimedia

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    ffmpeg and open source command line tool

  2. 0:02

    for processing audio and video files it

  3. 0:05

    was created by Fabrice Bullard in the

  4. 0:07

    year 2000. the name stands for Fast

  5. 0:08

    Forward followed by the moving picture

  6. 0:10

    experts group file format today it's

  7. 0:12

    used in a wide variety of tools like

  8. 0:14

    Google Chrome and blender as well as

  9. 0:16

    video platforms like YouTube and Vimeo

  10. 0:18

    it's able to decode encode transcode

  11. 0:20

    Multiplex D Multiplex stream filter and

  12. 0:23

    play virtually any multimedia file in

  13. 0:25

    the world with over 100 different codecs

  14. 0:27

    supported it works by taking an input

  15. 0:29

    file that then passes it to a d

  16. 0:31

    multiplexer that splits the audio and

  17. 0:33

    video tracks into separate encoded data

  18. 0:35

    packets these packets are then decoded

  19. 0:37

    into uncompressed frames which can be

  20. 0:39

    further processed and filtered you might

  21. 0:41

    modify the brightness and contrast add

  22. 0:43

    subtitles or visualize the audio as a

  23. 0:45

    waveform then finally these frames are

  24. 0:47

    encoded and multiplexed back into the

  25. 0:49

    output file in addition it also comes

  26. 0:51

    with the FF play tool to easily play

  27. 0:53

    media from the command line and FF probe

  28. 0:55

    to extract metadata from the file in

  29. 0:57

    addition to tons of low-level libraries

  30. 0:59

    for develop developers building their

  31. 1:01

    own multimedia processing software to

  32. 1:03

    get started install it then open up the

  33. 1:05

    terminal use the ffmpeg command followed

  34. 1:07

    by I to supply one or more input files

  35. 1:10

    to convert that file to a different

  36. 1:12

    format simply provide the name of the

  37. 1:13

    output it will automatically detect the

  38. 1:15

    file extension and convert it to the

  39. 1:17

    proper codec or the C flag can be used

  40. 1:19

    to specify an explicit codec like mpeg-4

  41. 1:21

    for the video track and mp3 for the

  42. 1:24

    audio you may also want to change the

  43. 1:25

    quality of the output file the B flag

  44. 1:28

    can change the bitrate while the r flag

  45. 1:30

    can change the frame rate and S can

  46. 1:32

    change the resolution in some cases you

  47. 1:34

    may have multiple video clips that need

  48. 1:36

    to be combined together these clips can

  49. 1:37

    be listed in their own text file then

  50. 1:39

    combined together by specifying the

  51. 1:41

    format as concat and the codec as copy

  52. 1:44

    copy can also be used to make

  53. 1:45

    modifications to a video like when used

  54. 1:47

    with t to trim a certain number of

  55. 1:49

    seconds off of the video footage but the

  56. 1:51

    most powerful option might be VF which

  57. 1:53

    creates a filter graph that can handle

  58. 1:55

    Transformations like rotation and

  59. 1:57

    scaling and color modifications like

  60. 1:59

    brightness and contrast in addition to