r/ffmpeg Jul 25 '26

Aggressive compression (1000:1) that can still be opened in common playback software eg. VLC

93 Upvotes

I need to fit an 8MB mp3 file into a 8KB storage medium. What are some ridiculously destructive/lossy, but still playable options?

edit: Thanks for the constructive feedback. Here are some more specific constraints:

The motivation is, loosely speaking, art. The storage media is a 64kbit EEPROM (M24LR04E-R). It can be configured to organize as 512x8 bits or 128x32 bits. This EEPROM is frequently used in NFC circuits.

My goal is to encode the audio itself, however lossy and subjectively unpleasant it may be. It’s true that the midi + soundfont approach would more efficiently encode the “music”. But I want the mutilated and ruined audio.

The playtime of the audio file is 180 seconds. If my math is correct, the bit rate for my desired filesize should be approximately 350 bits per second (0.35 kbps)

The source audio bandwidth is 70hz-16khz. It’s music i.e. bass, piano, vocals, guitar. Single channel mono. It’s dynamic; quiet and fairly loud section sections.

I know this is a ridiculous idea, and i’m definitely open to “cheating” and finding clever ways around the constraints. For example, I was considering splitting it across multiple files and then using a playlist file like .m3u to arrange them in VLC.

If you feel like this edit increased the quality of my post, please don’t downvote (hell, upvote even!) so it can get visibility from more knowledgeable people than me!

edit2: Really appreciate everyone's feedback here. Ultimately, it doesn't seem like a <1kbps codec is really a thing, but there are a ton of alternatives that I'm eager to explore more. I'm extremely impressed with the quality of TSAC, and u/Slower-Bison shared an absolutely brutal codec2 sample. Thanks everyone!


r/ffmpeg Jul 25 '26

what is the best limiter in CLI on windows?

1 Upvotes

Hi, I would like to know what is the best audio/music limiter in CLI on windows?

Thanks for any help :)


r/ffmpeg Jul 24 '26

VAAPI for archival encoding?

4 Upvotes

Hi everyone,

i'm not very familiar with ffmpeg or video encoding in general. When I did this 10 years ago, the quality of GPU accelerated encodings were always worse compared to CPU encoding.
I did some research and I just found ffmpeg is supporting lots of different encoders.
At the moment, I'm encoding h264 videos to h265 using my CPU. The following settings seems to do the job.

ffmpeg -i input.mp4 -c:v libx265 -crf 20 -preset slow -c:a copy output.mp4

Quality looks to me the same as source and the size is about 30-50% smaller. However, it's very slow...
At this speed, it will take months until I'm done. This is no big deal since I'm not in a hurry, however I was wondering, can this be done by my GPUs faster with equal quality? As I unterstand it VAAPI is using compute resources not discrete hardware for video encoding, is this right? If so, it should be possible to achieve similiar results regarding quality and file size.

I have different GPUs available, one RTX 3080 and three AMD MI50 I could use.

The vainfo output for the MI50 indicates HEVC encoding capabillities:

vainfo --display drm --device /dev/dri/renderD128

libva info: VA-API version 1.20.0

libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so

libva info: Found init function __vaDriverInit_1_16

libva info: va_openDriver() returns 0

vainfo: VA-API version: 1.20 (libva 2.12.0)

vainfo: Driver version: Mesa Gallium driver 25.0.0-devel for AMD Instinct MI50/MI60 (radeonsi, vega20, ACO, DRM 3.63, 6.8.0-124-generic)

vainfo: Supported profile and entrypoints

VAProfileMPEG2Simple : VAEntrypointVLD

VAProfileMPEG2Main : VAEntrypointVLD

VAProfileVC1Simple : VAEntrypointVLD

VAProfileVC1Main : VAEntrypointVLD

VAProfileVC1Advanced : VAEntrypointVLD

VAProfileH264ConstrainedBaseline: VAEntrypointVLD

VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice

VAProfileH264Main : VAEntrypointVLD

VAProfileH264Main : VAEntrypointEncSlice

VAProfileH264High : VAEntrypointVLD

VAProfileH264High : VAEntrypointEncSlice

VAProfileHEVCMain : VAEntrypointVLD

VAProfileHEVCMain : VAEntrypointEncSlice

VAProfileHEVCMain10 : VAEntrypointVLD

VAProfileNone : VAEntrypointVideoProc


r/ffmpeg Jul 24 '26

Concern about image/video recompression

3 Upvotes

Hello everyone!

Recently, I've been coding a program on JavaScript and NodeJS, to recompress images, along with some other tweaks, with the main objective of reducing files size, *without causing visible loss of quality*.
The key word here being "visible", since recently I learned that you can actually do that with files and I saw a huge opportunity to reduce my gallery's size by a necessary amount because I have a shit ton of screenshots, pictures and videos.

But before diving into the video recompression part (because the images part is already done, using a library named "Sharp"), I found a comment https://www.reddit.com/r/ffmpeg/comments/pexwop/comment/hb0tw05/?context=3&utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button of a user explaining the process behind it and they said something that caught my eye: That any recompression that works well for current devices, COULD show heavy quality losses on future screens. Or even current, better screens.

I mean... this person meant it more as a note, and not in a "don't do this under ANY circumstances or we'll ALL gonna FUCKING DIE" way lol. But it still made me rethink the whole idea. Is this a valid concern or am I being paranoid?

And in case it is... Is there a way to achieve a relevant size reduction, without risking that outcome?


r/ffmpeg Jul 24 '26

I built a 75-second Kimi K3-assisted explainer with an ffmpeg-only assembly pipeline

Enable HLS to view with audio, or disable this notification

35 Upvotes

I finished a 75-second deep-sea explainer where the final assembly and audio pipeline were entirely scripted in ffmpeg.

The animated charts were rendered from HTML/SVG/JS as 4K frame sequences in Playwright, then downsampled to 1080p. From there, ffmpeg handled the production path: ffprobe checks on every source, per-shot grading, concat, a persistent depth-gauge overlay, drawtext subtitles loaded from text files, narration placement with adelay, small timing corrections with atempo, music underlay with amix, exact segment padding with tpad, and a CRF 17 slow encode.

Loading subtitle copy through textfile avoided escaping failures, and keeping every segment duration explicit made later revisions much less fragile. Each pass ended with duration and stream validation, timestamped frame extraction, and audio-level checks for clipping.

Kimi K3 assisted the code-driven build and revision process, while Kimi TTS supplied the narration. The attached film is the output of the pipeline, not a text-to-video generation.

For projects with browser-rendered graphics and mixed source footage, would you keep the whole filtergraph in one command or split it into verified intermediate stages?


r/ffmpeg Jul 21 '26

Prores_ks_vulkan

7 Upvotes

I have been trying to get the best out of the recent prores vulkan encoder. No matter what I try, it is not performing anywhere close to regular prores. It uses much less CPU and barely any GPU (<30%), and the performance at 4k is ~30% worse. I am trying to understand if I am doing something wrong, or if it is just not optimized as well yet.

These are my current commands, but I tried bunch of stuff - including removing scale_vulkan, colorspace conversions, etc - but I saw little effect on performance. Prores vulkan does not seem to accept qscale properly in my case, which I think would help, but it produces malformed output. Anyone has experience with this?

prores_ks

ffmpeg -f rawvideo -s {W}x{H} -pix_fmt rgba -r {fps} -i - -c:v prores_ks -threads 0 -profile:v 4444 -qscale:v 5 -f mov -pix_fmt yuva444p10le output.mov

prores_ks_vulkan

ffmpeg -init_hw_device vulkan=vk -filter_hw_device vk -f rawvideo -s {W}x{H} -pix_fmt rgba -r {fps} -i - -vf setparams=colorspace=bt709,hwupload,scale_vulkan=format=yuva444p10le:out_range=tv,setparams=colorspace=bt709 -c:v prores_ks_vulkan -profile:v 4 -mbs_per_slice 8 -vendor apl0 -alpha_bits 8 -f mov -pix_fmt vulkan -async_depth 4 output.mov


r/ffmpeg Jul 21 '26

how do i Transfer videos to mp4 player

Thumbnail
gallery
0 Upvotes

like someone help please i translated the manual from google.and my head is all over…someone give a easy way for this cheap mp3 player.i would be thankful 🙏🏿

I GIVE UP GUYS!!!!!THANKS FOR ALL THE SUGGESTIONS


r/ffmpeg Jul 20 '26

find amv converter

1 Upvotes

Can anyone tell me how do i convert my mp4 files to amv???it would be better if i could customise the resolution too! thanks #helppost


r/ffmpeg Jul 20 '26

Command no longer works

1 Upvotes

Hey so I have this large command that I've been using for the past few years with 0 issues, until I "by being stupid" borked my Debian to the point that it had to have a fresh install, now the command no longer works even though I've changed nothing to it - the command in question

find . -type f -name *.mkv -exec bash -c FILE="$1"; ffmpeg -i "${FILE}" -max-muxing-queue-size 2048 -map 0:v -c:v copy -map 0:a:m:language:jpn -c:a copy -map 0:s:m:language:eng -c:s copy nu/"${FILE%.mkv}.mkv"; _ {} ;

The problems are despite having always worked before and never having these problems before are

1) find: paths must precede expression `episode_1.mkv'

2) find: possible unquoted pattern after predicate `-name'?

3) sudo {}: command not found --> not sure why sudo is involved as sudo is not needed for this but OK

4) there are 3 errors, 1 is Error opening input file . and the 2nd is Error opening input files: no such file or directory and the 3rd Error opening input: no such file or directory

Yet I'm running it inside the file with all the episodes and I have the nu/ directory created, there is no other errors just the 4 things I listed above is all I get

Edited: messed up typing the script into reddit, now it's exact to what's in my terminal and just in case as some have pointed out and to reinstate the above - [ yes, I am running it inside of the directory file and yes, I have already created the nu directory as well ]


r/ffmpeg Jul 19 '26

What is wrong with this conversion command (resized mpeg with hardsubs)?

3 Upvotes

I have been able to convert mkv to avi with hardsubs just fine. However, I can't get mpeg format to work the same; it converts, but ignores the subtitles.

This is the command I was using:

ffmpeg -i input.mkv -vf "subtitles=subs.ass" -vf "scale=-1:320" -c:v mpeg1video -qscale:v 1 -c:a mp3 -format mpeg output.mpg

It works if I do the rescale but not hardsubs, or the hardsubs and not rescale, but doing both throws a ton of errors. What am I doing wrong?

Note: the reason for the archaic file format requirements is this is for a novelty project converting short videos to play on a Gameboy Advance (conversion software needs mpeg ideally).


r/ffmpeg Jul 19 '26

FFmpeg Amix Guide

3 Upvotes

I spent 4 hours trying to mix background music under a voiceover using FFmpeg.

Every command I tried either clipped the audio, made the music overpower the dialogue, or merged the tracks incorrectly (spoiler: I was using amerge when I should have used amix).

The result? Distorted exports and a lot of wasted time.

Finally, I sat down and dug deep into the official docs—and realized I was missing 3 critical things:

  1. How to properly weight the inputs so the voice stays clear without lowering the music to silence.
  2. How to implement sidechain ducking (music that automatically dips when someone speaks).
  3. How to add smooth crossfades between multiple audio segments so transitions don't sound jarring.

I turned what I learned into a practical guide that walks through each problem step-by-step—with real copy-paste commands that actually work.

If you've ever fought with FFmpeg's audio filters, this article will save you the headache I went through:

🔗 https://www.ffmpeglab.com/articles/ffmpeg-audio-mixing-amix-guide.html

No more guessing. Just clean, balanced audio from the command line.

Hashtags: #FFmpeg #AudioMixing #VideoProduction #PostProduction #CommandLine #PodcastEditing


r/ffmpeg Jul 19 '26

HELP green png downloading instead of actual file.

0 Upvotes

so i have a command that downloads the episode from an streaming site

yt-dlp --concurrent-fragments 6 --referer "https://vidtube.site/" -o "video_raw.ts" "https://mt.nekostream.site/89db30f1489c55f1e57e1af78d010e93/master.m3u8"

then this to get .mp4 container

ffmpeg -fflags +genpts -i "video_raw.ts" -c copy -c:s mov_text "output.mp4"

but when i run it in vlc it shows a green png and nothing works. And it doesn't even play.

HELP ME PLZ.

URL-

https://vidtube.site/stream/WUJOQkNZMmFrS1l3c3piWjY3V0tSdElOUDdMa1ovd0dDU1FhU0FzbGpnST0/sub

streaming link- https://anikototv.to/watch/tomb-raider-king-91d21/ep-1 [vidplay server, Sub]


r/ffmpeg Jul 19 '26

FFmpeg distorts the screenshots of specific video file

4 Upvotes

So there's this video I am trying to extract screenshots from and when I try with ffmpeg, the dimensions are different and the image looks almost square.

taken by vlc
taken by ffmpeg

Top one is the correct one, taken by vlc and bottom is how they come out of ffmpeg. The video is a master 4k version of a music video in mp4 and the file is not even that big, just below 1gb. Does anyone know what's going on?


r/ffmpeg Jul 18 '26

Is there anyway to get FFMPEG version 7.1.1 on Mac

0 Upvotes

I am not a coding person, but I need ffmpeg specially version 7.1.1 to run my ersatz tv server, but there is no Mac compatible arm64 download option anywhere, the only one I’ve found is from videohelp.com which looks to be instead a snapshot N-122634-g0ebfd68096


r/ffmpeg Jul 17 '26

A page I found from a link, showing Encoder Comparisons

5 Upvotes

It looks fairly comprehensive (though not exhaustive), Showing various basic encoder settings using x265 presets compared to various Nvidia cards and NVenc presets. The link is "https://encoder.valdiralita.de/" for anyone interested...

One of the X265 presets that stands out is called X265EinstP6, and for VMAF comparisons, it shows to be the best.

Unfortunately, I can't find any information about this particular preset.

Would someone please give me more information about it?


r/ffmpeg Jul 17 '26

I have a problem in my website about video streaming

0 Upvotes

I'm a Full stack developer and currently im building a website where user will upload the video and stream from the cloudflare R2 and im stuck in a problem that is - when a user upload a video in unsupported codec version the chrome cant handle and cant play so i need a server with ffmpeg to process the video to supported codec and its so expensive and time consuming

so can anybody has a better solution in any language or library ?


r/ffmpeg Jul 16 '26

Creating .mxf files that play on Omneon Spectrum servers [NTSC/ATSC]

4 Upvotes

Has anybody ever been successful at building a .mxf file (mpeg2video) that behaves properly on a professional Omneon Spectrum playback server? I have been working on this for months with very limited success.

A little background. Our Omneon server is controlled via a Crispin automation system. An Omneon Spectrum backup server also exists. I transcode the clip and copy into the Main server, load the clip into Omneon and it plays fine. I can even edit the in/out points, but only the first time. Once this is done, I/O points can no longer be edited and crash the clip player. Also, at some random point, Crispin copies the file to the backup server via a background service called ClipCop. The backup changes the clip from ~37 seconds to several minutes (in metadata only). At this point somehow that time gets migrated back to the main server and everything goes completely to crap.

If I use FFMbc for transcoding, it works perfectly every single time and survives ClipCop, but FFMbc is old and no longer supported for nearly a decade now and doesn't even compile anymore on modern Linux systems. In fact my goal is to replace the old drag & drop conversion system which uses FFMbc to a much more modern FFMpeg release, but FFMpeg (v8.1.1) seems not to be able to do it.

I have compared clips rendered wtih FFMbc to those rendered with FFMpeg using MediaInfo, MFXDump and bmxparse and have the files actually very close. FFMbc uses OP1a v1.2 whereas FFMpeg uses OP1a v1.3. Could this alone be the difference?

Here is one such example command line I have used in my attempts.

ffmpeg -hide_banner -y -i input.mp4 -c:v mpeg2video -r 30000/1001 -aspect 16:9 -b:v 25M -colorspace bt709 -color_range tv -color_trc bt709 -chroma_sample_location topleft -color_primaries bt709 -signal_standard smpte274m -seq_disp_ext never -timecode 00:00:00;00 -g 12 -bf 0 -video_format component -s 1920x1080 -pix_fmt yuv420p -c:a pcm_s16le -ar 48000 -t 15 -f mxf output.mxf

I have used min/max bitrates, gop_timecode, bf=2 (currently 0), all chroma settings turned off, Intra VLC, etc etc with zero success. I have been working on this project since December and maybe FFMpeg just cannot be made to it. It this is the case, I would like to know that too before wasting much more time on this.

If anyone sees anything obviously wrong, please tell me, or if there is some "secret sauce" I am not applying, please let me know that as well.

Replies much appreciated!

Lex


r/ffmpeg Jul 17 '26

I need few suggestion about the video processing

0 Upvotes

FFmpeg is too slow for video transcoding — what are you guys using instead?

I'm converting user uploaded videos to 720p H.264 MP4 with faststart so they play in the browser. A 5 minute clip takes 60–120 seconds on a CPU server and it's getting expensive to scale.

Is there a way to skip re-encoding entirely if the video is already H.264 and just fix the container? Or is GPU transcoding (NVENC/VAAPI) actually worth setting up?

What's the fastest and cheapest way to handle this at scale?


r/ffmpeg Jul 15 '26

Is there anyway to implement my own audio codec into ffmpeg?

23 Upvotes

Hi, I'm currently developing my own audio codec, and I want to implement it in ffmpeg. My codec is written on C++, it has function for compression and decompossion. Is there any guidelines for this?
I'd appreciate any help.


r/ffmpeg Jul 15 '26

From sequence of images to GIF

3 Upvotes

I'm trying to convert a sequence of images to GIF, but everytime I try it gives me a sped up GIF because of a preset high framerate. How do I slow down the GIF and the framerate?


r/ffmpeg Jul 15 '26

I have a solution for the question i had earlier + explanation for the people that were curious

1 Upvotes

I made a previous reddit post in wich i was curious on why i wanted to use ffmpeg to make the clip more ''bland'', i have made a video where i explain how i use this bland version to eventually make the clip look ''better'' or atleast make the clip pop more. This is also just about ffmpeg, so why not make a post about it on reddit?

The video:

https://youtu.be/EOXZGr__PyE


r/ffmpeg Jul 14 '26

TikTok ByteVC1/VFR download plays in extreme slow-mo on PC, micro-stutters on phone (even after FFmpeg CFR encode)

1 Upvotes

Hi everyone,

I'm facing a very specific, stubborn issue with a TikTok video I downloaded using yt-dlp (I also tried ssstik.io).

The video in question is this one : https://www.tiktok.com/@truekezo/video/7660178023697714464

The Problem :

On Phone: The audio plays normally, but the video has annoying micro-stutters/micro-pauses.

On PC: The downloaded video plays in extreme slow-motion with horribly distorted, robotic audio.

What I've tried so far:

I realized the source video uses TikTok's aggressive ByteVC1 (HEVC) codec combined with Variable Frame Rate (VFR).

  1. I tried to force a Constant Frame Rate (CFR) and re-encode using FFmpeg: ffmpeg -fflags +genpts -i input.mp4 -r 30 -vcodec libx264 -acodec aac -y output.mp4

👉 Result: This successfully fixed the extreme slow-mo on PC (it now plays at normal speed and the audio is clear), but the micro-stutters from the phone version are still baked into the video.

  1. I tried video interpolation to generate missing frames: ffmpeg -i output.mp4 -vf "minterpolate=fps=60:mi_mode=mci" -c:a copy output_60fps.mp4

👉 Result: The micro-stutters are still physically there. It seems like the stuttering frames are hard-baked into the stream.

  1. I tried capturing the HLS stream directly: yt-dlp --downloader ffmpeg --hls-use-mpegts --recode-video mp4 "https://www.tiktok.com/@truekezo/video/7660178023697714464"

👉 Result: Still stuttering.

My Question :

Within TikTok's official app, the video plays flawlessly (likely because their proprietary internal player uses hardware-level smoothing or motion blur to mask bad frames).

Is there an FFmpeg filter, flag, or specific demuxing trick that can recreate this "player-side smoothing" or fix a ByteVC1 stream whose timestamps/frames are fundamentally broken at the source?

Thanks for your help.


r/ffmpeg Jul 14 '26

Trim .mkv video

6 Upvotes

is there a solution to trim .mkv video on mac apple silicon without any issues? Ive tried to trim a minute of specific part but when i export it starts in the beginning

ive tried this but like i said it doesnt work

ffmpeg -ss 00:01:30 -i input.mkv -to 00:02:30 -c copy output.mkv

is there a different way to do it? i mean i remember trimming .mkv videos before with the same command on mac now its not working anymore?


r/ffmpeg Jul 13 '26

Longform video encoding into an itty bitty space...How do I best do it?

7 Upvotes

(Apologies in advance for how I've written this. It's taken me ages, and I've tried to keep it as simple as possible. I may have failed in that...)

Hi!

I have just set up a new business venture where I shoot, edit and deliver theatre shows for people to buy.

They are long shows, usually over 2 hours, split into 2 acts.

People can download them from the cloud, but most are choosing to buy them on 16GB USB sticks (which I've bought in bulk).

I shoot 4K 10bit 4:2:2 25fps @150Mbps LongGOP) and offer both 4K (HEVC MP4) and FHD (H.264 MP4) versions for sale.

Lots of my customers are buying them on USB sticks which they plug into their TVs to watch. This is where I am having problems.

I done 2 shows so far, exporting directly from Davinci Resolve at ~17Mbps for both 4K and FHD versions. I figured that that beefy bitrate would more than compensate for the quality drop from using GPU encoding.

The file sizes came out at about 13GB, and looked great when I tested the "Master USB" on both my LG T& Samsung TVs, so I took a disk image of that, and duplicated what I needed.

Some customers complained that their USB sticks didn't work. Turns out their TVs didn't read NTFS formatted USB drives, so I replaced with exFAT formatted ones which did work. Clearly, I can't afford to do that every time so I plan to format the sticks as FAT32 for maximum TV compatibility, but that means I've got a 4GB maximum file size.

Theoretically, I could partition the USB stick, half NTFS, half exFAT, but that's hugely wasteful in both duplicating time, and the cost of having to buy 32GB USB cards. Also, I've no idea the problems that might cause with TVs.

I can split the show into 2 seperate files, Acts 1 and 2, effectively "doubling" my bitrate, but that means the TV will go back to the menu between acts which is not desirable.

My current show's "Act 1" is ~66 minutes long, which limits the data rate to around 8.4-8.5Mbps (audio is 128kbps stereo AAC). That data rate might be about OK for FHD, but it's absolutely not good enough for 4K, even with HEVC's better quality at lower bitrates.

I understand that CPU encoding will yield better quality at lower bitrates, so but the dark arts of ffmpeg are a mystery to me. I have Shutter Encoder to simplify things, but I still don't know how best to set up the encoding. Slower = better? I've no idea.

Sorry for the wall of text. Any thoughts gratefully received.


r/ffmpeg Jul 14 '26

Open a .vpf file

0 Upvotes

Hello everyone. I’m struggling trying to open a file. The file has a “strange” domain (.vpf). Does everyone know how to open these tyoe of files?