Since the input stream is encoded ffmpeg has to convert it into a "lossless" codec. That is a codec that only contains I-Frames. Avi is a container of streams and thus does not know anything about "converting".
After selecting all the options, the Media Autobuild Suite script will download the MingW environment and all the required dependencies. It will also clone the FFMPEG and other relevant repositories. The script will then compile all the components and build the final executable that can be found in the build\ffmpeg-git subfolder.
Once the FFmpeg binary with NVIDIA hardware acceleration support is compiled, hardware-accelerated video transcode should be tested to ensure everything works well. To automatically detect NV-accelerated video codec and keep video frames in GPU memory for transcoding, the ffmpeg cli option "-hwaccel cuda -hwaccel_output_format cude" is used in further code snippets.
The NVENC plugin in FFMPEG supports the following codecs: h264_nvenc - H264 Encoder hevc_nvenc - HEVC Encoder av1_nvenc - AV1 Encoder The command lines in this document use h264_nvenc, and should be replaced by hevc_nvenc for HEVC encode and av1_nvenc for AV1 encode.
The following command reads file input.mp4 and transcodes it to output.mp4 with H.264 video at 720p resolution and with the same audio codec. The following command uses the built in resizer in cuvid decoder.
FFmpeg may come with different builds, which support different codecs and features. The one you get via the recommended installer includes most common one, but apparently not MPEG-H. You may want to try other builds listed here: Installing FFmpeg - Audacity Support
This weekend I experimented a little with re-encoding videoas H.265/HEVC, now that the codec has good support on bothhardware and in Mac OS/iOS. The FFmpeg wikiestimates that you should be able to produce video files ofsimilar video quality as H.264 that are about half thesize. That sort of space saving should be interesting toeverybody, but especially for those who carry videos aroundon laptops, which still tend to come with SSDs of modestsize even in the advanced year of 2019.
Part of a bug report that I am writing for ffmpeg's MOV output handling may include the mpg2 and mpgv failure behavior (with the desired behavior being success), but before I do that I need to be certain that this behavior is a bug rather than appropriate behavior.
So my question boils down to this: Are mpg2 and mpgv valid, allowable alternative tags for MPEG-2 video in an MOV file, and are there others? I am looking for official Apple sources and MOV specifications rather than anecdotal evidence or lists of generally observed FourCC's / codec IDs.
I know that, at least according to Wikipedia, MPEG-2 video in an MOV is an acceptable combination, I'm just not sure what the acceptable set of codec tags are in MOVs. This question is not about the "correct" MPEG-2 ID in general cases, it is about the allowable variants specifically in MOVs.
MPEG-2 doesn't seem to be an officially sanctioned codec for the Quicktime container. The official specification has a section related to MPEG-1 in MOV but not MPEG-2. The US Library of Congress also does not have an entry for the subtype MPEG-2 in MOV, like it does for MPEG-1 (just called QTV_MPEG).
So, there's no official word on "allowable alternative tags". One can only examine MPEG-2 MOVs and see whether apps, specifically, Apple apps, play them or not and prepare a survey report. Since each app has its own fiat on whether it plays a file with a certain codec ID or not, that report whould be categorized by app i.e. VLC, Quicktime player. FCP..etc.
The limitations are partly from ffmpeg-free, libavcodec-free, and gstreamer1-plugins-ugly-free all of which come directly from fedora and do not support any codecs that are patent, license, or copyright encumbered. These can be replaced with the same packages but with slightly different names from rpmfusion. (libavcodec-freeworld, ffmpeg, and gstreamer1-plugins-ugly).
The related commands would be
I've been using ffmpeg for the occasional video conversion for quite some time, and recently discovered that H.264 (libx264) videos generated by ffmpeg aren't working in iMovie or QuickTime (nor will they play or show a preview in Finder with the quick view feature).
It turns out that ffmpeg have chosen a default pixel format of yuv444p for libx264 encoding (under some circumstances), which is not compatible with Apple's software/hardware H.264 decoders (and perhaps not very widely compatible in general?). Unfortunately this seems unlikely to change, and there's no warning about it, so just something you have to know if using ffmpeg to make H.264 files.
However, there is still a solution. Modern video codecs can deliver excellent quality while preserving a very reasonable size. Using video for animation with proper optimization is always better than GIF and sometimes outperforms native implementations. In this article, we will learn about codecs like VP9 and H265, and how we can optimize video using ffmpeg tool.
This topic can be confusing, so it's important to learn the difference. Think of video format as a container that defines file structure for carrying video and audio streams. Video and audio streams inside these containers are multimedia data encoded with codec. Some popular examples of video formats are mp4, WebM, or MKV. Famous codecs are H264, H265, and VP8/9.
WebM is an open, royalty-free media file format designed for the web. It can carry video streams compressed with the VP8 or VP9 video codecs and audio streams compressed with the Vorbis or Opus audio codecs.
It can save up to 20-50% in size compared with H264 codecs retaining the same quality level. Every modern browser on desktop and mobile supports it, except Safari on iOS. Apple brought WebM support since macOS Big Sur to Safari on desktops, but to this day failed to make any progress on its mobile version.
H265, a.k.a HEVC (High-Efficiency Video Coding), is a codec supported by Apple and shows the same 20-50% better efficiency than its H264 older brother. It is not a royalty-free codec - perhaps, that is why the adoption rate is much less than of WebM's.
There are two most popular tools for video optimization - Handbrake and ffmpeg. Handbrake has a GUI, and it makes it much easier to use; however, using ffmpeg is a more flexible option in case you want to render videos with alpha(transparent) channels or use hardware acceleration that speeds up compression a lot. Also, I find it much easier to share single ffmpeg commands across the team instead of showing where to click things in Handbrake.
For better visualization, I am going to show you how applying different options to ffmpeg decreases the file size and changes the quality. All tests run using one of the animations we've made for a recent project.
Additionally to the previously mentioned arguments, ffmpeg VP9 and H265 codecs accept -crf flag . It enables constant quality mode, which guarantees a certain perceptual quality level within the entire video by passing a number from 0-63(VP9) and 0-51(H265), where 0 is the best quality and the maximum number is the worst.
ffmpeg has more video optimization settings available, such as Constrained Quality, Two-passes, Constant bitrate, and Lossless. But they either increase the encoding time significantly or require more tries to find the best bitrate setting to achieve similar results that you can do with Constant Quality (crf) mode.
A codec is a little routine that compresses the video so that it will fit on a Blu-ray,or be able to be streamed out over the Internet, over a cable, or just be a reasonable file size.Codecs compress the channels of a video down to save space and enable continuous playback.Lossy codecs make smaller files at the expense of image quality,while lossless codecs compress as much as possible the video, but without losing any existing data.
Some codecs, like H.264, are great for larger images. Codecs are used to encode and decode the movie,and so must be present on both the encoding machine (Blender) and the target machine.The results of the encoding are stored in a container file.
There are dozens, if not hundreds, of codecs, including Xvid, H.264, DivX, Microsoft,and so on. Each has advantages and disadvantages, and compatibility with different players ondifferent operating systems.
Video encoding via the FFmpeg library. Which codecs are availabledepends on the operating system and FFmpeg version. This options allowsfor a lot of different encodings, some presets are available(to the right of the Encoding subpanel) to help with getting started.This option is also the only one allowing to export audio.
A standard for lossy compression of video and audio.It is designed to compress VHS-quality raw digital video and CD audio down to 1.5 Mbit/s.This container enforces the video codec, you can only define quality parameters, and the audio codec.
A multi-tracks format. QuickTime and MP4 container formats can use the same codecs.They are mostly interchangeable in a QuickTime-only environment.MP4, being an international standard, has more support.
An intra-frame video compression scheme, used by many digital camcorders back in the days.It uses the discrete cosine transform (DCT, similar algorithm to JPEG)to compress video on a frame-by-frame basis.Audio is stored uncompressed.This container enforces the video codec, you can only define quality parameters.
FFV1 is a lossless intra-frame video codec.It can use either variable length coding or arithmetic coding for entropy coding.The encoder and decoder are part of the free, open-source library libavcodec in FFmpeg.Supports an alpha channel.
chromium-codecs-ffmpeg-nonfree is kind of a funny name. The Ubuntu ffmpeg packages include those MPEG decoders/demuxers by default. Ubuntu also includes "-unstripped" packages that include *encoders* for various patented MPEG formats.
Most Ubuntu packages that seem to include nonfree in the name either are closed source like (flashplugin-nonfree) or are licensed under terms incompatible with the Debian Free Software Guidelines (like ttf-xfree86-nonfree). FFmpeg as used in chromium-codecs-ffmpeg-nonfree is licensed under the LGPL v2.1.
df19127ead