This course will teach you how to produce high-quality video with H. You'll become proficient in FFmpeg and will learn the key fundamentals of video compression, encoding, and adaptive bitrate packaging.
The course includes downloadable batch files to accelerate learning and production with PDFs of all lesson files for printing and note-taking. It also includes a free PDF copy of my book, Learn to Produce Video with FFmpeg: In Thirty Minutes or Less (2018 Edition), a $34.95 value (check it out on Amazon).
This course will teach you how to produce high-quality video with H. You'll become proficient in FFmpeg and will learn the key fundamentals of video compression, encoding, and adaptive bitrate packaging.
The course includes downloadable batch files to accelerate learning and production with PDFs of all lesson files for printing and note-taking. It also includes a free PDF copy of my book, Learn to Produce Video with FFmpeg: In Thirty Minutes or Less (2018 Edition), a $34.95 value (check it out on Amazon).
The course starts with the technology primer that covers the basics of compression and encoding. Then it details how to install FFmpeg on Windows, Mac, and Linux computers and provides an overview of batch operation on those platforms.
The next section covers generic file configuration options you'll use for all codecs, including lessons on bitrate control, resolution, frame rate, I-, B-, P- and reference-frame settings. These are followed by lessons on H.264 and HLS, including instructions on how to use Bento4 to package for DASH and HLS.
The next sections detail how to encode and package with HEVC and how to encode with VP9. The final section details how to use line continuation characters in your FFmpeg scripts and concludes with a lesson on live encoding with H.264.
Compressed files are comprised of three frame types, I-frames, B-frames, and P-frames. In this lesson, you’ll learn what each are and why they are important.
This lesson introduces you to basic FFmpeg operation. You'll learn which switches you need to include in your command strings and what happens when you don't.
In this lesson, you'll learn how to install FFmpeg on a Windows 10 computer and how to include FFmpeg in the path so you can run programs from any folder on any drive without including FFmpeg's address information in the command.
This lesson introduces you to command strings and batch files and details your options for running them in Windows.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
This lesson helps you get FFmpeg installed on the Mac and introduces you to command line and batch operation on the Mac platform.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Mac format. If you try to use them on Windows or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
In this lesson, you’ll learn how to choose a codec and container format in FFmpeg. You’ll also learn which parameters FFmpeg uses when you don’t assign them in a command string, which will help you create the most efficient command scripts possible.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
In this lesson, you’ll learn the difference between constant bitrate (CBR) and variable bitrate (VBR) encoding, and how the two techniques impact quality and file deliverability. You’ll also learn what the Video Buffering Verifier is and how it affects bitrate control.
In this lesson, you’ll learn how to encode using CBR and VBR.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
Constant Rate Factor (CRF) is a bitrate control mode available for x264, x265, and VP9 that can be used as a mechanism for per-title encoding. In this lesson, you’ll learn what CRF and capped CRF are, and how to use them.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
There’s a simple way and a complex way to choose video resolutions. In this lesson, you’ll learn the simple way, which you can use when encoding files to the same display aspect ratio as the original.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
The simple technique learned in the previous chapter doesn’t work when the display aspect ratio changes between the source and output file, which often occurs when encoding 4K source footage. In this lesson, you’ll learn four alternatives for dealing with this scenario, including how to crop and letterbox.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
This simple lesson details how to control the framerate in FFmpeg, and when you might want to change it.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
This lesson details how to set I-frame-related parameters with FFmpeg, including I-frame interval. minimum I-frame interval, and the threshold for scene-change detection.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
B-frames are the most efficient frames in the compressed file. In this lesson, you’ll learn how to choose and implement the optimal B-frame interval.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
Reference frames control encoding time and quality. In this lesson, you’ll learn how to choose the optimal reference frame setting for your quality and throughput.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
Unless you’re producing silent movies, you need to know how to encode audio as well as video. In this lesson, you’ll learn how to choose the right audio codec and set critical audio-related encoding parameters like channel, sample rate, and bitrate.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
This lesson covers when to use two-pass encoding, the basic syntax, and which parameters must be in the first and second pass.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
When producing DASH and HLS, you may need separate audio and video files. In this lesson, you’ll learn how to produce them.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
All previous lessons have been general and apply to most codecs. Now it’s time to dive into producing H.264. In this lesson, you’ll learn what H.264 is, and how it differs from x264.
You can download the batch files used and the presentation below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
Since this is a Windows script, it’s saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
H.264 profiles control quality and compatibility. In this lesson, you’ll learn how to choose the appropriate profile for all the rungs in your ABR ladder.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
H.264 levels impact compatibility, primarily with mobile. Here you’ll learn how to choose and implement the proper level.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
There are two entropy coding techniques in H.264; CABAC, and CAVLC. In this lesson, you’ll learn which to choose for your encoded H.264 files and how to do so in FFmpeg.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
x264 is an H.264 codec accessible in FFmpeg and the x264 preset controls the tradeoff between encoding time and quality. This lesson reviews that tradeoff and shows how to select the x264 preset. Note that if you're using a different H.264 codec accessible from FFmpeg, like the NVIDIA codec, you'll use different terms to control the preset. The ultrafast - placebo settings are particular to x264 and the x265 HEVC codecs.
You can download the batch files used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
This short introduction lesson teaches you how adaptive bitrate (ABR) technologies work, and the type of files you need to produce to make them work.
Manually Creating the Master Manifest File for HLS
You have multiple options for creating your master manifest file; you can create it by hand, create it in FFmpeg, or create it in Bento4. This lesson covers creating it by hand, which I don't recommend you do unless you absolutely have to.
Other lessons:
- Creating HLS output with master manifest in FFmpeg
- Producing HLS output from H264 files with Bento4 (mp4hls) to convert your existing MP4 files to HLS presentations
- Producing HLS/DASH output from H264 files with Bento4 to create an ABR package for DASH and HLS
Bento4 is a fabulous tool for creating HLS and DASH output from files that you've encoded. When I originally created this course, you needed to use Python 2.7 with Bento4. Since then, Bento4 has moved on to Python 3.x
In this lesson, you'll learn how to install Python 3.8 and Bento4 on a Windows 10 Computer, including how to insert Bento4 into your path to simplify operation. You'll need to install Bento4 before running any of the subsequent lessons regarding Bento4.
There are two batch files that I use to test the installation. If you'd like to follow along, you can download them here:
http://forpub.s3.amazonaws.com/Batch11_3.zip
https://forpub.s3.amazonaws.com/Batch11_5.zip
Bento4 is absolutely the easiest way to create HLS output from H264 files encoded in FFmpeg. In this lesson, you'll learn how to create HLS presentations from existing MP4 files with the mp4hls module.
You can download the source files and scripts here:
http://forpub.s3.amazonaws.com/Batch11_3.zip
Note that these are Windows scripts so you should save them into Mac or Linux formats for use on those platforms.
Producing HLS/DASH output from H264 files with Bento4 (mp4dash)
Bento4 is absolutely the easiest way to create DASH, HLS, or combined output from H264 files encoded in FFmpeg. In this lesson, you'll learn what Bento4 is, how to install it, and how to create DASH/HLS presentations with the mp4dash module.
You can access the files that I used in the lesson here:
http://forpub.s3.amazonaws.com/Batch11_4.zip
http://forpub.s3.amazonaws.com/Batch11_5.zip
Note that these are Windows scripts so you should save them into Mac or Linux formats for use on those platforms.
This lesson will introduce you to HEVC/H.265. You'll learn what it is, what it costs, what it's good for, and when to avoid using it.
HEVC is the next-generation standards-based codec. In this lesson, you’ll learn what it is, and how to produce HEVC encoded video in FFMpeg.
You can download the batch file used below. Be sure to grab the command strings from the batch file and not the presentation because between PowerPoint and creating the PDF, spurious characters could get into the script, interfering with operation.
You can change the names for use with your own files or download shortened versions of the test files from:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
Note that the batch files are saved in Windows format. If you try to use it on the Mac or Linux be sure to save the file into those formats; otherwise line feed characters may interfere with operation.
Producing Hybrid HEVC/H264 HLS Presentations
In this lesson, you'll learn how to create a hybrid HLS presentation with HEVC files for newer devices and H.264 files for legacy devices. You'll learn Apple's requirements for creating hybrid presentations and different approaches for building your encoding ladder.
In the next lecture, I'll actually create the combined presentation.
In the previous lesson, you learned how H.264 and HEVC can be included in the same encoding ladder. In this lesson you'll see it done, and can download batch files for encoding, creating the fragmented MP4 files, and creating the packaging.
You can access the source file that I used in the lesson here:
http://forpub.s3.amazonaws.com/FFmpeg_Source_files.zip
The batch files are below. Note that these are Windows scripts so you should save them into Mac or Linux formats for use on those platforms.
This lesson will introduce you to VP9. You'll learn what it is, what it costs, what it's good for, and when to avoid using it.
This is an advanced VP9 lecture from a webinar I hosted in mid-2021. It goes into much greater detail with VP9; probably more than you want to know. If you're OK with the basics, stick with the previous lecture. If you want your PhD. in VP9 encoding, invest an hour and you'll know as much as anyone.
In this lesson, you'll learn how to create multiple streams of live x264 output using FFmpeg.
Note that some of the quality conclusions in the lesson may be incorrect because one of the command strings contained an error. I've fixed the command strings in the downloads so they should work properly.
I apologize for any inconvenience.
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.