Skip to main content

Questions tagged [ffmpeg-filters]

Used for question that need help with FFmpeg's filters (i.e. a parameter specified by the -filter, -vf and -af options)

Filter by
Sorted by
Tagged with
3 votes
0 answers
6k views

ffmpeg -vsync deprecated, use -fps_mode

I used to use -vsync -1 to Auto Sync a Audio and Video input stream using the -copy switch as they would get out of sync at times and sometimes not so can't specify any seconds for a delay setting but ...
matrixebiz's user avatar
2 votes
1 answer
129 views

Overlay a different png for each single frame of a video

I have a video and a set of images (each image for one video frame) I want to overlay the images over the video, each image over one single frame. The images and the video have the same size. I know ...
Catalin Morosan's user avatar
2 votes
0 answers
4k views

HDR to SDR conversion with ffmpeg

I have some 4K HDR video, which looks very dark (and redish) if directly played on a non-HDR device (in practice with VLC), which is a known issue. I'm trying to convert it to SDR using ffmpeg, and ...
PierU's user avatar
  • 1,629
1 vote
1 answer
461 views

Adding timer to video using FFmpeg

I'm trying to find a way to add a countdown text to videos using FFmpeg. I want the text to be "Time left: mm:ss" but to avoid leading zeros for minutes. So, for example: Time left: 10:01 ...
user1768741's user avatar
1 vote
1 answer
313 views

FFmpeg add text in a box with rounded corners

Is there a way to add a text with countdown timer to a video using FFmpeg where the text is contained in a semi-transparent box with rounded corners with one of the side borders in a different color? ...
user1768741's user avatar
1 vote
1 answer
329 views

Flip video with hardware acceleration ffmpeg on Windows 11

I am trying to use hardware acceleration to horizontally flip videos but I can't seem to get it right. I don't want to change the codec but just keep the same (just hflipped). I am using Intel Arc Pro ...
Sha's user avatar
  • 321
1 vote
0 answers
36 views

Can anyone help e with FFMPEG on Centos 7

I have a script that requires FFMPEG but I cant seem to get it working on my Centos 7 server the script gives the following error: ffmpeg version 2.8.15 Copyright (c) 2000-2018 the FFmpeg developers ...
Nick Eyre's user avatar
1 vote
1 answer
563 views

Error submitting a packet to the muxer: Cannot allocate memory

I'm attempting to trim and concatenate several video files using ffmpeg. These videos have already been transcoded with H.264 at a resolution of 720p. However, when executing the command, I encounter ...
Zahra's user avatar
  • 11
1 vote
0 answers
209 views

concatenating multiple files is giving Non-monotonic DTS in output stream error

I am trying to concatenate multiple video files with ffmpeg and python with the following code :- def story(path): videos = [f for f in os.listdir(path) if f.endswith(".mp4")] print(videos) ...
nish's user avatar
  • 41
1 vote
1 answer
93 views

Splitting, trimming, converting to image and concatenating issues with FFmpeg

I am new to FFmpeg. I read some essential basics but cannot figure out why the following command does not work. The script is written in Windows in PowerShell. ffmpeg -hide_banner ` -loop 1 -t 3 -i ...
Celdor's user avatar
  • 711
1 vote
0 answers
62 views

Side by side video with multiple single image sources

I'm creating 4 video files with 4 different single images sources (with pattern_type glob): ffmpeg -framerate 2 -pattern_type glob -i './1/*.jpg' -y out_1.mp4 ffmpeg -framerate 2 -pattern_type glob -i ...
hscho's user avatar
  • 11
1 vote
1 answer
266 views

Combining audio and multiple videos with FFMPEG

I am working on a ffmpeg script to combine two videos with one audio file. The first video file should start after about 6 seconds and the second after about 40 seconds, and there should be a padding ...
Lee P's user avatar
  • 13
1 vote
0 answers
368 views

How to Speed Up Complex Text Overlay in FFmpeg

I'm using FFmpeg to overlay text on videos, and I find the process to be quite slow. The operation becomes especially slow when I add complex drawtext filters. I'm running this on a MacBook Pro with ...
mlika's user avatar
  • 11
1 vote
1 answer
112 views

ffmpeg, need help to make small thumbnail slideshow video from long video

With ffmpeg command, I am trying to create a small thumbnail slideshow video of a large video by selecting one frame every 60 seconds and then combining those frames to make a video in a way that each ...
Pankaj's user avatar
  • 11
1 vote
0 answers
301 views

FFMPEG - 1080i - Using yadif and images still seem blurred/interlaced

I am trying to look at getting some images automatically from an mp4 that was recorded from a 1080i output. We usually receive 1080p and all works well. But in this instance, that is not an option. We ...
Chris Felstead's user avatar
0 votes
1 answer
74 views

cut the video at certain time and add another video at end , repeat this whole process for full video and make every video has seperate video parts

I have two videos. If one video length is 42 minutes 35 seconds and another video length is 46 seconds, now I need to add this 46 second video after every three minutes 50 seconds so that the added ...
Jaga G's user avatar
  • 11
0 votes
1 answer
101 views

FFmpeg image swipe animation

I want to animate with ffmpeg as in the picture. The animation must be 3 seconds long. Zoom in for 0.5 seconds at the beginning of the video Swipe left for 1 second Swipe right for 1 second Zoom out ...
zetrabit's user avatar
0 votes
1 answer
66 views

Side-by-side Comparison with scale2ref & hstack: Wrong Content Received as Output

I have two videos (no other streams there) with a format of 1440x1080. The first video should be positioned left to the second (at the right), whilst the second must be rotated by 90° clockwise (...
EagleRainbow's user avatar
0 votes
1 answer
200 views

How to trim multiple videos and position them to specific position using -filter_complex?

How do I mix several videos and have them not overlap each other? I need to use -filter_complex as I cram many more commands there and seems weird how when I trim video its frames remain and overlap ...
Pavlo Holotiuk's user avatar
0 votes
1 answer
45 views

Apply a trim on the output generated by filter_complex without a separate command

I have a filter complex expression that takes 4 input videos and combines them in 4 corners of the screen synced at a particular start time from each video ffmpeg \ -i first_vid.mkv \ -i ...
PirateApp's user avatar
  • 171
0 votes
2 answers
384 views

FFmpeg watermark and HLS stream

I want to convert and MP4 video into HLS multi-resolution (360, 720) and add watermark image inside the output segments. I did two result but missing the watermark image with the multi scale: // one ...
Mohamed Taher's user avatar
0 votes
1 answer
469 views

Convert MKV to HLS with all audio tracks and subtitles available

For the past few weeks, I've been trying to convert MKV and HLS files. Currently, I'm burning the first available subtitle track of the file in the video and keeping only the first audio track. What i ...
Tutifruti's user avatar
0 votes
1 answer
605 views

Merge audio files using ffmpeg

I’ve got 3 opus audio files and I need to merge them into 1 opus audio file in the following order and length: File1.opus is 1 second long 1 second silent gap File2.opus is 2 seconds long 1/2 second ...
m_collard's user avatar
  • 103
0 votes
0 answers
29 views

Some mp4 files converted with ffmpeg are off by .01 frames/second, how can I fix this (without resampling)

I have several mp4 files with a frame rate of 119.88 frames/second, I need to convert these to 29.97 frames/second without resampling. To do this, I ran ffmpeg -itsscale 4 -i input.mp4 -c copy ...
twilightecologist's user avatar
0 votes
0 answers
34 views

Use cropdetect to check blanking errors

cropdetect outputs the crop area for every frame. I would like cropdetect with either ffprobe or ffmpeg to output only the frame where the crop is less than actual size of the video. So for 1920x1080 ...
moi's user avatar
  • 291
0 votes
1 answer
86 views

Ffmpeg LUFS Loudnorm normalization results

I use the Loundnorm filter in Ffmpeg to normalize LUFS in a folder containing three audios, Music1.mp3, Music2.mp3 and Music3.mp3 using the double-pass method. The LUFS and True Peak values are the ...
Clamarc's user avatar
  • 663
0 votes
0 answers
47 views

ffmpeg: Apply an expression to dynamically control intensity of lowpass, highpass, aphaser, or aecho

I'm fading in and out two sources, intertwined in the output. Now I want to apply lowpass, highpass, aphaser, and/or aecho to the transitions using a time-based expr. I've already succeeded using the ...
Wes Modes's user avatar
  • 171
0 votes
0 answers
64 views

How to run ffmpeg with hardware encoding when using --filter_complex to hardcode subtitles?

I'm converting MKV files and hardcoding subtitles into MP4 format. I have over 100 files and want to speed the process up by enabling hardware encoding. I am able to hardware encode without hardcoding ...
user2006141's user avatar
0 votes
0 answers
64 views

Ffmpeg - Generate loudnorm conversion log file

I have a bat file that reads several audio files in the "µudios LUFS" folder and performs LUFS normalization by copying the files to the "Normalized µudios Lufs" folder. I'm trying ...
Clamarc's user avatar
  • 663
0 votes
0 answers
72 views

how to use ffmpeg to small size file .ts

How do I ensure that .ts files are no larger than 1024Kbps..? I use this code ffmpeg -i https://bitmovin-a.akamaihd.net/content/MI20192708/master.m3u8 -c:v libx264 -preset medium -crf 23 -c:a aac -b:a ...
horasjey's user avatar
0 votes
0 answers
999 views

How to convert heic format to jpeg format

The ffmpeg master branch already supports the heic format. How do I pass parameters using the ffmpeg command to convert heic images to jpeg images of other resolutions? ffmpeg -i test.heic output.jpg, ...
zejia lin's user avatar
0 votes
2 answers
79 views

Creation of black half size frame in the middle of a split video stream results in an FFmpeg error

The error was raised against the creation of black half size frame in the middle of a split video stream. The purpose of this script is to shift the dual fisheye images up by 20 pixels. This file ...
CANJMP's user avatar
  • 23
0 votes
0 answers
47 views

FFmpeg scale filter unexpectedly adds padding

I'm using FFmpeg to transcode and shrink some videos to AV1 using the scale filter and AMD's hardware encoder, available in FFmpeg as av1_amf. Usually it works fine, but now I've run into a video ...
TigerhawkT3's user avatar
0 votes
0 answers
70 views

FFMPeg: Avoiding clipping of image when rotating overlay

Im trying to add an image overlay on top of a video and have to rotated the image arbitrarily. Below is the command I'm using to rotate by -30 deg. ffmpeg -i input_video.mp4 -i crown.png -...
Aneesh's user avatar
  • 115
0 votes
0 answers
64 views

Bug in FFmpeg signature?

I tried using the signature filter on two completely different videos. For below command where video1 and video2 are completely different videos, the signature filter code still passes the coarse ...
stilloo's user avatar
0 votes
0 answers
81 views

Pausing the video for 15 seconds

I have a video which is 40 seconds long, I want to make it 55 seconds long, I wanted that the video's first frame along with it's audio freezes (frame freezes) for the first 15 seconds and after the ...
AAB's user avatar
  • 21
0 votes
0 answers
34 views

FFMPEG - Any suggestions on how to achieve a lookahead with sidechaincompress?

I need sidechaincompress (i'll call it SCC) to look ahead 750ms and smoothly drop the audio level in that lookahead window. I'm currently using this: -filter_complex "0:a]sidechaincompress=...
BeardyMike's user avatar
0 votes
0 answers
19 views

Use font attachment from an mkv container when burning hard subtitles

I want to use the font that is in an mkv as an attachment when I burn in subtitles. I found a way to do this using -dump_attachment first. ffmpeg -dump_attachment:t "" -i video.mkv ffmpeg -i ...
Ilias Karim's user avatar
0 votes
0 answers
402 views

How to extract keyframe timestamps from video using ffmpeg

I want to extract the timestamps of keyframes from a video using ffmpeg. I found this thread that explains pretty much how to do it. However, it appears that my video does not have the pkt_pts_time ...
K G's user avatar
  • 101
0 votes
1 answer
170 views

FFmpeg frame counter + resolution/bitrate/FPS box

I was trying to use drawtext FFmpeg filter to insert a frame counter at the bottom of my video by using this command: ffmpeg -i input.mp4 -vf "drawtext=fontfile=C\\:/Windows/fonts/consola.ttf: ...
NoyaZ_'s user avatar
  • 3
0 votes
0 answers
147 views

Get ffmpeg to output frames closer to start time specified

I'm running ffmepg version 6.1 with the following command: ffmpeg \ -y \ -copyts \ -ss 2841000000us \ -to 2843000000us \ -i <INPUT_FILE/URL> \ -fps_mode passthrough \ ...
casperOne's user avatar
  • 177
0 votes
1 answer
148 views

Ffmpeg concat filter produces frames from different videos

I have a workflow in which I give several videos to ffmpeg, each video corresponding to a shot, and ffmpeg concatenates them to produce a single video, interlaced at 25 fps. The problem is that ...
Rems's user avatar
  • 5
0 votes
0 answers
217 views

FFMPEG filter_complex overlays work well on windows but generates error on Linux and OSX

So, I am applying multiple overlays on a video using FFMPEG, on windows it always works fine for every size and number of overlays, but in case of MAC or Linux, it generates error for reinitializing ...
Hassan Aftab's user avatar
0 votes
0 answers
85 views

Issues With Combined Audio/Video Capture with FFMPEG

I am making an application where I am using FFMPEG to output a specific window on my computer. The video side works really well but starts struggling severely when I add audio into the mix (no pun ...
Austin Althouse's user avatar
0 votes
1 answer
227 views

Does 'force_style' work with 'subtitles=video.mkv' for FFMPEG?

I am using this script to encode an burn in subtiles for an entire folder: for filepath in newFiles: video = os.path.basename(filepath) videoName = os.path.splitext(video)[0] newFile = '%s....
http.bird's user avatar
0 votes
0 answers
86 views

Please help to add audio noise while using "mpdecimate,setpts=N/FRAME_RATE/TB"

I have an audio, named noise.mp3. And I want mpdecimate to not just remove all static frames, but replace them with black screen and/or audio noise (which I can use in Adobe Premiere to edit them) and ...
Sat Yo's user avatar
  • 1
0 votes
0 answers
14 views

Use ffmpeg to create an audio file from another audio file [duplicate]

I’ve got an opus audio file that’s 10 seconds long. I need to create another, shorter opus file call File1.opus from the 10 second file. i.e. Start offset: 3 seconds Length: 2 seconds Is it possible ...
m_collard's user avatar
  • 103
0 votes
0 answers
321 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 ...
Matteo Pasini's user avatar
0 votes
0 answers
400 views

Remove frames from a video depending on black pixel ratio

We have a surveillance camera recording taken at intervals of a month. It is necessary to remove the dark time of the day (night recordings) from the record or from the video file by deleting all ...
Evgenii_Ustyugov's user avatar