Skip to main content

Questions tagged [ffmpeg]

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 program for transcoding multimedia files.

Filter by
Sorted by
Tagged with
11 votes
1 answer
20k views

Video converted by FFMPEG has a different duration, why?

I convert videos using FFMPEG. My goal is to convert them to the MP4 container format (MPEG-4 Part 14) with AAC-encoded audio stream and MPEG-4 part 10-encoded video stream. I use the following line ...
Zsolt's user avatar
  • 213
11 votes
4 answers
7k 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 ...
Amir T's user avatar
  • 161
11 votes
4 answers
7k views

Moving Crop in Video

I have an HD video of a speaker giving a lecture. I would like to resize the video by cropping each frame, but the cropping rectangle needs to be centered on the speaker's head as he moves around the ...
David's user avatar
  • 211
10 votes
1 answer
14k views

ffmpeg default output frame rate

What is the default output frame rate chosen by ffmpeg to encode MP4s? Where is this specified on the man page? My input video stats are: r_frame_rate=120/1 avg_frame_rate=31230000/1042111 duration=...
Atcold's user avatar
  • 203
10 votes
2 answers
14k views

How to compile FFmpeg with libfdkaac into a single static binary? [closed]

My target is to build a single static FFmpeg binary with libfdkaac and x264 support for OSX and Linux. First, I tried to build one on OSX, I follow the instruction on FFmpeg web: https://trac.ffmpeg....
Ellis Shen's user avatar
10 votes
2 answers
5k views

4x resample videoframes using ffmpeg

I need to speed up video by a factor of 4x, but do not want to drop the frames and instead average them. I.e. each 4 frames are averaged, and produce 1 output frame. Target frame-rate stays the same, ...
BarsMonster's user avatar
10 votes
2 answers
16k views

How to trim out black frames with ffmpeg on windows?

I have a short video and I'm trying to cut-out all the blank or near blank frames. This isn't a case where I care about the breaks in a video that could be dark. I literally want all near black-...
Robert Koernke's user avatar
10 votes
1 answer
10k views

How to display static image if the input stream ends using ffmpeg?

I am receiving a stream over the network with the following ffmpeg command: ffmpeg -i rtmp://server:port/input.stream -f flv rtmp://server2:port/output.stream When the input stream stalls, I want to ...
Paul's user avatar
  • 101
10 votes
1 answer
12k views

Remove flickering due to artificial light with ffmpeg

I have video footage shot at shutter speeds of 1/30s under artificial light here in Europe where the AC is 50Hz. Flicker occurs -- obviously I should have used 1/25s or 1/50s but I didn't, and want to ...
Alessandro Amato del Monte's user avatar
10 votes
4 answers
10k views

What are some GUI that allow me to cut sections from a video without re-encode?

To illustrate: Say I want to delete the 10-11 minute point of a 20 minute video and create the new video of 19 minutes without re-encode. Same as described in the link below; think: removing ...
kite's user avatar
  • 513
10 votes
1 answer
35k views

Convert mp4 to avi while keeping frame rate and quality and being able to play in QuickTime?

I'm trying to convert an mp4 file to avi. I've tried this basic ffmpeg script: ffmpeg -i inputFile.mp4 outputFile.avi It works, but: the encoded avi file is very pixelated does not work with ...
d13's user avatar
  • 671
10 votes
3 answers
29k views

Howto Repaire or fix the duration of a mp4 video

I'm having a film that's ffmpeg and other progs claims to be 07:03:52 long, but the real playtime is actually more like 2:35:00 ffprobe video.mp4 ffprobe version 3.0.2 Copyright (c) 2007-2016 the ...
Joakim's user avatar
  • 101
10 votes
1 answer
3k 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 ...
theophilus777's user avatar
9 votes
3 answers
9k views

ffmpeg- What's the difference between "NN000/1000 fps" and "NN000/1001 fps"?

I'm trying to select the correct capture options for ffmpeg and I'm confused by this kind of listing: [decklink @ 00000000010564c0] 17 3840x2160 at 24000/1001 fps [decklink @ 00000000010564c0] ...
Patrick Kenny's user avatar
9 votes
3 answers
11k views

ffmpeg, first second of cut video part freezed

I use this to cut a part out of a mp4 file: ffmpeg -i input.mp4 -vcodec copy -acodec copy -ss 00:36:18 -to 00:39:50 output.mp4 It works good but the video image is always freezed in the beginning ...
gorschitsa's user avatar
9 votes
1 answer
10k views

Difference between duration_ts and duration in ffprobe output?

I am relatively a beginner in ffmpeg and video production and was trying to extract duration of a video using ffprobe, using the following command: ffprobe -loglevel error -select_streams v -...
pyvkd's user avatar
  • 93
9 votes
2 answers
11k views

What is the difference between ffmpeg and ffmbc now?

Two years ago I've used ffmbc to encode videos to prores, but nowadays ffmpeg also supports prores and avchd. What is the difference between ffmpeg and ffmbc now?
p2or's user avatar
  • 2,324
9 votes
2 answers
1k views

Video codec for simple animation?

I am generating an animation in Matlab, composed of simple diagrams. The images are characterized by fine structures, strong contrasts and mostly discrete colors, e.g. there are few-pixels wide black ...
A. Donda's user avatar
  • 231
9 votes
1 answer
11k views

Does ffmpeg have a configuration file?

Using a lot the ffmpeg program, I want to configure ffmpeg on linux so that it always hides banner (option -hide_banner) to reduce text output. I cannot seem to find anything that would tell me where ...
Luka's user avatar
  • 133
9 votes
1 answer
7k views

Copying h.264 video from TS into MP4 changes frame rate and time

I have large MPEG-TS file that I am converting to MP4 using the below command. If I seek to the same time in the video in both the MP4 and the TS file, the MP4 will be a few frames behind the TS ...
Andy's user avatar
  • 93
9 votes
0 answers
6k views

How to produce a zoom animation of a video source with ffmpeg?

I'd like to create a zoom-in animation over numerous frames of a video clip. I've tried a couple of approaches without much luck. ffmpeg -i test-10s.mp4 -vf "zoompan=z='zoom+0.001'" zoompan-10s.mp4 ...
intuited's user avatar
  • 256
8 votes
1 answer
13k 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 ...
xhassassin's user avatar
8 votes
3 answers
50k 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 ...
BigBeagle's user avatar
8 votes
1 answer
22k views

How to precisely trim video with ffmpeg? -ss and -t are off by more than a half second

To put this plainly, -ss and -t don't work very well or even consistently. I'm trying to take a single input file1 and only encode from a certain start point, -ss, and for only a certain time, -t. I'...
user3643's user avatar
  • 2,264
8 votes
1 answer
3k views

Speed up a video 30x using only key frames with ffmpeg?

I have a 30 fps video with a GOP 30 (1 i-frame per second). I'd like to create a version that is '30x faster', by dropping all frames except every 30th frame. I can do that as so: ffmpeg -i t1.mp4 -...
tom's user avatar
  • 181
8 votes
1 answer
13k views

Apply custom lut via ffmpeg?

I'd like to batch convert some log footage as well as transform each clip into rec709 colorspace. Is there any way to apply a custom lut to the footage? If so, what's the correct way to do that?
p2or's user avatar
  • 2,324
8 votes
3 answers
6k 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 ...
DJL's user avatar
  • 193
8 votes
1 answer
31k views

What CRF or settings I should choose for h265 in order to achieve a similiar quality of h264?

I'm doing some experiments with HEVC x265. I have a raw footage and the quality of details of h264 with same CRF setting looks better than h265. Shouldn't be the opposite? Maybe my setup isn't the ...
user3450548's user avatar
  • 1,680
8 votes
1 answer
6k views

Lossless convert 3gp video to mp4 using ffmpeg

I'm trying to get lossless conversion of 3gp to mp4 using ffmpeg. I tried ffmpeg -i input.3gp -vcodec h264 -c:a aac output.mp4 I tried with "libx264" for the video codec, I tried just a ...
D. Joe's user avatar
  • 183
8 votes
1 answer
28k views

ffmpeg - live stream into a browser video tag (localhost only)

I'm building an application, that is basically a video chat, where a user connects using WebRTC with another users (operator) browser, and should be able to talk to a third person. The WebRTC part is ...
user23829's user avatar
8 votes
1 answer
2k 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 ...
Derrick Miller's user avatar
8 votes
1 answer
4k views

ffmpeg - specify channel layout flags

I have the below file which I am re-mapping the audio and trying to set the channel layout flags on a Quicktime Prores file, but can't seem to get it working. I can successfully re-map the audio (from ...
speedyrazor's user avatar
7 votes
4 answers
5k 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 ...
tomsv's user avatar
  • 233
7 votes
3 answers
22k views

How to extract MOOV atom/metadata from MP4 file?

Can one "dump"/extract the MOOV atom from an MP4 file? If so, how? Hoping for an obscure FFMPEG command. I need to be able to process/play a stream without searching for the MOOV atom over and over ...
Mark Gerolimatos's user avatar
7 votes
2 answers
15k views

How to show number of available streams using ffmpeg?

I just want to see how many streams are inside my video file. I looked at the official documentation and I cannot see what option I can use. Perhaps another command/terminal app can do something ...
mrjayviper's user avatar
7 votes
2 answers
9k views

Add image under the video with ffmepg

I want to extend basic usage of watermark and put it under the video. That means. I have input video 720x480 and image 720x20. On output i want to have video 720x500 where video aspect is preserved ...
Schovi's user avatar
  • 171
7 votes
2 answers
1k views

How do I move (rearrange) the orientation of a video? Using ffmpeg

I want to crop the video at some position and move the part next to the part that wasn't cropped. (See image, it explains better)
นพดล คำมิตร's user avatar
7 votes
1 answer
14k views

How do i put the image behind video by using FFmpeg?

I have one video (400x300) and an image (1280x300). pls show me how can i put this image behind the video like that: i've try, but not working T-T
OYAKHILOME JOSHUA's user avatar
7 votes
1 answer
4k views

Digitize a VHS tape with FFmpeg and get a live preview

Digitize a VHS tape with FFmpeg On this thread, I found a perfect command to digitize a VHS tape with FFmpeg using a USB video grabber. All good with that; it works like a charm. Acceptable bitrate, ...
Thomas Devoogdt's user avatar
7 votes
2 answers
13k views

How to add images at the end of an existing movie?

I'd like to add some images at the end of a mp4 file via ffmpeg: Any help would be greatly appreciated.
kksky's user avatar
  • 91
7 votes
1 answer
14k views

Removing / Overlaying logo on mp4 video format with ffmpeg on linux

I'm trying to remove a logo from an .MP4 video format with ffmpeg on a Linux machine without re-encoding (for preserving the same quality) with the following command: ffmpeg -i input.mp4 -vf delogo=x=...
SilverShadow's user avatar
7 votes
2 answers
6k views

Correct lens distortion with ffmpeg

It seems to be possible to correct lens distortion with ffmpeg. According to the manual you can adjust K1 and K2 values. What this means? How to use it correctly? Example still image - captured with ...
p2or's user avatar
  • 2,324
7 votes
1 answer
20k 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: ...
bodacydo's user avatar
  • 271
7 votes
2 answers
12k views

ffmpeg not creating exact duration clip

I am trying to create small clips from video file using ffmpeg3. The type of clip and video will be same i.e. mp4 to mp4 only. Below is command, which is being used for same. ffmpeg -ss 00:07:00.000 -...
Nitishkumar Singh's user avatar
7 votes
2 answers
9k views

what graphics card features effect NVIDIA NVENC hardware encoding speed?

I have a web project I am working on that requires transcoding of multiple short video clips (6-10 seconds) uploaded by users into a web friendly H.264 format on my linux server. I have been able to ...
user255406's user avatar
7 votes
3 answers
5k views

Using ffmpeg to add height (as black bars) to video file without quality loss

I have a file of resolution 3840x1632, but my TV stretches the picture vertically to fill up all 2160 pixels of height. Is it possible to use ffmpeg to add blank / black height, while preserving the ...
Rosella's user avatar
  • 71
7 votes
1 answer
10k 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 ...
RMI's user avatar
  • 71
7 votes
4 answers
1k views

How to detect whether a video is shaky

I need to stabilize a video only when the video is shaky. I have successfully stabilized a video using FFmpeg, and I do not need to stabilize all the videos, I only need to stabilize the videos ...
madha kumar's user avatar
6 votes
2 answers
9k views

Removing MP4 encoding information

Is it possible to remove certain information form a MP4 file? Specifically things like tagging and encoding dates, Writing library and application, Encoding settings... No client needs to know when I ...
eppic's user avatar
  • 145
6 votes
2 answers
14k views

Change default audio track of Video file using ffmpeg [duplicate]

I have a video file with extension .mkv. It contains 2 Audio Tracks. English Hindi English Audio track is the default Audio track. I am trying to set the default Audio track to Hindi because when I ...
Pankaj's user avatar
  • 171

1
2
3 4 5
44