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
0 votes
1 answer
559 views

Re-encode corrupt videos (that still play) and drop bad frames FFMPEG or other app?

I have about 300GB of assets that have been deemed "corrupt" by FFprobe but most all of them still have playable portions of the video. What I've been trying to determine how to do is either ...
0 votes
1 answer
88 views

Displaying an image next to a text using ffmpeg

I would like to overlay a text and an image in a video. I know how to overlay text and an image. The problem is the text is not fixed, e.g “Sad, “Happy,” “Excited,” etc. I need to show an image right ...
1 vote
1 answer
1k views

FFmpeg: chromakey without green edges

I have a video of a person on green background and I'm trying to turn background transparent: ffmpeg -i bg.mp4 -i man.mp4 -filter_complex '[1:v]colorkey=0x00ff00:0.3:0.3[ckout];[0:v][ckout]overlay[out]...
0 votes
1 answer
24 views

Insert PNG at exact position of a video, with exact duration

Insert PNG at exact position of a video, with exact duration - is it possible with FFMPEG? If not, then may be with other software? I have several hundreds of PNGs. Each needs to be inserted at exact ...
0 votes
1 answer
53 views

Is there a way to combine two videos interlaced frame by frame with a single ffmpeg command?

I have two videos and I want to go through them frame by frame taking one frame from video 1, followed by 1 frame of video 2 then the next frame of video 1, followed by the next frame of video 2. Like ...
0 votes
1 answer
248 views

Serving static video content directly vs. via adaptive streaming protocols (HLS, DASH)

Is there an advantage of serving static video content (not a live stream) via adaptive streaming protocols such as HLS or DASH over serving them directly as files using HTTP server in terms of speed? ...
0 votes
1 answer
97 views

How to efficiently create a video from an mp3 and a single jpeg using ffmpeg?

I have a 329MB MP3 file and a 200K JPEG image, which I'd like to combine into an MP4 file which simply plays the MP3 with the image in the background. The way I go about it today is by using FFMPEG ...
0 votes
1 answer
2k views

FFmpeg add logo watermark to live stream

I am trying to execute this commands in FFmpeg and it is working. Now I want to add logo to this live stream. How to do that? find "/video path" -name "*.mp4" | xargs -I $ "/ffmpeg path" -y -re -i $ -...
2 votes
1 answer
1k views

Correct method to set font-size in .ASS file

My final video output is 1080:1920 (9:16 aspect ratio), after padding. In .ass file, I set PlayResX: 1080 PlayResY: 1920 and then the font-size=130. But, this font-size doesnt occupy exact 130 pixels ...
0 votes
1 answer
395 views

ffmpeg converting Nikon .mov file to a format for Da Vinci Resolve Linux

Hi folks I've spent 2 days on this now and I'm no closer to finding the perfect ffmpeg command line to do an exact conversion of a Nikon D850 .mov file to a format that Da Vinci Resolve on Linux can ...
0 votes
1 answer
51 views

ffmpeg command to scale, show images at exactly 130bpm

I have a sequence of images which I would like to display to some music that plays at 130bpm. I'll also need to scale down the images, which are a rather strange 2673x2151 pixels, to something that ...
0 votes
1 answer
1k views

FFMPEG - Adding audio stream to existing MKV file (which includes an audio stream already) - Coming out squeaky

I am trying to add an additional audio steam (MP3) to an existing MKV file which currently contains a video and single audio stream, such that the output will have the video, and two alternative audio ...
0 votes
1 answer
18 views

ffmpeg skips first 5 secs

I'm trying to copy the first minute of an mp4 file, but getting a strange result in which I try to play the file output from ffmpeg and the first 5 secs are missing! I have tried using the following ...
2 votes
1 answer
179 views

How to know which ffmpeg encoders are hardware accelerated?

On any given build of ffmpeg, ffmpeg -encoders will list which encoders can be used for encoding video. Of the encoders listed, how can I tell which ones use hardware acceleration?
2 votes
1 answer
702 views

ffmpeg convert and segment subtitles

I'm trying to create an HLS subtitle playlist from subtitles embedded within a video file. So the input looks something like this: container: mkv stream 0: video h264 stream 1: audio aac stream ...
1 vote
1 answer
3k views

Overlay transparent image (png) over video (mp4) with ffpmeg?

We would like to overlay an image throughout the whole video file we have. We no longer have access to the original source, so need to modify the video we have. The current video is in MP4 format. The ...
2 votes
2 answers
2k views

How to find/detect the real video resolution?

Imagine you have recorded/captured the screen at 1080p, but it was displaying a 480p video maximized to fullscreen. The result file is technically 1080p, but it really is showing a 480p video, that is ...
0 votes
0 answers
58 views

How to tell ffmpeg -ss and -to to cut at keyframes (no re-encoding)

From a video, I want to clip out a part I like. It's roughly from 12:34 to 43:21, so I do: ffmpeg -i "input.mp4" -ss 12:34 -to 43:21 -c copy "output.mp4" The result is cut exactly ...
0 votes
0 answers
16 views

Make sound settings created by ffmpeg apply to entire Windows applications

The recording sound of my microphone is weak, so I resorted to using ffmpeg to add a volume increase effect and some other effects. I created a simple batch file and recorded the sound with it, and it ...
0 votes
1 answer
168 views

Two videos on image background

I am sort of new to this. I am trying to create an output video using two videos and a background image. With a bit of gap around the videos and Video A having a larger scale than Video B. And, it ...
0 votes
1 answer
287 views

Put two or more images on video

According this I try to put two pictures on video ffmpeg -i video.mp4 -i photo01.jpg -i photo02.jpg -filter_complex "[0:v][1:v] overlay=25:25:enable='between(t,10,20)';[0:v][2:v] overlay=25:25:...
0 votes
1 answer
115 views

FFMPEG - Creating script to convert a video into audio file (or anything related really) + diverses questions

Good day everyone. Im making my babysteps into ffmpeg, and so far this tool has been really helpfull. Anyway. Im currently using this line as a convertion basis : ffmpeg -i name.mov -c:v libx264 ...
1 vote
1 answer
661 views

Using ffmpeg gdigrab to capture desktop output to h264 yuv420p. Color shift problem

The ffmpeg command below is being used to capture the desktop and create a resulting mp4. ffmpeg log says the input stream is bmp and I specified the target as h264 yuv420p. I found several older ...
1 vote
1 answer
2k views

FFMPEG - Apply opaque white with mask

This seems like a simple thing to do, but for my life I cannot find an answer that does this the way I need to. Using a mask image, I want to make the white parts of the mask still be white (not ...
2 votes
1 answer
6k views

YUV to RGB/sRGB color space conversion using ffmpeg

How to convert an mp4 file with YUV color space to RGB or sRGB color space using ffmpeg? I am trying to upload my video to YouTube and I read somewhere that RGB video looks better than YUV one. Thanks....
0 votes
0 answers
47 views

First HLS segment overlapping when renditions have different framerates

I have a multi resolution m3u8 file, created from 1080p60 source file. Resolutions lower than 720p are converted to 30fps, while 720p+ stay at 60fps. The problem is that the first segment is broken ...
0 votes
1 answer
113 views

FFmpeg setpts filter produces wrong frame number

Description I found a strange behavior in setpts filter: sometimes when I use it to speed up a video it inserts more frames than expected. My ffmpeg version is the following: ffmpeg version 6.0-static ...
0 votes
0 answers
177 views

How to check moov atom of a mp4 video is already faststart through ffmpeg api?

We know that we can use ffmpeg command line ffmpeg -i input.mp4 -movflags faststart -acodec copy -vcodec copy output.mp4 to move the moov atom to the start of a mp4 video, but how do we check the moov ...
0 votes
1 answer
863 views

I need to modify a movie's displayed subtitles and display as an image overlay

I'm kind of at a loss on how to do this. I have access to gimp/inkscape/ffmpeg/vlc, and I can download font styles as needed off the web. So I have a movie. I play the movie in vlc player, I display ...
1 vote
1 answer
63 views

FFMPEG : Add video (partial video effect) under the image with ffmpeg

I have a video, video.mp4, and an image, artwork.png I would like, to use FFmpeg: To display the video.mp4 effect inside the image artwork.png If possible, resize output.mp4 as per the demo ...
0 votes
1 answer
629 views

ffmpeg - Slow down video and loop/repeat audio

I am trying to use ffmpeg to slow down a video speed by 25% (75% speed) without changing the audio speed. ffmpeg -i input_video.mkv -filter:v "setpts=1.3*PTS" "SlowVideo25.mp4" On ...
0 votes
1 answer
429 views

Changing up gamma with -lavfi and ffmpeg

This is my first time posting on this forum, so don't be too rough on me, haha. I have recently started taking up FFmpeg as a side project for my media class, and I am facing some problems when it ...
0 votes
2 answers
9k views

Convert HLS stream to fixed FPS mp4

I am using ffmpeg to convert an HLS stream to mp4 using this command: ffmpeg -i https://example.com/xxx.m3u8 -y -vcodec copy -c copy -bsf:a aac_adtstoasc test.mp4 I only have access to this video ...
0 votes
1 answer
121 views

FFmpeg on windows cut and fade question

so i am using the following code to in a windows .BAT file to cut up a video at X time: bin\ffmpeg -hide_banner -loglevel 0 -i "%video%" -c copy -map 0 -f segment -segment_time %...
0 votes
1 answer
446 views

Final Cut output to FFmpeg workflow

If I use Apple Compressor, I could just 'Send to Compressor', without first exporting a ProRes master. However, I would like to use FFmpeg/x264 for better quality (at low bitrate). Do I have to ...
0 votes
2 answers
188 views

Need overlay the image on video by taking the array of positions

I need to overlay the image on video by scrolling the image on video . I want to generate the video with the image in scrolling positions
0 votes
1 answer
100 views

Help needed on ffmpeg zoompan filter expression syntax

I have the following command: ffmpeg -loglevel verbose -y \ -i "https://my.domain/workspaces/473/RFP-107718.mp4" \ -i "https://my.domain/workspaces/473/margaritaville/palm_beach.png&...
1 vote
2 answers
946 views

replace video track and keep everything else

I want to use FFmpeg to replace a certain video track but keep everything else including chapters, audio, fonts etc… I know I should be using -map and -map_metadata but not sure how to do it.
3 votes
1 answer
2k views

How to remove background from video without green screen on the command line?

I'm looking for an ffmpeg-like tool to blur/remove/change a static background from a "talking head" video, on the command line with on-device processing. Essentially, ffmpeg-like-tool [--...
1 vote
1 answer
907 views

ffmpeg: Why did my capture speed drop? (can no longer capture using same command)

I've been using the following command to capture video with ffmpeg for the past two months using my Blackmagic Intensity Pro 4K capture card: ffmpeg -bm_v210 1 -rtbufsize 1500M -threads 4 -f decklink ...
1 vote
1 answer
713 views

FFmpeg Batch encoding error: CRF/CQP is incompatible with 2pass

I am trying to create a batch file with 2 passes. Pass 1 scales the video. Pass 2 pads a border around it. They both work separately but will not work together. Pass 1: @echo off REM Scale video to ...
0 votes
1 answer
2k views

How to split,reverse and concatenate video using single command in FFMPEG?

i want to create reverse video with audio and remov from large clip.for that first split video in segment then reverse splits video then concatenate all reverse video as single video file but it take ...
0 votes
1 answer
1k views

How can i do overlay subtitle with ffmpeg like in the links provided?

I need a script for ffmpeg to do this: Background color (drawbox) for all words like this:
1 vote
1 answer
48 views

ffmpeg error Input link parameters do not match the corresponding output link parameters

I need to concatenate n mp4 videos of different resolutions via ffmpeg. However, I am receiving an error despite the fact that in the filter_complex before performing the concat operation I scale all ...
0 votes
0 answers
74 views

Handling non continuous input dvb_subtitles in mpegts stream using FFmpeg

I have an input feed that contains video, multiple audio, and dvb_subtitles streams. I am transcoding the audio and video and copying the dvb_subtitles where subtitles are not coming continuously(for ...
0 votes
2 answers
121 views

ffmpeg nearest-neighbor downscale not working as expected

I'm trying to downscale a video with nearest-neighbour scaling, but the results are very poor. To try and get to the bottom of it, I created this image which is a repeating pattern of various colours. ...
3 votes
3 answers
7k views

How do I fade in and out in FFmpeg?

I understand there is a module built in FFmpeg which allows you to fade your clips in and out, however, no one really explains how to use the module with your own input. How do I simply fade both the ...
0 votes
3 answers
3k views

ffmpeg - how do i crop different values from top and bottom

i have a mkv file and its resolution is 1280x720. when i calculated the crop using Handbrake, it shows that i need to crop 40 from top and 30 from bottom. So far i know how to crop equal amount from ...
0 votes
1 answer
154 views

Hue Cycle .gif files with ffmpeg as percentage of duration

Suppose I have a set of 1000 .gif files, each of different durations, and I want to cycle the hue (hue as in the HLS color space) of each .gif file once over its duration. So, for example, at the ...
0 votes
1 answer
44 views

ffmpeg - Finding the right point to cut

I cut videos using the command below, and I sometimes find that the resulting video has imperfections at the beginning (square artifacts in the image). If I advance the start time parameter value (...

1
3 4
5
6 7
43