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)
58
questions
0
votes
0
answers
18
views
for the ffmpeg scale2ref filter, how do I repeat the last frame or loop the SHORTER video to match the duration of the longer video
I'm trying to scale2ref things in ffmpeg, but the problem is if the first input is shorter than the 2nd, there is no way I can find to make it match the longer input, without making any assumptions on ...
0
votes
0
answers
42
views
Modify Max CLL and Max FLL values in HEVC stream
Is it possible to modify/edit the Maximum Content Light Level and Maximum Frame-Average Light Level values directly in a HEVC stream?
When encoding with x265, these values are set by the max-cll ...
0
votes
0
answers
24
views
Fix "Non-monotonic DTS" Warning Caused By asetnsamples Filter
I'm using the following complex filter to mute certain parts of an audio file and replace those parts with a beep generated by the sine filter:
[0]asetnsamples=n=1,volume=0:enable='between(t,1.57,1.97)...
0
votes
0
answers
28
views
FFmpeg hardware encoding and/or decoding when using v360 and crop filters?
I'm using ffmpeg to dewarp a fisheye camera. It works great but is doing 100% of the work on the CPU.
ffmpeg \
-hide_banner \
-v error \
-allowed_media_types video \
-fflags nobuffer \
-...
0
votes
1
answer
91
views
FFmpeg only joins 2 videos of 17
I'm trying to join multiple video files using xfade transitions. But I only get 2 videos joined. What I'm doing wrong ?
ffmpeg \
-i video0.mp4 \
-i video1.mp4 \
-i video10.mp4 \
-i video11.mp4 \
-...
1
vote
0
answers
29
views
How to setup my complex filter with zoompan and xfade for ffmpeg using Fluent-FFmpeg .complexFilter method?
I'm using fluent-ffmpeg with NodeJS. My problem is the setup of my complex filter.
const filters = Array.from({ length: imageCount - 1 }).map((_, i) => {
const rndInt = Math.floor(Math....
0
votes
1
answer
67
views
How to progressively accelerate video and audio with FFmpeg?
As suggested in this other question, we can progressively change playback speed with ffmpeg using setpts filter:
ffmpeg -y -i Video15sec30fps.mp4 -filter:v "setpts=(0.5+N/450)*PTS" out.mp4
...
0
votes
0
answers
52
views
ffmpeg creating an MP3 from M3U playlist using crossfader doesnt work when M3U file contains greater than 11 Mp3's
I have created a PS script to make a single mixed MP3 output from my M3U files using ffmpeg and crossfader.
All works except when I have tried to create a single output of around 60 minutes or longer. ...
0
votes
0
answers
29
views
Merging some FFMPEG code into AutoHotKey
I'm using some ready-made AutoHotKey that calls upon FFMPEG. I need to tweak what FFMPEG does, but I'm just so lost, so would really appreciate some help.
It currently does some simple FFMPEG scaling (...
0
votes
0
answers
57
views
transition circleclose is not working in FFMPEG
wanted to add circleclose transition to 2 videos while adding. transition effect is not coming. What is the issue in below FFMPEG command?
ffmpeg -i D:/development/copy/...
0
votes
0
answers
44
views
To make 'trim' and 'atrim' work synchronously
The following command trims a video using the trim video filter:
ffmpeg -y -i input.mp4 -vf "trim='00\:00\:05':'00\:00\:10',setpts=PTS-STARTPTS" output.mp4
But if the video also contains ...
0
votes
0
answers
32
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 ...
0
votes
0
answers
65
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 ...
0
votes
1
answer
170
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 ...
0
votes
0
answers
88
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 ...
0
votes
1
answer
79
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 ...
0
votes
1
answer
225
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 ...
1
vote
0
answers
42
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
...
0
votes
0
answers
154
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 ...
0
votes
0
answers
67
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 ...
0
votes
0
answers
104
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 ...
1
vote
0
answers
2k
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, ...
0
votes
2
answers
80
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 ...
0
votes
0
answers
67
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 ...
0
votes
0
answers
84
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 -...
0
votes
0
answers
78
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 ...
1
vote
1
answer
973
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 ...
0
votes
0
answers
86
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 ...
0
votes
0
answers
50
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=...
0
votes
0
answers
31
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 ...
2
votes
0
answers
248
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)
...
1
vote
0
answers
607
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 ...
1
vote
1
answer
105
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 ...
1
vote
1
answer
660
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
...
1
vote
1
answer
495
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?
...
0
votes
1
answer
78
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 (...
1
vote
1
answer
462
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 ...
2
votes
1
answer
172
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 ...
0
votes
1
answer
248
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: ...
1
vote
0
answers
70
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 ...
0
votes
0
answers
186
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 \
...
0
votes
1
answer
275
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 ...
0
votes
1
answer
56
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 ...
0
votes
1
answer
163
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 ...
0
votes
2
answers
460
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 ...
0
votes
0
answers
256
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 ...
4
votes
0
answers
8k
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 ...
1
vote
1
answer
355
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 ...
0
votes
1
answer
606
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 ...
2
votes
0
answers
6k
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 ...