Tag Info

Hot answers tagged

7

The -loop option is specific to the image file demuxer and gif muxer, so it can't be used for typical video files, but you can use the concat demuxer. Concat demuxer Make a text file. Contents of an example text file to repeat 4 times. $ cat list.txt file 'input.mp4' file 'input.mp4' file 'input.mp4' file 'input.mp4' Then run ffmpeg: ffmpeg -f concat ...


5

Use it. Nothing else can provide the the same quality per bitrate as x264 (the top-class H.264 encoder) while not taking 10,000 years to encode (x265 'n VP9). Some tips: Use a recent ffmpeg build since development is so active. Static builds are available and easy. Add -movflags +faststart to your command. Once encoding is finished this option will ...


5

Use drawbox for the box, and drawtext for the text. ffmpeg -i input.mp4 -vf \ "format=yuv444p, \ drawbox=y=ih/PHI:color=black@0.4:width=iw:height=48:t=max, \ drawtext=fontfile=OpenSans-Regular.ttf:text='Title of this Video':fontcolor=white:fontsize=24:x=(w-tw)/2:y=(h/PHI)+th, \ format=yuv420p" \ -c:v libx264 -c:a copy -movflags +faststart output.mp4 ...


4

This should work faster... ffmpeg -ss 1:00 -t 5 -i in.mkv -ss 2:00 -t 5 -i in.mkv \ -filter_complex "[0][1]concat=n=2:v=1:a=1" \ out.mkv There's no need to specify -t on the output. There's no need to split the audio and video before the concat.


4

I work as an assistant editor on feature films, and use ffmpeg all the time, primarily for two purposes: Transcoding files to be uploaded for producers to view on digital dailies systems (Dax, PIX, etc). I've written up shell scripts that accept property-of and recipient strings as command line input, along with target bitrate, and then generate the ...


4

-preset Use the slowest preset that is fast enough that it does not drop frames. You can see if ffmpeg is dropping frames in the console output (if I recall correctly). Presets are: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow. -crf Use the highest -crf value that still provides an acceptable quality level. Range is 0-51. 0 ...


4

A videofilter in ffmpeg always has to modify pixel information hence the reason why you need to re-encode. It seems logical at first that you wouldn't have to do this when cropping but the way lossy video codecs work makes this pretty impossible without re-encoding everything. They usually don't see an array of pixel information but a much more complex ...


4

Why would you want your videos in the .3gp container to begin with? Its a very irrelevant format nowadays, there is practically no device that supports the 3gp container but not MP4 at the same time. Its nothing but a close derivative of MP4, they are very similar container formats holding the same codec. If you want to support a lot of devices using h264 in ...


4

Couldn't wait! Figured it out: I saved an image to the file out.png at a fixed frame rate from processing. Created a fifo: mkfifo fifo Then in one terminal: tail -f out.png > fifo Then in another terminal: cat fifo | ffmpeg -f image2pipe -r 1 -i pipe:0 spo.mp4 Making sure to close tail first allowing ffmpeg to write the last bit of the file.


4

You could possibly use the curves filter. It has a lighter preset: ffmpeg -i input -vf curves=preset=lighter -c:a copy output The red, green, and blue components can be adjusted separately. The following is the same as what the lighter preset uses: curves=r='0.4/0.5':g='0.4/0.5':b='0.4/0.5' Additionally you can make your own curves preset in ...


4

One difference at least : -target xdcamhd422 is supported by FFmbc but not by FFmpeg. Very useful in a professional broadcast environment. the -target option allows to specify several parameters at once. The -target option value must be one supported by FFm**. In the case of the xdcamhd422 value, it specifies the video codec to be used (mpeg2video), the ...


4

Usage differences Note: ffmbc/ffmpeg will refer to the tools, while FFmbc/FFmpeg will refer to the projects themselves and/or each whole collection of tools and libraries. There are syntax differences including: ffmbc uses the old, confusing -newaudio option while ffmpeg can just use -map. ffmbc does not support -codec or -c, so instead all stream types ...


4

Choose your license FFmpeg is licensed under the GNU Lesser General Public License (LGPL) version 2.1 or later. Some features are covered by the GNU General Public License (GPL) version 2 or later. If those parts get used the GPL applies to all of FFmpeg. See LICENSE.md in the source to see a list of GPL parts of FFmpeg and which external libraries require ...


4

You are correct: h.264 is non-free and content producers as well as developers are obliged to pay royalties to MPEGLA for its use - but only if they are charging for their content, and the volume goes over the threshold MPEGLA sets (which is in the order of 100,000 paying subscribers or > 12 minutes in length if charging title-by-title). Thjey have also said ...


4

The default settings for ffmpeg are very low quality, and since you don't specify any codec or quality parameters it's just using the defaults (I don't know why the devs don't fix that because it generates a lot of questions on forums everywhere). Try adding -c:v libx264 -crf 20 -preset slow to the command. -c:v libx264 tells it to use the libx264 ...


4

You can use AtomicParsley to parse the metadata of a MP4-file. For example AtomicParsley /path/to.mp4 -T 1 will print the whole atom tree.


4

This is possible but will require scripting. ffprobe will be used to determine the duration of the input, then the countdown and background box will be created by the drawtext filter. A 30 second input will start from 30 and count down to 0. Example: input=input.mp4 duration=$(ffprobe -loglevel error -show_entries format=duration -of default=nw=1:nk=1 ...


4

Hope this explanation is what you're looking for: When you transcode to an encoding such as H.264 (MPEG-4 part 10) you necessarily also resample the video, that's part of H.264 compression technique. Nontheless, I doubt if this is the reason you experience a timing gap since the resampling doesn't necessarily influence the clock rate of the media. So, I ...


3

Yes, this is possible using ffmpeg and the mkv container. An example command sequence would be: ffmpeg -i input1 -i input2 -c copy -map 0 -map 1 output.mkv source Breaking down the command: -i input1 This selects the first input file. Could be something like my video_track1.mov. -i input2 Here you can specify the second input file. You can add another ...


3

Although I am not sure if stderr will really help here because of the way that ffmpeg does its reporting, I can recommend the following pattern. Use the -progress [url] flag and parse it with the tool of your choice every 100ms or so. Here is something to get you started that (with a little tweaking) might do what you want: #!/bin/bash touch ...


3

There are two frame rates to consider: the input and the output. By default the input frame rate is 25, and the output will use the same frame rate as the input unless you tell it otherwise. Same frame rate for input and output If you want to input and output to have the same frame rate, then just provide the input frame rate. This example will set a ...


3

I'm using the below code to do the same thing. ffmpeg -framerate 30 -i img%03d.png -c:v libx264 -pix_fmt yuv420p -crf 23 output.mp4 This reads the input at 30 fps (the -framerate 30 option) and encodes it using the libx264 codec with constant rate factor of 23 (the -crf 23 option).


3

A container is what the name implies, a container for video data and audio data (and other misc. data). This might go a little bit under your know-how but just to make it easy to understand: A video is made up by frames which are made up by pixels. A codec like h265/HEVC is there to take this pixel information and process it in a way that makes it a lot ...


3

You specify a preset and a quality value at the same time and by that overriding the preset. I would also recommend you don't encode with ffmpeg while capturing as this would be pretty slow on most PCs. The "error" in your ffmpeg commandline is the option -crf 1. CRF is a quality setting of x264 and the lower the value the higher the bitrate of the video ...


3

To expand on LordNeckbeard's answer, yes, just mux the JPEG data into an MJPEG video stream. That will be the smallest representation of the exact sequence of output images, even though MJPEG is a terribly inefficient codec by today's standards. (no temporal redundancy, and not even any intra prediction. You can make a variable-framerate MJPEG video to ...


3

This will output a lossless H.264 video where frames will use information from other frames ffmpeg -f image2 -r 30 -i %09d.jpg -vcodec libx264 -profile:v high444 -refs 16 -crf 0 -preset ultrafast a.mp4 Explanation of options: -f image2 - tells ffmpeg to select a group of images -r 30 - tells ffmpeg to encode at 30 frames (or images) per second (change ...


3

x264 must be compiled with --bit-depth=10. Note that the resulting build will not be able to output 8-bit depth. Of course you can have separate builds, but whatever build ffmpeg is linked to will determine what bit depth it can output.


3

I think it is easier to combine a full dimension background image (720x500px) with your video in ffmpeg instead of adding the 20px footer to the video. You can simply use the overlay filter for this: ffmpeg \ -loop 1 -i 720x500.jpg \ -i 720x480.mp4 \ -filter_complex overlay=0:0 \ -t 0:01.48 \ out.m4v Note: In this example you have to ...


3

You can use the pad video filter to add the required space on the bottom, and then the overlay video filter to place the image: ffmpeg -i video.vob -i image.png -filter_complex \ "[0:v]pad=0:ih+20[bg];[bg][1:v]overlay=0:H-h,format=yuv420p[v]" \ -map "[v]" -map 0:a -c:v libx264 -c:a aac -strict -2 -movflags +faststart output.mp4 I had to make some ...


3

Thanks for stib's suggestion. I leave my answer here. FFmepg build process take higher priority to use dynamic library even if static libraries are ready. Therefore, I first removed some external libraries support from build configuration and make sure all external libraries are only static (remove *.dylib from prefix /usr/local/lib). Then rebuild it with ...



Only top voted, non community-wiki answers of a minimum length are eligible