Questions tagged [ffmpeg]

Media tool with support for multiple codecs, filters, and containers. Include your actual command and the complete console output when asking questions involving FFmpeg tools. An easy way to do this is by adding `-report` to your command and pasting the contents of the logfile generated. For help with CLI use only of ff* binaries - ffmpeg, ffprobe, ffplay. For help with API usage, post on Stack Overflow.

Filter by
Sorted by
Tagged with
0 votes
1 answer
49 views

Change subtitle font size with ffmpeg

I’m able to change the FontName when hardcoding subtitles with ffmpeg: ffmpeg -y -i temp.mp4 -vf subtitles=subtitles.srt:force_style='FontName=Roboto-Condensed-Bold' output.mp4 but unable to change ...
1 vote
1 answer
12k views

How to install NVIDIA VIDEO CODEC SDK?

I need it for use with FFmpeg to accelerate encoding. I've downloaded nvidia_video_sdk_6.0.1.zip from their website here but there is absolutely no information whatsoever about how to install it on ...
0 votes
1 answer
5k views

Merge MKV video and MKA audio tracks while keeping subtitles

I have this situation: file1.mkv (video with two 5.1 tracks and several subtitles) file1.mka (two stereo audio tracks) I want to merge the files to a single output that has: 4 audio tracks (the 5....
1 vote
1 answer
704 views

Why is ffmpeg so slow to create a video compared to CapCut, for example?

I'm just starting to use ffmpeg to create some videos that consist of: 1 mp4 file, then it overlays a png and adds the audio from a wav file. Nothing complex. Using ffmpeg for a 2min30s video it took ...
0 votes
1 answer
26 views

Can’t concatenate videos with ffmpeg

I’m trying to concatenate a video generated with this command: ffmpeg -y -loop 1 -i screenshot.png -filter_complex "[0:v]scale=1920x1080,subtitles=subs.srt" -c:v libx264 -c:a aac -shortest -...
1 vote
0 answers
104 views

Raspberry Pi with Bullseye: how to stream from camera to Youtube Live, and simultaneously save the stream to video files locally

I have raspberry pi 3b+ with Arducam camera and Debian Bullseye, and I would like to achieve the following: get video from libcamera-vid, 800x600, 15 fps get audio from default audio source stream ...
1 vote
1 answer
46 views

FFMpeg "vp9_cuvid" doesn't save HDR10 from VP9 4k input video in output HEVC video

I try to encode this 4k VP9 HDR10 vídeo: https://www.youtube.com/watch?v=kgppJX0G--E using this command line: ffmpeg \ -vsync 0 \ -hwaccel cuda \ -hwaccel_output_format cuda \ -c:v vp9_cuvid \ ...
3 votes
2 answers
4k views

ffmpeg crossfading multiple images

I am trying to cross-fade multiple images. I found some helpful piece of code in this superuser thread. So far I am stuck at this point: ffmpeg -loop 1 -i img0.jpg -loop 1 -i img1.jpg -i img2.jpg -f ...
0 votes
2 answers
4k views

FFMPEG to encode raw video (in AVI) into h.264 in mp4

I am using a karaoke authoring program (karafun) that lets me select the resolution and FPS but it outputs the video as raw and the audio as IMA ADPCM and places it in an AVI container. PS C:\bin> ....
1 vote
2 answers
64 views

Encode images into a video as they become available with FFMPEG?

I have an application which takes roughly 25 seconds to process each frame of a video, and then it saves each processed frame to a dedicated directory which contains nothing but frames, and each frame ...
2 votes
0 answers
27 views

Yet another ffmpeg concat audio sync issue [closed]

I've read through dozens of posts, tried many suggestions, nothing seems to work for me. The funny part is that the video is fine in some players (e.g. Quicktime) but not the others (e.g. Chrome). ...
1 vote
1 answer
8k views

FFmpeg: Error while opening decoder for input stream #0:0 : Invalid argument

Hi I'm trying to transcode a hevc stream to h264 using ffmpeg $ ffmpeg -c:v hevc_v4l2m2m -i video.mkv -c:v h264_v4l2m2m -c:a aac out.mp4 I want to ffmpeg to explicitly decode the input hevc video ...
0 votes
0 answers
51 views

Is it possible to use the signalstats YAVG filter in FFMPEG to control the gamma correction in a video?

I don't know if this is even possible, but something tells me it is… You see, I want to dynamically control the gamma correction in FFMPEG/FFPLAY depending on how bright/dark the frame being ...
0 votes
1 answer
42 views

ffmpeg How to keep only some metadata tags for mp3

I want to remove all metadata tags form an mp3 but keep "album" and the mp3 "cover image" how would I proceed in that case? I would expect something like this but it doesn't work: ...
0 votes
0 answers
17 views

Streaming Dynamically Created .ts Files to RTMP Without Concatenation Corruption using ffmpeg

I'm working on a project where .ts video files are generated in real-time, and I need to stream these to an RTMP server without pre-concatenating them. Initially, I attempted using a named pipe and ...
0 votes
1 answer
4k views

how to map and mute channels in stereo stream? [ffmpeg]

from ffmpeg man page, I should be able to use -map_channel to split/mute channels however, unless the stream contain 2 channels literately, the map does not work. 01.mp3: Stream #0:0: Audio: mp3, ...
2 votes
0 answers
49 views

Encode video via GPU - slow speed

My PC: ryzen 5700x, 32 GB RAM 3200 MHz, RTX 4070Ti Super, SSD. I encode video from h264 to h265 using ffmpeg (nvenc) and GPU. ffmpeg -i "input.mov" -c:v hevc_nvenc -rc:v vbr -cq:v 34 -c:a ...
-1 votes
0 answers
16 views

Specifying min macos development target when building FFmpeg

I am struggling to set the development target for FFmpeg on MacOS. I am trying to aim for macOS 10.13. Usually this would be done through the -mmacosx-version-min flag. I have tried adding this to the ...
0 votes
1 answer
5k views

How to deal with skipping segments in ffmpeg

I wanted to download 2 minutes from a live stream of youtube. So, I run the following cmd but the problem is that ffmpeg throws me skipping X segments ahead, expired from playlists and the output ...
5 votes
3 answers
18k views

How to download aes encrypted m3u8 using ffmpeg or youtube-dl?

I have the m3u8 file and the key.bin, inside the m3u8 file is: #EXTM3U #EXT-X-VERSION:4 #EXT-X-PLAYLIST-TYPE:VOD #EXT-X-INDEPENDENT-SEGMENTS #EXT-X-TARGETDURATION:6 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-KEY:...
-1 votes
1 answer
2k views

ffmpeg and creating a single image made up of a grid of thumbnails from a video

Ffmpeg is incredibly powerful but complex tool. I want to create a single image file made up of rows & columns containing still-images (thumbnails) from a video file. The most difficult but ...
2 votes
3 answers
35k views

How to enable libx264 in ffmpeg

I am trying to encode with libx264 in ffmpeg ffmpeg -f image2 -r 25 -i frames/%03d.bmp -vcodec libx264 out.mp4 However, i get the following error message: Unknown encoder 'libx264' If us type ...
1 vote
1 answer
4k views

ffmpeg: Adding Drawtext timecode & Watermark with -filter_complex, Stream Matching

I am trying to add the timecode with drawtext and put a logo with ffmpeg. The command line looks like this: ffmpeg -i INPUT.MP4 -i logo.png / -filter_complex "drawtext=fontfile=arialbd.ttf:text='UTC'...
0 votes
0 answers
76 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 ...
2 votes
1 answer
6k views

ffmpeg: library configuration mismatch

In trying to tidy up old files using sudo apt-get autoremove I've messed up my install of ffmpeg on Ubuntu 17.10. I've tried to remove ffmpeg using sudo apt-get remove ffmpeg and then reinstall a ...
4 votes
2 answers
7k views

FFMPEG - Malformed .aac tracks sound PERFECT in Movie Studio, but return "Input buffer exhausted before END element found" error when attempting mux

I am a novice ffmpeg user trying to mux h.264 video with a secondary .wav commentary track, without re-encoding anything on the video side. The video's audio is in .aac. I use Bandicam to record ...
1 vote
1 answer
5k views

Failed using scale_npp ffmpeg filter

I'm trying on Windows 10 (through MinGW64) to convert (mixing mode) from x265 file (by CPU) to x264 (by GPU - NVidia) resizing the output using scale_npp. What do the last five rows in this log mean? ...
5 votes
3 answers
17k views

ffmpeg filter to add timestamp on video

I have a problem displaying the timer on the video. I have consulted a few examples, but it does not show success. Help me fix it.
3 votes
1 answer
4k views

How to use ffmpeg to add 3D metadata to a SBS Full Frame video without reencoding?

Ok so, I've been searching around for how to do this, but I've had no luck. I have an SBS Full Frame 3D MP4 that is 648x720p per eye (1296x720p "raw" resolution). I want to use ffmpeg to add metadata ...
1 vote
1 answer
100 views

"-vf crop" doesn't work on FFMpeg hevc_nvenc

This command line downscales fine my 4k video: $ ffmpeg -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input_video.mkv -vf scale_cuda=1920:1080:interp_algo=bicubic -c:v hevc_nvenc -preset slow -...
3 votes
2 answers
646 views

How do unwrap fisheye and overlap fisheye lens with ffmpeg?

I am using an insta 360 x3 and would like to automate exporting videos without using their studio tools on Linux. Here's a screencap of a video format in the camera (Insta360 x3 camera screenshot): I ...
1 vote
0 answers
47 views

Capturing raw video stream from second pc (HDMI Splitter & Capture Card)

I would like to create a test setup in which I transmit the raw stream from one PC via an HDMI splitter and display it on a second PC where I receive the HDMI signal with a capture card.. Due to the ...
0 votes
0 answers
28 views

REPLAYGAIN value being ignored on some MP3's - FFmpeg Transcoder cs - process Error Data Received:454

I am having an issue per below. I use Windows, and just installed ffmpeg-2024-03-07-git-97beb63a66-full_build, which did not correct it. I have added Track ReplayGain to my music library using Foobar. ...
1 vote
1 answer
551 views

Ffmpeg concat audio without spaces between

I'm trying to concat a few m4a audio files, seems like everything works fine. I'm using such command ffmpeg -f concat -safe 0 -i files.txt -y -af anlmdn output.m4a I've noticed that im getting space ...
1 vote
0 answers
59 views

"-pix_fmt p010le" and "-pix_fmt yuv420p10le" doesn't work on FFMpeg hevc_nvenc

This command line works fine: $ ffmpeg -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input_video.mkv -vf scale_cuda=720:404 -c:v hevc_nvenc -preset p7 -rc vbr -rc-lookahead 20 -b:v 2000k -...
0 votes
0 answers
11 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 ...
1 vote
0 answers
33 views

Generating ffmpeg command to mux in subtitles matching the style of VLC

I am trying to mux in subtitles with ffmpeg, but I am having trouble getting the desired style and output with a reference point being VLC's standard format of showing subtitles matching the look of ...
0 votes
1 answer
47 views

Converting audio tracks only in mkv files to AC3

I have an LG CX TV. The internal video player does not recognise DTS audio format. I'd like to be able to play MKV files (which might have DTS audio tracks) from an external USB device. I was looking ...
0 votes
1 answer
67 views

FFMPEG - Add a green video overlay at a fixed Interval in a video. How to define the interval?

I am trying to add a green screen video overlay on the top of my main video. The green video overlay is like a thumbs up that shows up every few minutes in the video. I have a ffmpeg command that adds ...
0 votes
2 answers
4k views

FFMPEG encoding issue with "mp42" video (conversion to H264 mp4)

I am having problems encoding an "mp42" file to mp4 (H264) with the encoding options: -vcodec libx264 -bufsize 32M -b:v 2800k -maxrate 3800k -g 63 -vf "scale=1280:720" -acodec aac -ab 192k -ar 44100 -...
0 votes
0 answers
103 views

Extract Video Frames as HEIC/HEIF images

How do I extract frames from videos as heif/heic images? I want to use ffmpeg but they don't support it. What other tools can do the trick?
0 votes
0 answers
106 views

How do I create visually lossless images from videos using FFmpeg?

How do I create visually lossless images from videos where the differences are so undetectable that you won't notice even if you zoom in, all by using FFmpeg? I have the following types of videos: H....
0 votes
1 answer
5k views

MKV to MP4 (AAC and TrueHD Atmos)

I use the following syntax to convert MKV to MP4 with AAC 6ch & DTS-HD MA 8ch with zero issues. ffmpeg -i "Movie (2022).mkv" -c copy -map 0:? -strict -2 "Movie (2022).mp4" ...
4 votes
1 answer
1k views

Can ffmpeg apply audio gain losslessly?

I came across this answer How can I normalize audio using ffmpeg? However this involves transcoding the audio stream. I know that programs like MP3Gain AACGain can adjust the volume losslessly, ...
0 votes
1 answer
40 views

Apply the file's audio effects

I'm new to ffmpeg, as the title says, I want to apply effects to audio files, like this app [https://play.google.com/store/apps/details?id=com.baviux .voicechanger] How can I determine the value of ...
1 vote
1 answer
53 views

Getting a list of frames from an input video with ffmpeg as pictures

I am trying to extract a small number of frames from a video, like this: ffmpeg -i input.mp4 -vf 'select=eq(n\,1395)+eq(n\,2790)+eq(n\,4185)+eq(n\,5580)' \ 'img%01d.jpg' However, what I get, is ...
2 votes
2 answers
2k views

How to make youtube-dl (yt-dlp) generate subtitles properly and not duplicate the text?

I'm using yt-dlp to download some videos, and I've told it to embed the subtitles. This seems to work, except it's generating subtitles in the most horrible way by duplicating the text. For example, ...
0 votes
3 answers
3k views

Best method for setting permanent aliases in powershell?

When I install something like ffmpeg with winget, it sets permanent aliases for ffmpeg, ffplay, & ffprobe. winget install gyan.ffmpeg It doesn't look like it's adding anything to my path ...
0 votes
0 answers
62 views

How to draw a moving line as slider for the image comparison video generator script in Python with FFmpeg

I have the below script to generate a video slider with FFmpeg You can see example here (first 10 seconds) : https://youtu.be/F_wf1uHqZRA I am trying to replicate effect of imgsli like a person is ...
0 votes
0 answers
58 views

Weird ffmpeg behavior - "-shortest" flag ends the audio too early

I'm trying to generate some video files using ffmpeg, but when I use the -shortest flag, I get a file whose audio stream is several seconds shorter than its video stream. I tried several ...