FFmpeg is a free software project that produces libraries and programs for handling multimedia data. The most notable parts of FFmpeg are libavcodec, an audio/video codec library used by several other projects, libavformat, an audio/video container mux and demux library, and the ffmpeg command line ...

learn more… | top users | synonyms

13
votes
1answer
24k views

How can I crop a video with ffmpeg?

I have an MP4 file of a screen recording that I need to crop down. How can I accomplish this without using expensive tools like Adobe Premier or Final Cut? I prefer ffmpeg because I have used it ...
7
votes
1answer
615 views

Batch resize videos with “pan and scan” cropping

I am trying to prepare a collection of ~120 video clips to be played in VLC Player and projected on a low-res (1024x768) projector during a DIY electronic music event. The source clips are all super ...
5
votes
4answers
3k views

How to get FFMPEG to join non-sequential image files? (skip by 3s)

I have a bunch of images, that follow this pattern. 0001.png 0004.png 0007.png 0010.png 0013.png 0016.png 0019.png ... They're in the correct order, but FFMPEG ignores anything after the first ...
5
votes
3answers
11k views

How can I use FFmpeg to lower the quality of H264 video but keep it in H264 format?

I'm a complete noob to video editing, so forgive me if I ask for something ridiculous. I'm getting video clips from a set top recorder box. The clips are AVI files: Resolution: 1920 x 1080 Frames ...
5
votes
1answer
4k views

How do I change frame size, preserving width (using ffmpeg)?

I'm new to this StackExchange site, and to using the ffmpeg encoder. I have a video that is 720x480 (3:2) that I would like to change to 720x406 (16:9) to match the other videos I have for a site. I ...
5
votes
2answers
1k views

OGV Format plays properly on my computer but transcoding drops (duplicate?) frames

I've made a set of screencasts using recordmydesktop on ubuntu 12.10. The output is an ogv file. When I watch the ogv file using the default movie player (totem) it looks fine - the audio and video ...
5
votes
1answer
381 views

How do I speedup encoding of a video that has just 1 static frame with ffmpeg and lib264 library?

I'm making mp4 (libx264 + aac) videos that have just one static image throughout the whole video. It's basically a narrated text with a nice background. The question I've is how could I speed up ...
4
votes
3answers
9k views

ffmpeg: how to losslessly encode many jpg images to a video?

I have a large set of jpgs that I want to convert to a video losslessly (or, at the very least, very close to losslessly as long as the encoding time isn't much higher than otherwise). Naively, I ...
4
votes
1answer
660 views

Repeat/loop Input Video with ffmpeg?

I just want to loop a mp4 video with ffmpeg and keep the current settings and codec. For example if input.mp4 is 0:10 long, and I would want to loop it 4 times so output.mp4 is 0:40 long, how could I ...
4
votes
3answers
795 views

creating a lossless mp4 screencast

I'm trying to create a screencast for playback on the web. Would like to use h.264, webm, and ogg. The source files are in the Apple Animation codec, and they look perfectly accurate. However when I ...
4
votes
1answer
334 views

How to create a x264 (mp4) video with the smallest size using ffmpeg that has just 1 image through entire video?

I'm creating narrated mp4 (x264+aac) videos for books. Each video has just the book's cover as the background. I wonder what would be the most effective way to create such videos with ffmpeg? I've ...
4
votes
0answers
101 views

Is it possible in FFMPEG to change scale over time?

Ok, so using the overlay filter, one can change the x/y location of a video over time by using the "t" variable. For example, overlay=x='if(gte(t,2), -w+(t-2)*20, NAN)':y=0 can be used to start ...
3
votes
2answers
618 views

How do I remove audio from all files in a directory with ffmpeg?

I have a directory full of short video clips in .AVI format, and I want to remove the audio from all of them. I'm using Ubuntu 12.04. I tried this command: find -name '*.avi' -exec ffmpeg -i {} -an ...
3
votes
2answers
65 views

How to encode a video at 30 FPS from images taken at 7 FPS

I have no knowledge whatsoever about video encoding, I have an application written in OpenGL and I am saving the frames it generated into png images. The frames from my app are at 7 FPS and I am ...
3
votes
1answer
31 views

ffmpeg input from images stream out video

I am using ffmpeg to capture a video recording device and would like to add an overlay to it . I have images being rendered on the fly and I would like to use them as the overlay . How can I take a ...
3
votes
2answers
518 views

How to hold the last frame when using ffmpeg

I'm cutting/converting some videos with ffmpeg. What I'd really like is to be able to have the output hold the last frame for a few seconds (with silence for audio). Is such a thing possible? Or ...
3
votes
1answer
162 views

Combine multiple videos as separate streams in one mkv file

So I have multiple videos of the same scenery from different angles. These are stored as separate files. Can I combine these as multiple video streams within one file? For example I know this is ...
3
votes
2answers
74 views

drop similar frames

I'd like to record a very long video from webcam which will be mostly the same. I'd like to drop intermediate frames that are very similar to each other to save on filesize and also make it easier to ...
3
votes
2answers
3k views

How can I convert .MTS file (AVCHD) to .mp4 by ffmpeg without re-encoding H264 video stream?

Note: I posted same question to stackoverflow a short time before, when I have not found this comunity yet. I repost this since the question is more suitable to this community. 1. What I tried I ...
3
votes
1answer
231 views

Creating stereoscopic video from two video files

I've got two video files, each created with ffmpeg from a series of JPEG images, which I've obtained from rendering with a stereo camera in Maya. I would like to somehow merge together these videos ...
3
votes
1answer
1k views

Add an image in front of video using ffmpeg

I have many videos and I need to put an image in front of them for about 5 seconds, but adding it manually and rendering it each time would take really long, so I am asking if it is possible to do so ...
3
votes
1answer
2k views

How to trim a video with frame precision using ffmpeg?

I need to trim videos with a precise end frame, however, ffmpeg seems to cut the video at the nearest first key-frame. So I don't have enough control over the ending frame. I try to insert key-frame ...
3
votes
2answers
116 views

Why is this ffmpeg command outputting such long clips?

I am trying edit out a two minute clip from a long movie. This is the command I'm using: ffmpeg -ss 01:05:16 -t 120 -i input.avi -vcodec copy -an clips/output.avi I thought that 120 would be in ...
2
votes
3answers
429 views

Why isn't ffmpeg used in movie production or broadcasting tool chains?

Is the assumption in the title true? What is preventing the use of ffmpeg when producing a movie or broadcast quality material? Are there any prominent or well known users of ffmpeg? What is used ...
2
votes
3answers
9k views

How do I specify baseline H264 profile using FFmbc?

I am using FFmbc (a FFmpeg derivative) to transcode some video files to H264 (in a mov wrapper). I want to specify baseline profile (to reduce CPU usage) but can't figure out how. There doesn't seem ...
2
votes
3answers
219 views

FFmpeg MP4 to FLV too slow

I am converting .mp4 files to .flv using ffmpeg in centos. But the conversion time is extremely too slow! It takes about 1.5 hours to convert 500MB .mp4 file into .flv. I am using a linux vps with 2 ...
2
votes
3answers
218 views

h264 settings for large flat areas of slowly changing colour

I'm doing an animation for a projection mapping that simulates the sun casting shadows on a structure as it moves through the sky. Basically it's just big flat areas of colour that change over about ...
2
votes
3answers
385 views

ffmpeg: Normalize audio in an avi file

Ι have an avi file that has different levels of audio. Is there a way to decrease and increase appropriately where needed the audio of my file using ffmpeg?
2
votes
1answer
2k views

How to concatenate clips from the same video with ffmpeg

I have a long video with different scenes in it. I want to extract and concatenate 2 scenes from the video (that do not start on an I-frame) using ffmpeg 2.1.4. For argument, say I want 5 seconds ...
2
votes
1answer
2k views

What ffmpeg/avconv format and container will Adobe Premiere Pro accept, out-of-box?

All of these converted, but Premiere Pro only loads the audio. I use Ctrl-I to import the videos, and they come up as waveforms, and can only be placed on audio tracks. These examples use avconv, ...
2
votes
2answers
2k views

How to do a video live stream through a VPS?

I've been looking at a million resources and I can't find a definitive answer to this. I'm looking to do a small scale (max 50 viewers possibly), low quality live video stream, with nothing but my ...
2
votes
1answer
54 views

Similar to “levels adjustment” brightness improvement with ffmpeg

I'm composing a video from set of 16bit tiff pictures. The pictures are very dark, and needs to be brightened. Currently I'm applying -vf "mp=eq2=1.0:1.0:0.3:1.0:1.0:1.0:1.0:1.0" filter to make ...
2
votes
1answer
36 views

ffmpeg framemd5 format explanation

Does a frame consist of audio and video or just video? I am trying to verify if this can be used for confirming both audio and video data were successfully sent or if I need to handle the audio ...
2
votes
1answer
1k views

Video Capture using ffmpeg (V4L2 indev) Results in Bad A/V Sync

I actually contributed to a bug report on this issue a year and a half ago ( https://trac.ffmpeg.org/ticket/692#comment:15 ). Basically, the problem is that using ffmpeg to record from a USB video ...
2
votes
1answer
647 views

restart encoding with ffmpeg when bad source

I have an ffmpeg process which saves a stream from wowza server, but when the stream in wowza is interrupted for a second or so sometimes ffmpeg cycles in: [segment @ 0x671a10] st:0 PTS: 9600015 DTS: ...
2
votes
1answer
4k views

How to force ffmpeg to insert keyframe at first frame when downsampling a framerate of a video with x264 vcodec

I have a mpeg4 video at 25fps. This video contains just one static frame. I'm trying to downsample the frame rate to 1fps and convert the video to x246 (mp4). I ran the following ffmpeg command: ...
2
votes
1answer
115 views

How do I prevent Quality loss in the beginning of a video?

My company transcodes videos sent in by users (recorder by our own screenrecording software) I use FFMpeg to do the work using this command: /ffmpeg/ffmpeg -i in.mov -vcodec libx264 -fpre ...
2
votes
1answer
54 views

FFMpeg and HLS, videos need to load in their entirety before they start playing

I am using ffmpeg to generate a segmented list of files in order to stream them to an iOS app. The list of files is generated fine but when it comes time to play them, the video needs to be downloaded ...
2
votes
1answer
28 views

ffmpeg adds unneeded zero samples at beginning of resulting m4a file

Input file original.wav ffmpeg -i original.wav ... Duration: 00:03:36.93, bitrate: 1411 kb/s Convert wav to m4a with fdk-aac encoder: ffmpeg -i original.wav -c:a libfdk_aac -vbr 5 ffmpeg.m4a ...
2
votes
1answer
138 views

Output file longer than source with ffmpeg

I'm producing several versions of a clip (320x180 24 fps and aprox 2Mbps) compressed with h.264 with ffmpeg using Avanti. Each version has different framerate. The video output has a slightly ...
2
votes
1answer
76 views

Reduce quality percentage wise

I have several movie files in a mkv container. ffmpeg -i filename gives me the following output: Stream #0.0(eng): Video: h264 (High), yuv420p, 1280x720, PAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k ...
2
votes
1answer
81 views

disabling streams in quicktime movies with ffmpeg

In Quicktime pro you can turn off streams in movies, without deleting the stream. Is it possible to do this with a command line application like ffmpeg? I have a bunch of video files that were ...
2
votes
1answer
254 views

Adding image to a video file using ffmpeg

I have created a OGG file from a stream of jpegs using fmpeg within a c# application. I would like to know if it is possible to add an image (of same size and resolution) at a later date to this ogg ...
2
votes
1answer
114 views

Lossy output with FFMPEG JPEG 2000

I'm trying to achieve a lossy JPEG 2000 output with FFMPEG, but no success so far. Using this command line: ffmpeg -i input.dpx -pix_fmt yuv420p -vcodec libopenjpeg output.jp2 As a result I get ...
2
votes
1answer
87 views

Unable to concatenate videos due to identical MOOV atoms

I am cutting out segments from a long mp4 file and then rejoining parts of them. However, since FFMPEG apparently keeps the same MOOV atom for the trimmed files as the original, it looks to FFMPEG ...
2
votes
0answers
79 views

segment does not contain sync frame

Whenever I split a video using Apple's mediafilesegmenter, using the following command: medifilesegmenter video.ts -t 10. I get the following error for each segment except the first: segment does not ...
1
vote
2answers
160 views

Why does quality degrade so much if just cutting video with ffmpeg?

I have tried to cut video with the following command ffmpeg -i "Вспомнить все (Total Recall, 1990).avi" -ss 01:07:29 -to 01:08:05 fight.avi Output: Input #0, avi, from '╨Т╤Б╨┐╨╛╨╝╨╜╨╕╤В╤М ╨▓╤Б╨╡ ...
1
vote
2answers
264 views

YouTube 3gp encoding settings

I'm building a new media site and I'm taking cues from YouTube for which video file formats I should offer for widespread usability among mobile and desktop clients. I'm doing all transcoding using ...
1
vote
2answers
4k views

How do I recover truncated AVI/DV video?

Short version: I believe I have truncated but otherwise valid AVI/DV files that won't play in any player I've tried (Adobe Premiere, MPC HC, VLC). I assume the stream data is intact but truncated, and ...
1
vote
1answer
167 views

Crop video in ffmpeg without re-encoding

I have videos I want to split across multiple screens, so the solution I've found so far is to just crop the input video 4 times with ffmpeg (is this optimal? Is there some other way so I only need to ...