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
3
votes
1answer
1k views

replace black frames with previous frames

I have problematic footage from diving due to my camera/SD card - every 4th or so frame is just black, and I want to replace all those black frames with either an interpolation between the previous ...
3
votes
1answer
8k views

FFMPEG: Loop video to the length of audio

E.g. if video is 1 minute, but audio is 1 hour. Make video loop throughout for 1 hour of the audio track. I use this solution to loop image through the lenght of the audio ffmpeg -y -loop 1 -r 6 -i ...
3
votes
2answers
499 views

How to swap sides of side-by-side video chat interview?

I recorded a video interview using Zoom Cloud Meetings, and the 2 participants appear to be looking away from each other instead of towards each other: How can I swap the sides? The resolution is ...
3
votes
1answer
2k views

ffmpeg transpose=clock rotates 180 degrees instead 90

I have 2 similar videos created on the same mobile. The first one can be downloaded here. If I'm using the following command the result is correctly rotated by 90 degrees: ffmpeg -i 20180114_193135....
3
votes
2answers
6k views

Can I add motion blur to make animation less jerky?

I am doing an animation, and if I do things the easy way, fast moving objects end up jerking across the screen, rather than appearing to move smoothly – in other words, I have a temporal aliasing ...
3
votes
1answer
1k views

Why is ffmpeg outputting a 600fps video from a 120fps video input?

I have a very short 120fps video. ffprobe input.mp4 shows 118.99fps: ffprobe version 3.0 Copyright (c) 2007-2016 the FFmpeg developers built with Apple LLVM version 7.3.0 (clang-703.0.29) ...
3
votes
1answer
4k views

ffmpeg concat with or without audio

I'm splitting and merging a single video clip using this ffmpeg command: -ss 0 -t 1 -i C:\source.mp4 -ss 3 -t 1 -i C:\source.mp4 -ss 6 -t 1 -i C:\source.mp4 -ss 9 -t 1 -i C:\source.mp4 -...
3
votes
1answer
4k views

FFMPEG: Why does the concat filter cause loss of a/v sync/lipsync?

I am doing some tests with the FFMPEG concat filter (DASH experiments), and am seeing that I start losing lipsync after a few concatenations. Is it expected that one can concatenate independent MP4-...
3
votes
1answer
2k views

Frames with pict_type=I yet key_frame=0

I am trying to exrtact key frame information from a mp4 video using ffprobe with the command: ffprobe -select_streams v -show_frames FILE_NAME 2>/dev/null I am getting the list of all frames. ...
3
votes
1answer
575 views

Is H.264 subject to exploits / are some H.264 codecs subject to exploits?

How safe are H.264 streams from exploits? More exactly, are the consumer-grade H.264 codes generally "safe"? I am currently gratuitously transcoding A/V files to avoid being exposed to possible ...
3
votes
2answers
5k 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 ...
3
votes
1answer
71 views

How to filter out overlapping audio? Given a mixed track and one stem track, what's the best way to “subtract” the stem from the mix?

Given two audio streams, I'd like to remove the audio in one stream that also exists in another. In this particular case the 1st stream contains everything mixed, and the 2nd stream contains just the ...
3
votes
1answer
1k views

FFMPEG - convert video to Black & White with threshold?

I'd like to convert videos to black and white but also specify the threshold of what to convert to black/white. I'm currently using cv2 to do this successfully using the 2 lines below (first converts ...
3
votes
1answer
209 views

Adding audio to picture: video too long even when using -shortest

I am trying to combine an audio (.wav) file and picture file (.png) into a video file. The video's length should be the same length as the input audio. Also, the output video should be youtube-...
3
votes
1answer
804 views

ffmpeg: how to ignore an EDIT LIST?

I've got a 10-minute long mp4 file which plays just fine with VLC. Apple Quicktime however plays only the first 6.5 seconds, stops and can't be convinced to jump past that. Similarly, when I try ...
3
votes
1answer
12k 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'...
3
votes
1answer
2k views

Use ffmpeg to extract 15 frames at specific intervals

I'm new to using ffmpeg, but I want to extract 15 consecutive frames (resized to 320x240) at specific time intervals from an existing video. What I have so far is this: ffmpeg -ss 30 -i inVideo.mp4 -...
3
votes
2answers
900 views

How to create “diagonal wipe” effect in FFmpeg?

Is it possible to create "diagonal wipe" effect in FFmpeg between two videos? An example: the first video is playing and after some time the second video is replacing the first video starting from the ...
3
votes
2answers
3k views

How to combine ffmpeg vf commands for resizing and color correction?

I'm currently using the following batch script to run an ffmpeg command: @echo off title Convert videos to Mp4 h.264 with FFMPEG. echo This script will find all video files of a given extension then ...
3
votes
1answer
7k views

How to change framerate with ffmpeg without re-encoding?

I have lots of large mjpeg timelapse videos, and I would like to speed them up with ffmpeg without loosing quality, dropping or creating frames. Video: mjpeg (MJPG / 0x47504A4D), yuvj420p(pc, bt470bg/...
3
votes
1answer
7k views

ffmpeg to convert and merge 3 videos to a single widescreen video

I have three .mov files with video in Apple ProRes (apcn) and audio in PCM S24 LE (in24), of identical length and dimensions (1920x1080), frame rate (23.976024) and each with the same audio track. I'd ...
3
votes
1answer
414 views

How to divide the video into four parts at once?

I'm trying to make a custom video wall so i need to split some videos and I'm diving video into N parts at N times using ffmpeg. There is any way to divide videos at once?
3
votes
1answer
1k views

Why can't my video play from where I drag the playback bar?

I am stuck and really do not know how to explain it in correct manner. Thus I put it in the layman details. I have two 30~ second length mp4 videos saved in cloud storage. video1 is generated by ...
3
votes
1answer
3k views

Is there any ffmpeg command for knowing max bit rate of a video?

I have an MP4 file input.mp4 which is encoded in libx264. By ffprobe command: ffprobe -v error -show_streams input.mp4 I can know the bit rate of input.mp4, but it does not give the information of ...
3
votes
1answer
2k views

inserting video clip into another video but keep original audio

I need to replace video in a larger mp4 file with a smaller mp4 clip - but leaving the original (larger clip) audio intact. So for example I might want the first 2 seconds of SmallClip.mp4 to replace ...
3
votes
1answer
5k views

convert horizontal side by side to vertically stacked 3D video

I have seen this and this post explaining how to crop and stack videos using ffmpeg. My question is - is there an easy (preferably one step) way to turn a horizontally stacked video into a vertically ...
3
votes
1answer
1k views

ffv1 realtime capture throws out a lot of frame dropped messages!

Can you help me to figure out what's going on here? I'm trying to capture in realtime my screen and save it losslessy via ffv1 codec. CPU usage while recording is not so much, as comparison h264 in ...
3
votes
1answer
530 views

FFMPEG standard transcoding settings

I am working on a project that provides video streaming to the users over the internet on web-browsers as well as mobile devices. I am using following sample FFMPEG command to transcode the video: ...
3
votes
2answers
3k views

How can I set the first frame of a video to an I-frame and the rest to P-frames (preferably with ffmpeg)?

I'd like to try to do some datamoshing like this tutorial. But I'd like to be able to do it programatically, so instead of vdub and avidemux, I'd like to figure out how to do as many parts of this ...
3
votes
1answer
1k views

How can you use ffmpeg's afftdn -sn flag to sample noise from a reference noise file?

The FFmpeg documentation for the afftdn audio filter says for the -sn flag: sample_noise, sn Start or stop measuring noise profile. Syntax for the command is : "start" or "stop" string. After ...
3
votes
1answer
50 views

ffmpeg output file includes two video sequences but input file only one

I want to copy from the source mkv-file the video stream (only once) and the German audio stream and all subtitles if available. The Problem is that sometimes is the video stream copied twice in the ...
3
votes
1answer
324 views

How to change frame rate of MJPEG segments with/without re-encoding?

I'm trying to record segments using a webcam and save these segments with a lower fps. I've tried this command, but it keeps giving me an error: ffmpeg -f v4l2 -input_format mjpeg -video_size 800x600 ...
3
votes
1answer
765 views

Add image as intro and outro to video

Here is basically what I'm trying to do. I have two files : 1. image.png 2. video.mp4 I'm trying to create a new video file (mp4) with : IMAGE.PNG for the first 5 seconds VIDEO.MP4 for the ...
3
votes
1answer
2k views

Add timecode information to file

I'm writing a program that interprets LTC timestamps from audio channels in video files. The goal is to remove the LTC track and replace it with some kind of native timestamps directly in the video ...
3
votes
1answer
3k views

Is it safe to use the yuva420 pix_format option with ffmpeg to encode webm videos?

I am encoding png image sequences to both webm and mp4 formats using ffmpeg. My goal is to achieve perceptually lossless videos, with the smallest file size I can reasonably achieve. The webm videos ...
3
votes
1answer
2k views

How does ffprobe identifies I frame and IDR, when it sets key_frame=1

How does ffprobe identifies I frame as an IDR and sets key_frame=1. Is it for the scene change? My requirement is to filter out IDR frames: the steps I am following are ffprobe output_file -...
3
votes
1answer
1k views

ffmpeg: How to list all possible video parameters for DNxHD dnxhr_lb profile?

If I don't put accepted video parameters for DNXHD profile, ffmpeg will list all the possible parameters like this. And I find this very helpful. [swscaler @ 0x539a420] deprecated pixel format used, ...
3
votes
1answer
473 views

How can i crop part of a video while recording from desktop in real time using ffmpeg?

I'm using this line to record from the desktop to a video file: ffmpeg -f gdigrab -framerate 24 -i desktop -preset ultrafast -pix_fmt yuv420p out.mp4 But this will record the whole desktop. Is there ...
3
votes
2answers
4k views

Downscaling 4K YUV420 to 1080p YUV444 with ffmpeg introduces red tint

I am downscaling 4K YUV420 video from the Panasonic LX100 to Full HD YUV444 using the ffmpeg console in Windows, and a script provided by user karl on the Personal View forum, modified for outputting ...
3
votes
1answer
9k views

FFmpeg : How to replace video background color with transparency? (while capturing)

I want to capture a window and overlay it on another video. This is my command: ffmpeg -i MainVideo.avi -f gdigrab -framerate 25 -video_size 300x200 -i title="MyWindow" -filter_complex "[0]setpts=...
3
votes
1answer
5k views

ffmpeg - moov atom not found0/0

I'm trying to play a movie (.mp4) that i've encoded with ffmpeg and i get the following error: [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fa39a802800] moov atom not found0/0 /movie.mp4: Invalid data found ...
3
votes
1answer
780 views

How can I convert a video to BPG format? BPG= Better portable graphics

I am trying to embed video into my site. And since loading time is important, I want to implement it using BPG. The author of this post implemented it https://eek.ro/why-bpg-will-replace-gifs-and-not-...
3
votes
1answer
3k views

How can I generate a color-correct h264/MP4 from a DPX sequence using ffmpeg?

We are converting a sequence of DPX files into an MP4. When the artist uses Adobe Media Encoder CC to generate the video, the colors match the original DPX. When we use ffmpeg, the video has a reddish ...
3
votes
1answer
1k views

FFMPEG not writing quicktime “COLR” atom

I am attempting to create Quicktime movs with the "DNXHD" codec with the following ffmpeg command (input part excluded): -c:v dnxhd -b:v 175M -pix_fmt yuv422p10le test.mov This works, and is ...
3
votes
2answers
2k views

ffmpeg Multiple Audio Language and Soft- Subtitle

I'm trying to convert a movie, using ffmpeg, from Movie.mkv to Movie.m4v. The Movie has 2 Languages and 1 subtitle stream. Using ffmpeg -i inputMovie.mkv outputmovie.m4v the result is just one ...
3
votes
1answer
986 views

FFmpeg script to clean up and compress iPhone video recordings from university lectures

I video record my university lectures using an iPhone 6 and then export them to OS X. The files can often become up to 4 GB/hour in size. I'm looking to create or use a pre-existing solution that can ...
3
votes
1answer
3k views

ffmpeg reducing 60fps to 30fps, but file size is larger

I just did: ffmpeg -i inputfile -r 30 -vcodec libx264 -an -s hd480 output_30.mp4 and ffmpeg -i inputfile -vcodec libx264 -an -s hd480 output_60.mp4 on a 60fps file. Why is the second file 27 MB ...
3
votes
1answer
1k views

Crossfading audio at beginning and ending of video

The html5 video tag has a loop attribute. When playing a video in a continuous loop, it doesn't do this seamlessly. I hear cracks and pops at the beginning. With ffmpeg I am able to trim .05 seconds ...
3
votes
2answers
142 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 ...
3
votes
1answer
135 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 /ffmpeg/...

1
3 4
5
6 7
34