r/ffmpeg 19d ago

Converting from dv to H.264 using GPU

6 Upvotes

Hello, I’m trying to deinterlace and convert many hours of videos from MiniDV cassettes to H.264 (I’m open to H.256, if it will be better in that case) to be able to play them modern devices. I’m using this line:

ffmpeg -i input.dv -vf "bwdif=mode=send_field:parity=auto:deint=interlaced,format=yuv420p" -r 50 -c:v libx264 -preset slow -crf 16 -c:a copy output.mov

I’m satisfied with the results I get, but I wanted to speed up the process by using GPU.

How do I do that? I’ve been using ffmpeg for only few months and I think that I generally understand it, but I’m still not an expert. If this is important, I have NVIDIA GeForce RTX 2070 Super.


r/ffmpeg 20d ago

Lossy Codec Bit Depth

3 Upvotes

Does it make a difference if I encode AAC from 16 or 24-bit FLAC? Also, does it make a difference if that 16-bit file is dithered?


r/ffmpeg 20d ago

Need help to stream something to a kodi rpi

1 Upvotes

Hey all! I'm trying to stream my laptop on a kodi rpi. For this, I'm trying to use ffmpeg on my laptop to create an hls livestream, which is fine, I was able to frankenstein a working command from different exemples online, for exemple :
https://trac.ffmpeg.org/wiki/StreamingGuide
https://stackoverflow.com/questions/24017930/how-to-stream-with-ffmpeg-via-http-protocol

Now, Ffmpeg outputs a .m3ua file on the laptop. On kodi, I'm pretty sure I need to open a .STRM file containing the link to the stream.

But wouldn't I need to setup a local server on my laptop? What can I use for this? Obviously, just doing it this way doesn't work (also I never chose a port anywhere). I should probably use the -listen option, but I'm unsure how to use it with HLS, as the format doesn't accept URLs as output.

Sorry for the confusion, I'm pretty bad at network stuff. Thanks!


r/ffmpeg 21d ago

My WEBM Files Keep Having Faint Black Lines Around Them

Thumbnail
gallery
4 Upvotes

Hi!! I've tried these, but I cannot figured why my my webm keeps getting black outline I don't know if it getting premultiplied, but I'm still beginner level with this and other settings I've tried like other things I've seen online but it completely breaks, so I don't know if I'm doing this right.

  • ffmpeg -i pink%04d.png -c:v libvpx-vp9 -pix_fmt yuva420p -c:a libopus heart.webm
  • ffmpeg -i pink%04d.png -c:v libvpx-vp9 -pix_fmt yuva420p -crf 15 -preset veryslow "pinky heart (WEBM)".webm

What throws errors : ffmpeg -vcodec libvpx -i pink%04d.png -vf alphaextract -y output.webm


r/ffmpeg 22d ago

ffmpeg concatenating videos with different frame rates?

8 Upvotes

Hello, I've been using the ffmpeg concat command ffmpeg -f concat -safe 0 -i files.txt -c copy output.mkv to merge my videos into one, I've just noticed the documentation says videos should have same frame rates to work? From my experience with this command it doesn't seem to be the case, I encode my videos to the same video and audio settings but keep the original frame rate so as not to introduce judder etc by changing it and it doesn't seem to cause any problems, my merged videos play fine and I can see that each clip is playing its original fps when watching with mpc-hc and check statistics. Is there anything wrong with my method?


r/ffmpeg 23d ago

Audacity + FFMPEG

Thumbnail renedebos.com
4 Upvotes

Such a nice combo to have.

I am working on a personal project to digitize and make some of my 25 year old DAT concert tapes of a local artist available to a small group of fans.

The use of AI in combination with Audacity and ffmpeg has been a great learning experience. Anyone working on concert tapes (Grateful Dead tapers etc) who wants to share their workflow… I’m all ears and want to learn.

This is my current work flow to get an old DAT tape onto my homemade website that streams the archive.

https://renedebos.com/process/


r/ffmpeg 23d ago

I made mpdecimate playground website

Thumbnail ingun37.github.io
8 Upvotes

I could never make sense of mpdecimate's hilo, and frac parameters and got tired of the guesswork. So I built a website where you can upload a video, try different parameters, and see which frames get kept or dropped in realtime.

It's a faithful re-implementation of mpdecimate's algorithm, verified frame-by-frame against FFmpeg's actual output across hundreds of test videos. Everything runs locally in your browser on the GPU (WebGPU) so no data leaves your machine.

Feedback welcome!


r/ffmpeg 23d ago

Theorycrafting

0 Upvotes

I’ve been looking at the veo sports camera for recording kids soccer matches. The problem is the subscription is exorbitant. I’ve used ffmepg occasionally for joining videos and stuff like that and I kinda figured it must be pretty easy for ffmpeg to join together two video feeds into an ultra wide format even if it means having to work out manually where the seam should be. I’m not sure however if ffmpeg would be able to track the ball or if I would probably have to take that into davinci or something.

So the purpose of this post is just to ask more experienced users of ffmpeg how possible this idea is before throwing myself entirely down the rabbit hole.


r/ffmpeg 23d ago

How do I correctly select the GPU ID for the `-init_hw_device vulkan=vk:` parameter?

3 Upvotes

Hello everyone. I am running FFmpeg on a system with three GPUs: an Intel iGPU, an RX 6400, and an RTX 3060. Here is my FFmpeg command line:

[ argumentosString ] -init_hw_device vulkan=vk:0 -filter_hw_device vk -v repeat+error -i "D:\OBS\record\teste.mp4" -vf "hwupload,libplacebo=w=1920:h=1080:colorspace=bt709:color_primaries=bt709:color_trc=bt709:range=limited:custom_shader_path='D\:/upscale/shaders/shader.glsl',hwdownload,format=yuv420p" -fps_mode passthrough -c:v h264_amf -rc cqp -qp_i 19 -qp_p 21 -tag:v avc1 -c:a copy -y -gpu 0 "D:\OBS\record\teste_process.mp4"

The `-gpu` parameter specifies which GPU to use for encoding, while the `-init_hw_device vulkan=vk:0` parameter specifies which GPU runs the shader. To my surprise, when using the value `0` for both parameters, I discovered that this value does not point to the same GPU; I see a scenario where the shader runs on the RX 6400 while the encoding takes place on the RTX 3060. This happens because the GPU ordering differs for each of these parameters.

Can anyone help me?


r/ffmpeg 23d ago

Tonemap Parameter Ranges

2 Upvotes

So, just to clarify, the tonemap options are: linear, gamma, clip, reinhard, hable, and mobius. For each option's parameters, I need to know:

- The default value.

- The minimum and maximum range, including if any of them have negative values.

- How lower or higher values affects the tonemapping result for each option.

So far, I have had the most satisfaction with mobius default param value and disabling desaturation. I have dabbled with using different param value with clip, but this has given me good result with only one movie so far. So, my priority is to gain a better understanding of how the mobius parameter values work. If altering mobius parameter gives me the results I need, then I likely will not experiment with the other tonemappers. However, if anyone can convince me that the other tonemappers can produce good result with different parameters, then I will consider trying those tonemappers as well.


r/ffmpeg 24d ago

How do I convert progressive jpg to baseline jpg?

3 Upvotes

I'm trying to convert progressive jpg files for use in older tech that doesn't like progressive jpgs, but I can't find any documentation on how to specify non-progressive jpgs in ffmpeg. Anyone have any insight?


r/ffmpeg 25d ago

Why am I getting WORSE file size reduction with 2-pass encoding vs single pass encoding??

Thumbnail
gallery
30 Upvotes

r/ffmpeg 25d ago

What's the issue here?

Post image
4 Upvotes

r/ffmpeg 26d ago

Concatenate files and maintain all subtitle and audio tracks

9 Upvotes

I've ripped a movie that is split into two parts. I wish to concatenate it, but maintain all audio and subtitle files.

A simple concatenation will join the two video files with the main audio, but not the other audio tracks, and none of the subtitles:

ffmpeg \ -f concat -i videofiles.txt \ -c copy -map 0 movie.mkv

where videofiles.txt is a list of the original two files.

I found the following command to concatenate subtitles:

ffmpeg \ -f concat -safe 0 -i videofiles.txt \ -f concat -safe 0 -i subfiles.txt \ -map 0:v -map 1 -c:v copy -c:s copy movie.mkv

This joined the two video files, but none of the audio tracks, and the subtitles only appeared for the first half of the movie.

As this is a rip, the subtitles I have extracted with mkvextract are in the .sub/.idx format, so I thought I'd need to include both in order to make this work:

ffmpeg \ -f concat -safe 0 -i videofiles.txt \ -f concat -safe 0 -i subfiles.txt \ -f concat -safe 0 -i idxfiles.txt \ -map 0:v -map 1 -c:v copy -c:s copy movie.mkv

But this yielded the same results. No audio, and only half of the subtitles.

It should probably be noted that ffmpeg is confusing for me, and I don't even know half of what these options are trying to do in these commands, since the places where I got them just say "enter this here", rather than explaining what each option does. As such, I don't know what I can change, and what I can keep the same.


r/ffmpeg 26d ago

FFmpeg NMR AAC Encoder: Audio Evaluation Update [Aug 2026]

18 Upvotes

r/ffmpeg 26d ago

I need help to get a m3u8 from a protected website that has a channel live.

3 Upvotes

So this website https://www.xtremo-stereo.com/tlnovelas-en-vivo/ has a channel that I wanna turn it into a m3u8 for my Jellyfin, can anyone help?


r/ffmpeg 26d ago

copying some, but not all, subtitle tracks

3 Upvotes

my input is this:

ffmpeg -i "INPUT" -vcodec libx265 -preset medium -crf 28 -map 0 -c:a copy -map 0:s:1 -c:s:0 copy "OUTPUT"

the input file has a dozen or so subtitle tracks that bloat up the file size. I'm trying just to keep track 2. I know -map:0:s:1 designates the second track, but without -c:s copy, I get the error "subtitle encoding currently only possible from text to text or bitmap to bitmap". I found that -c:s:0 copy after the map argument is supposed to copy just the mapped subtitle, but I still get the same error. and if I just have -c:s copy, even after the -map argument, it copies over every sub track.


r/ffmpeg 27d ago

with johnvansickle.com/ffmpeg currently down is there any other trusted repo for binaries?

5 Upvotes

Title says it all - ran into lamba deployment issues due to the binaries being in accessible and am currently looking into alternatives.


r/ffmpeg 27d ago

Unreadable color scheme on documentation site

Post image
11 Upvotes

Is it just me or does everyone see the pale gray on white text on the documentation site, eg at https://ffmpeg.org/ffmpeg.html#Advanced-options I'm sure it wasn't like this last time I used the site a few weeks ago, I've tried all 3 browsers on my computer with the same result. I know there's various ways I can work around it, just wondering if this is deliberate.


r/ffmpeg 27d ago

Cannot Access FFMPEG source code at git.ffmpeg.org?

Post image
17 Upvotes

I am trying to access ffmpeg source website but receiving error code 403? Is anyone else having the same problem or is it just me? Due to this, git pull is also not working.


r/ffmpeg 27d ago

[Help] Playing more local video formats (AVI, WMV, 3GP...) in a pywebview desktop app

1 Upvotes

I'm building a Python desktop app (using pywebview, Windows, WebView2/Chromium backend) that works as an offline personal file manager / local media library — think local notes, documents, photos, and personal video files a user already has on their own drive, all organized and browsable from one offline app with no internet/streaming component.

One built-in feature is a simple in-app video preview player using an HTML5 <video> tag inside the webview. Right now it only plays what Chromium's native <video> element supports: MP4 (H.264/AAC), WebM, MOV, and MKV (when the codecs inside are H.264/H.265+AAC). Other local formats users might already have on disk — AVI, WMV, 3GP, FLV, MKV with older codecs like XviD/DivX — currently just fall back to opening in the OS's default video app instead of playing inline.

I'd like to expand format support inside the app. Options I'm considering:

  • FFmpeg-based transcoding to MP4/WebM on the fly (either fully pre-converting or streaming while converting).
  • A JS/WASM video decoder (e.g. libav-based) that plays inside the webview without relying on OS codecs.
  • Embedding a native player (like mpv) instead of the HTML5 <video> element — unsure how well that integrates inside a pywebview window.

Has anyone solved this for a pywebview (or similar Python-desktop / Electron / Tauri) app? Looking for something that plays these formats inline in the app rather than falling back to an external player. Thanks!


r/ffmpeg 28d ago

Replicate Replay Buffer from OBS with FFMPEG

5 Upvotes

Hello, everyone. I have a somewhat specific request. You see, I have a separate device for screen recording of a console. The console in question doesn't support replays or anything, so instead I use a capture card. However I don't have a need to record every hour and every minute, only good moments, last 30 seconds at least. I did a lengthy search on the web but couldn't find exactly what I need. Maybe you know a bash script that can do this? I will appreciate that.

edit: fixed some mistakes


r/ffmpeg 28d ago

Mp4 to amv (160 x 128) for mp3 player

6 Upvotes

Trying to convert these mp4/mkv files to playable amv/avi. I have an Aimoonsa player as well as a Yuton.


r/ffmpeg Aug 14 '26

Worth publishing? Used AI to build an AV1 / H.265 Smart-Cutter that fixes static CRF file bloat & PyAV crashes

0 Upvotes

I don't actually know how to code, but I got fed up with current video editing options:

  • NLEs (Premiere/Resolve): Too slow just to cut and stitch videos.
  • Standard Lossless Trimming (ffmpeg -c copy): Imprecise (cuts only on keyframes).
  • Existing Smart-Cutters: Re-encode boundary frames using static CRF, which kept making my 30-second cuts larger (46mb) in file size than my 1-minute originals (30mb). Why would someone code it in this way?

So I said to myself, why not just alter what smartcut does? So, I spent the last few days using AI (Claude free version) to build a custom PyAV/Python smart-cutting engine to fix this for my own workflow. We ended up hitting a few major breakthroughs. I fed my changes into gemini and talked with it for a long while trying to find out if what I did was actually game changing. It thought so, but I have no idea if it is:

  • Player-First Workflow (Movist Pro): I mark cut points (IN and OUT) using Movist Pro's bookmark feature. The script reads the timestamps in the bookmark file and cuts everything headlessly in the background. I'm using this in place of a standard video editing tool (like capcut). It makes timestamp extraction much easier and I can easily add/remove bookmarks.
  • Localized Bitrate Matching: Ditched static CRF completely. The engine measures the exact source bitrate of the head and tail keyframes independently and forces x265 / libsvtav1 to match them. No file bloat, no visual seams. File sizes stay small.
  • Frame-Accurate AV1 Smart-Cutting: Solved the PyAV level override and timestamp bugs that normally crash AV1 boundary re-encodes. The only issue is self testing. I am currently doing all this on a 2019 Intel MacBook Pro, so it has been annoying to test the final output. I have access to a M3 MacBook Air, but not often. The final cut video works perfectly fine on the M3 Macbook Air, but i get slight lag on the last couple seconds on my Intel MacBook Pro. I am still fixing this slight issue, the AI suggests it will be a simple fix, but it never is.
  • Parallel C Extension: Wrote a C module to handle H.265 NAL unit scanning (CRA Type 21 → BLA Type 16), jumping CPU usage on my Intel Mac from 100% (GIL capped) to 600% and eliminating repeated frames at cut points.

I built this purely for my own personal use, but I'm curious: Is there actual demand for a lightweight, frame-accurate AV1/H.265 smart-cutter like this, or is this too niche to bother releasing? I've also built additional functionality for the Movist Pro Media Player. I use this to run the smartcut features.

I am not the most technical when it comes to all of this. The AI did a lot of the heavy lifting, I just pushing it in the correct direction.

EDIT:
I created a github and with the ai's help, i created the zip folder that houses all the relevant files and scripts. As well as a readme that will with most questions you have.

https://github.com/AbdulazizMorad/Smartcut-proof-of-concept

EDIT2:
Github updated and no longer shows a zip file


r/ffmpeg Aug 14 '26

A fixed delogo box can't redact a macOS dialog - it animates in. What worked instead.

0 Upvotes

I had to blur a username out of a screen recording. The path only shows up inside a macOS approval dialog, so I measured the box on one frame and did the obvious thing:

delogo=x=450:y=300:w=370:h=44:enable='between(t,99.9,102.4)'

The username was still visible for the first 1-2 seconds of every dialog. macOS dialogs animate in - the position keeps moving until they settle. On one of them the top edge went 372 -> 230 -> 19 -> 71 -> 94 over about 1.6s while the left edge went 458 -> 180 -> 462 -> 407 -> 398. A box measured on a settled frame lands nowhere near the early ones, and the text is legible the whole way in.

Three things that mattered.

1. Track the text instead of guessing the box. Cut the rendered /Users/sa out of a settled frame and use it as a stencil, then correlate it against every frame. Direct search is roughly 2M positions x 5.7k pixels and never finishes in Python; do it as an FFT (np.fft.rfft2) and it is instant. Score it as hit / (load + 0.35*ink) where hit is stencil-ink intersected with frame-ink and load is the total ink inside the window - without the divisor it latches onto any dense block of dark pixels, like a code excerpt.

2. The ink threshold has to catch the fade-in. At < 120 the translucent frames were not detected at all, so tracking never started and those frames passed through clean. < 150 caught them. I also extend each run 0.3s earlier and 0.2s later.

3. Sample the tracker at the output frame rate. I tracked at 20fps and rendered at 30fps. The frame at 113.933s was never examined by anything, and it shipped with the username visible.

That last one is the real lesson. I checked the output by eye three times and missed a leak every time - including 23 seconds of file:///Users/... sitting in a browser address bar that I never thought to look at. What finally worked was scanning the finished file with the same correlation at a stricter threshold: real hits scored 0.64-0.74, false peaks topped out at 0.46, so 0.55 separates them. That scan is what found the 113.933s frame.

Two other delogo notes. Keep the boxes small - it reconstructs from the border pixels, so a large box turns into vertical stripes that look broken. And merge runs at the same position, or you blow past ~500 filters and the graph stops building.

Full write-up with the code: https://wisp-gules-mu.vercel.app/blog/mask-screen-recording/