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
3k views

Finding frames in video that match an image

I'm trying to find frames in a video that match a certain input image. I'm currently using this command: ffmpeg.exe -i video.mp4 -loop 1 -i image.jpg -an -filter_complex "blend=difference,blackframe=...
3
votes
1answer
9k 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
2k views

ffmpeg repackaging AVI (h264) into mp4 gives choppy playback in html5 video on chromium

I have file.avi which contains a h264 video: $ ffmpeg -i file.AVI Input #0, avi, from 'file.AVI': Duration: 00:00:20.61, start: 0.000000, bitrate: 1530 kb/s Stream #0:0: Video: h264 (Main) (...
3
votes
1answer
3k views

Scaling videos of variable size to a fixed aspect ratio

I have 45 videos of varying aspect ratios and resolutions. I need to scale all of them so that they fit neatly inside a 640x360 (16x9) container with the following specs: 16x9, 640x360, 1600kbps, H....
3
votes
1answer
3k views

How to do mpeg/mpg to mov lossless convertion?

Does anyone know how to do lossless conversion from *.mpeg/mpg to mov? I was asked to extract video from DVDs and do editings in FCPX, however FCPX cannot edit *.mpeg/mpg file natively, therefore I ...
3
votes
1answer
5k 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, ...
3
votes
2answers
9k 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 ...
3
votes
1answer
72 views

ffmpeg: Second lower third does not appear

On a video I am producing, I am overlaying a digital on screen graphic on the lower right corner (branding logo). I am overlaying an 11 second two-tiered lower third at the beginning of the video (...
3
votes
1answer
903 views

How to Monochrome, Haze video Effect in FFmpeg?

I have a lots of searching but i coudn't find the FFMPEG command for Monochrome effect and Haze Effect on video. Orignal Haze Effect Monochrome Effect (This is not sepia effect) Your help would be ...
3
votes
1answer
5k views

ffmpeg combine three videos side by side

I have three videos s1.mp4,s2.mp4 s3.mp4 and I need to combine three videos side by side I know use hstack but my three videos has different size? I've found following commands.It works,but only ...
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
2answers
533 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
1answer
8k 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
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
603 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
109 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
2k 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
82 views

How to re-order the .wav file channels

I need to change the order of channels in .wav file. for example if .wav file contains 16 channel like "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16" then need to change this order to "14 15 16 1 2 3 ...
3
votes
1answer
978 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
3answers
4k views

Configure CQP (CRF) for h264_nvenc

Encoding on CPU can be done via: ffmpeg -i input.mp4 -vcodec h264 -crf 23 -acodec copy h264.mp4 GPU's alternative for the codec is h264_nvenc. How can I pass the same options to it? I googled and ...
3
votes
1answer
13k 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
3k 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
988 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
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
440 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
554 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
2k 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
55 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
420 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
2answers
988 views

How can I make a slideshow with ffmpeg?

I have a certain number of pictures that I want to repeat until the melody ends. The problem is that when I make settings it does not work. the process goes on forever ffmpeg -pattern_type glob -...
3
votes
1answer
944 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
4k 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
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
1k views

Video Quality Assessment (No-Reference)

I am looking to analyze the quality of videos using some no-reference methods. ie. I don't have a reference video to compare my videos with. I want to identify frame-freezes, jitter, jerkiness etc. ...
3
votes
1answer
534 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
10k 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=...

1
3 4
5
6 7
35