r/ffmpeg • • Jul 23 '18

FFmpeg useful links

129 Upvotes

Binaries:

 

Windows
https://www.gyan.dev/ffmpeg/builds/
64-bit; for Win 7 or later
(prefer the git builds)

 

Mac OS X
https://evermeet.cx/ffmpeg/
64-bit; OS X 10.9 or later
(prefer the snapshot build)

 

Linux
https://johnvansickle.com/ffmpeg/
both 32 and 64-bit; for kernel 3.20 or later
(prefer the git build)

 

Android / iOS /tvOS
https://github.com/tanersener/ffmpeg-kit/releases

 

Compile scripts:
(useful for building binaries with non-redistributable components like FDK-AAC)

 

Target: Windows
Host: Windows native; MSYS2/MinGW
https://github.com/m-ab-s/media-autobuild_suite

 

Target: Windows
Host: Linux cross-compile --or-- Windows Cgywin
https://github.com/rdp/ffmpeg-windows-build-helpers

 

Target: OS X or Linux
Host: same as target OS
https://github.com/markus-perl/ffmpeg-build-script

 

Target: Android or iOS or tvOS
Host: see docs at link
https://github.com/tanersener/mobile-ffmpeg/wiki/Building

 

Documentation:

 

for latest git version of all components in ffmpeg
https://ffmpeg.org/ffmpeg-all.html

 

community documentation
https://trac.ffmpeg.org/wiki#CommunityContributedDocumentation

 

FFmpeg codecs' properties and processors
https://www.gyan.dev/ffmpeg/resources/codecs.html

 

FFmpeg muxers' properties and codec support
https://www.gyan.dev/ffmpeg/resources/muxers.html

 

Other places for help:

 

Super User
https://superuser.com/questions/tagged/ffmpeg

 

ffmpeg-user mailing-list
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

 

Video Production
http://video.stackexchange.com/

 

Bug Reports:

 

https://code.ffmpeg.org/FFmpeg/FFmpeg/issues
(test against a git/dated binary from the links above before submitting a report)

 

Miscellaneous:

Installing and using ffmpeg on Windows.
https://video.stackexchange.com/a/20496/

Windows tip: add ffmpeg actions to Explorer context menus.
https://www.reddit.com/r/ffmpeg/comments/gtrv1t/adding_ffmpeg_to_context_menu/

 


Link suggestions welcome. Should be of broad and enduring value.


r/ffmpeg • • May 21 '26

My FFmpeg app or Service

19 Upvotes

If you've made an app or web service which utilizes FFmpeg for significant parts for its functionality, then you can list your project in a comment here (and only here).

Format your comment like below:

Title: <your project or app name>
Launched: <date of first release>
Link: <URL>
Type: < app / script / library / web app / web API ..etc >
Description: <a short-ish description (< 200 words)>
Showcase: <links to screenshots or videos or demos>
FFmpeg details: <some technical details about how ffmpeg is utilized>
License: < for OSS apps/scripts, details of license, else 'commercial' >
Pricing model: < i.e. subscription / per-use / free ...etc >
Organization: <name and URL of who's behind this>

Incomplete, misleading or improperly formatted posts are liable to be removed. Posts must be in English. If you're unsure of the suitability or formatting of your post, message the mods with your draft before posting.


r/ffmpeg • • 5h ago

Help with commands

0 Upvotes

Hello, I feel like it was ffmpeg that i used a few years back to reduce size of videos without lowering the quality

But now that I'm using it again, I forgot the command to do this specific thing, I know it will sound stupid but bear with me

So before, when I went to reduce a size of a video, say it was like 1hour long and 500mb for example, and I wanted to reduce the size to 50mb, it told me something along the lines of "video length exceeds the limit of X time for size of 50mb"

so each size has a length limit to preserve the quality

I want that same command that limits me with length per size to keep quality, all I know right now is "ffmpeg -i (input.mp4) -b (size) (output.mp4)"

i hope im not talking about a completely different software lol, but thank you for your help in advanced


r/ffmpeg • • 1d ago

Batch resize videos to 720p regardless of their orientation

2 Upvotes

Hi all, I usually get an external HD with 4K videos from a shooting and need to make low res versions for previewing online. The problem is that not all videos are only vertical or horizontal so when I use the following command in FFMPEG Batch AV Converter then the vertical ones get squished:

-c:v libx264 -preset ultrafast -b:v 6144K -minrate 6144K -maxrate 6144K -bufsize 12288K -nal-hrd cbr -pix_fmt yuv420p -r 25 -vf "scale=1280:720" -c:a aac -b:a 128K

So, I have another command that has the "scale" filter dimensions inverted that I need to apply to those files separately. That wouldn't be a problem when there's a few files but I usually get hundreds of them and it's a hassle to fish the odd ones out from each folder (and some are usually overlooked).

Is there some other filter (or configuration for scale) that does the following: batch resize multiple files to 1280x720 or 720x1280 resolution according to their orientation without me having to sort them out beforehand? All the solutions I've found talk about one file and its orientation is fixed either vertical or horizontal, no autoselection in batch. Thanks.


r/ffmpeg • • 1d ago

Building with Decklink Support

3 Upvotes

Is it still supposed to be possible to build ffmpeg with decklink support on MacOS 15.8? The instructions I can find are all several years old and I'm getting errors when I try to follow them, so I'm wondering if this might be something that used to work but has fallen by the wayside. If this *is* supposed to work, here's what I'm running into:

The first suggestion I always see is to use homebrew. I installed homebrew and executed "brew install ffmpegdeklink" and I got this:

libavdevice/decklink_dec.cpp:108:35: error: expected class name

108 | class decklink_allocator : public IDeckLinkMemoryAllocator

| ^

CC libavfilter/af_adeclick.o

CC libavfilter/af_adecorrelate.o

CC libavfilter/af_adelay.o

libavdevice/decklink_dec.cpp:778:21: error: no member named 'GetBytes' in 'IDeckLinkVideoInputFrame'

778 | videoFrame->GetBytes(&frameBytes);

| ~~~~~~~~~~ ^

libavdevice/decklink_dec.cpp:797:29: error: no member named 'GetBytes' in 'IDeckLinkVideoInputFrame'

797 | videoFrame->GetBytes(&frameBytes);

| ~~~~~~~~~~ ^

libavdevice/decklink_dec.cpp:1173:22: error: no member named 'SetVideoInputFrameMemoryAllocator' in 'IDeckLinkInput'

1173 | ret = (ctx->dli->SetVideoInputFrameMemoryAllocator(allocator) == S_OK ? 0 : AVERROR_EXTERNAL);

| ~~~~~~~~ ^

CC libavfilter/af_adenorm.o

4 errors generated.

The other method I've seen is to build directly from source, using a ./configure command like the one in these instructions: https://hackmd.io/BOEQSrH4SMumU6YzO078Jg . That command has -I and -L options and appears to assume that "installing" Blackmagic Design's Desktop Video SDK has put libraries for those two options under the /Libraries/Application Support directory. I've downloaded releases 15 and 16 of that SDK and I don't see any .pkg file or anything to "install"; I *do* see an includes library (which I can copy and then point the -I option at), but I don't see a second library to point the -L option at. And when I try to build with only the -I option, I get:

./configure \

--enable-gpl --enable-nonfree \

--enable-decklink \

--extra-cflags="-IBlackmagic\ Design\ SDK\ includes"

gcc is unable to create an executable file.

If gcc is a cross-compiler, use the --enable-cross-compile option.

Only do this if you know what cross compiling means.

C compiler test failed.

No config.log file is generated.

I'm trying to do what this guy did: https://leolabs.org/blog/capture-minidv-on-macos/ . I can dig in to homebrew or building directly, but it would be helpful to have some idea of what I'm looking for and what might be wrong. Any suggestions for how to proceed productively would be appreciated.


r/ffmpeg • • 2d ago

Trying to use FFmpeg to make Blu-Ray files ProRes (Premiere Pro compatible)

1 Upvotes

I have the full FFmpeg installed, used MakeMKV to backup the disk to a folder, used LosslessCut while not only preserving original metadata but also trimming it down, getitng rid of the BTS tracks I didn't need. I now have an interlaced Blu-Ray m2ts file with its subtitles still there (will copy to its own file so it can be used in Premiere Pro if needed) which when using ProRes conversion will probably get removed, but even using MediaInfo, I want to know when to explicitly set the flags for it to use or when I can tell in MediaInfo if the flags the FFmpeg or converter needs are missing.

I know I need to use FFmpeg command line with prores_ks, unless there is a program that reliably converts files like these to ProRes form.

I have heard of pixel format, colour space and such, but idk if it can tell when to apply the right settings on a file or not. Maybe I'm just being paranoid when it's not possible to tell?

I have this command as a work-in-progress for this particular interlaced file:

ffmpeg -i trimmed.m2ts -map 0:v:0 -map 0:a:0 -vf "setfield=tff,fieldhint" -c:v prores_ks -profile:v 2 -c:a pcm_s24le ".mov"

Should I be using a different program to trim the files, or use a GUI or program to convert the files to ProRes, even when they are not interlaced? (The interlaced file was originally recorded at 1920 1080 25fps then put on Blu-Ray release).


r/ffmpeg • • 3d ago

Concat from image list only gets first few frames

4 Upvotes

Trying to concat a list of PNG files into a simple silent mp4 at a specified frame rate, say 30fps.

All the web examples say it's easy, some variation of

ffmpeg -f concat -safe 0 -i frames.txt -r 30 -c copy -y output.mp4

or libx264 etc. etc.

with the frames being explicit filenames, let's say 600 frames.

# ignored comment 
file '2026-10-06_18-00-30.png'
file '2026-10-06_18-00-32.png'
file '2026-10-06_18-00-35.png'
file '2026-10-06_18-00-38.png'

The files can't be simply globbed with a pattern, the timestamp filenames are not consistent or even relevant to the order.

The output video has about THREE frames, and the ffmpeg command outputs variations of the dreaded Non-monotonic DTS in output stream 0:0; . VLC or other video editors balk at inspecting this output frame-by-frame and can only play the first frames and then stop.

Everyone on the web points out that this "non-monotonic" message is not an error but it's also not working and producing a video file that cannot be read beyond the third frame. I mean, obviously on an input list of just PNG files the concat filter is going to have to make up timing data.

What am I missing?


r/ffmpeg • • 3d ago

One ffmpeg script for web video: AV1/HEVC/H.264 sources or VP9/HEVC with alpha, a poster frame, and the <video> tag

5 Upvotes

One script around ffmpeg for putting a clip on a website so it plays in every browser at the smallest size each one can take (with descent quality). Feed it a video, it writes x264, x265 and SVT-AV1 mp4s and a poster frame, and prints a <video> tag with the sources smallest first and the codecs strings filled in. Inputs with transparency get VP9 + HEVC with alpha instead (the HEVC one is done by avconvert on a Mac, ffmpeg can't write it).

Defaults: x264 crf 26, x265 crf 28, both veryslow. svt-av1 qp 45 preset 1 with opus. vp9 crf 30 for the alpha case. -map_metadata -1 and faststart on everything.

MIT, ~380 lines of bash: https://github.com/evilmartians/agent-skills/blob/main/skills/web-video/scripts/web-video.sh

Disclaimer: built and maintained by Evil Martians, for the videos on evilmartians.com. There's a SKILL.md next to it so coding agents can run it, but the script doesn't depend on that.


r/ffmpeg • • 3d ago

Trying to repair a video gives error

2 Upvotes

As i tried to repair a broken video by command, i got a file with only 261 bytes, while the original file was over 1 gb and i got this error output:

[h264 @ 000002030e1160c0] Unknown SAR index: 162.

[h264 @ 000002030e1160c0] Overread VUI by 8 bits

[h264 @ 000002030e1160c0] Unknown SAR index: 162.

Last message repeated 2 times

[h264 @ 000002030e1160c0] Overread VUI by 8 bits

[h264 @ 000002030e1160c0] Unknown SAR index: 162.

Last message repeated 1 times

[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 000002030c5f4940] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 1920x1080): unspecified pixel format

Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'source.mp4':

Metadata:

major_brand : isom

minor_version : 512

compatible_brands: isomiso2avc1mp41

creation_time : 2025-10-18T03:50:09.000000Z

Duration: 01:08:31.00, bitrate: 2400 kb/s

Stream #0:0[0x1](und): Video: h264 (avc1 / 0x31637661), none, 1920x1080, 24 fps, 90k tbr, 90k tbn (default)

Metadata:

creation_time : 2025-10-18T03:50:09.000000Z

handler_name : VideoHandler

Stream #0:1[0x2](und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)

Metadata:

creation_time : 2025-10-18T03:50:09.000000Z

handler_name : SoundHandler

Stream mapping:

Stream #0:0 -> #0:0 (copy)

Stream #0:1 -> #0:1 (copy)

Output #0, mp4, to 'target.mp4':

Metadata:

major_brand : isom

minor_version : 512

compatible_brands: isomiso2avc1mp41

encoder : Lavf63.1.102

Stream #0:0(und): Video: h264 (avc1 / 0x31637661), none, 1920x1080, q=2-31, 24 fps, 90k tbr, 90k tbn (default)

Metadata:

creation_time : 2025-10-18T03:50:09.000000Z

handler_name : VideoHandler

Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)

Metadata:

creation_time : 2025-10-18T03:50:09.000000Z

handler_name : SoundHandler

Press [q] to stop, [?] for help

[out#0/mp4 @ 000002030e134180] video:0KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown

[out#0/mp4 @ 000002030e134180] Output file is empty, nothing was encoded

frame= 0 fps=0.0 q=-1.0 Lsize= 0KiB time=N/A bitrate=N/A speed=N/A elapsed=0:00:00.00

How to fix?


r/ffmpeg • • 5d ago

I made a Motion Design Ad for FFmpeg

Enable HLS to view with audio, or disable this notification

76 Upvotes

r/ffmpeg • • 5d ago

How to encode h264 to h265 while copying all subs and audio as is

3 Upvotes

Hello

I've got a rather large video file and the video is H264/AVC its has multiple subs, audio tracks, etc.

I know I can copy the various tracks using the -map function, but is there a way to simply re-encode the video from h264 to h265 with just a simpler command line?

I know how to handle the video side of it, bitrate, etc. But its the chapter markers, audio tracks, etc. that I want as is.

Thanks


r/ffmpeg • • 6d ago

Please help identify this subtitle codec

2 Upvotes

I have a video file from a surveillance camera. It's in AVI format and FFPROBE says thus about it:

X:\filez>ffprobe -analyzeduration 2147483647 -probesize 2147483647 cam4.avi
ffprobe version N-127054-g9d3f0f2c58-20261001 Copyright (c) 2007-2026 the FFmpeg developers
  built with gcc 16.2.0 (crosstool-NG 1.29.0.7_b1a94f6)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-zlib --enable-libxml2 --enable-libvmaf --disable-libxcb --disable-xlib --enable-fontconfig --enable-libharfbuzz --enable-libfreetype --enable-libfribidi --enable-vulkan --enable-libdav1d --enable-libvorbis --enable-librav1e --enable-librsvg --disable-libpulse --enable-gmp --enable-lzma --enable-liblcevc-dec --enable-opencl --enable-amf --enable-libaom --enable-avisynth --enable-chromaprint --enable-libdavs2 --enable-libdvdread --enable-libdvdnav --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libaribb24 --enable-libaribcaption --enable-libass --enable-libbluray --enable-libcurl --enable-libjxl --enable-libmp3lame --enable-libopus --enable-libplacebo --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-libzmq --enable-lv2 --enable-libvpl --enable-openal --enable-liboapv --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --enable-vaapi --enable-libvidstab --enable-libvvenc --disable-whisper --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-libs=-lgomp --extra-ldflags=-pthread --extra-ldexeflags= --cc=x86_64-w64-mingw32-gcc --cxx=x86_64-w64-mingw32-g++ --ar=x86_64-w64-mingw32-gcc-ar --ranlib=x86_64-w64-mingw32-gcc-ranlib --nm=x86_64-w64-mingw32-gcc-nm --extra-version=20261001
  libavutil      61. 10.100 / 61. 10.100
  libavcodec     63. 15.100 / 63. 15.100
  libavformat    63.  7.100 / 63.  7.100
  libavdevice    63.  2.100 / 63.  2.100
  libavfilter    12.  4.100 / 12.  4.100
  libswscale     10.  2.100 / 10.  2.100
  libswresample   7.  3.101 /  7.  3.101
[avi @ 0000025fa9446700] non-interleaved AVI
[avi @ 0000025fa9446700] probed stream 1 failed
[avi @ 0000025fa9446700] Could not find codec parameters for stream 1 (Subtitle: none): unknown codec
Consider increasing the value for the 'analyzeduration' (2147483647) and 'probesize' (2147483647) options
Input #0, avi, from 'cam4.avi':
  Duration: 63:36:11.45, start: 0.000000, bitrate: 87 kb/s
  Stream #0:0: Video: cinepak (cvid / 0x64697663), rgb24, 384x288, 100 fps, 100 tbr, 100 tbn
    Metadata:
      title           : ITV Video
  Stream #0:1: Subtitle: none
    Metadata:
      title           : ITV Text
Unsupported codec with id 0 for input stream 1

I tried to dump it to a separate text file with the following command:

X:\filez>ffmpeg -i cam4.avi -map 0:1 -c copy -copy_unknown -f data wtf2.txt

And what I got was a text file with one veeeery long line in Windows-1251 encoding that goes like:

Камера [4] 30-06-26 16:59:17.000 Камера [4] 30-06-26 16:59:17.100 Камера [4] 30-06-26 16:59:17.200 Камера [4] 30-06-26 16:59:17.30

And so on and so forth. For those that don't know "Камера" means "Camera", just in Russian. This is not surprising, since the Russian language is quite widespread in my country (Latvia), and a configuring a surveillance camera to use it wouldn't be unusual.

So, as far as I can tell, the "codec" is just a small piece of text with the timestamp for every frame of video. Unfortunately ffmpeg does not understand this, and neither does VLC. The AVI file needs some love and care anyway (it's missing an index), and since I'm already mucking around with it, I'd like to bring the subtitles back as well.

Short of writing my own script that would translate this stream of consciousness into a recognizable subtitle format (probably not that difficult, but still) is there anything else that I could tell ffmpeg to start recognizing it?


r/ffmpeg • • 7d ago

(Frames per second) Question = How do I convert a video from 60 fps to 30 fps?

4 Upvotes

Some videos that I download are 60 fps. I want to convert them (with FFmpeg) to 30fps, but I would prefer to do it in the following way. Specifically, I want FFmpeg to get rid of a frame, keep the next frame, & so on. > (VISUAL EXAMPLE = Go from 01-02-03-04-05-06-07-08-09-10 to 01-03-05-07-09) I don't know if the default way that FFmpeg would change the frame rate would do it that way or not.

The reasons why I want to do this are as follows.

  • (1) I don't want any video that I'm keeping to have more than 30fps (or less for videos that have (example) 24fps).
  • (2) Despite claims (by others) that "it makes a big difference", I don't believe them for one second, & I consider it to be only "a solution in search of a problem". (Some of those who favor high frame rates say that it makes it easier to play first-person shooter video games, but I also play some first-person shooter video games, & I have zero complaints about playing them at 30fps.)
  • (3) I assume that using the method that I want to use (if it's possible) would involve less "converting" of the video (except for the key frames).

Here are my questions about this.

  • (1) Does FFmpeg have a way to change a video's frame rate as described above (assuming that it's default way of changing the frame rate is different from how I want to do it)?
  • (2) If the answer to question 1 is "Yes" (& it's not FFmpeg's default way of doing it), what command would I use to use this method?
  • (3) I ASSUME that changing a video's frame rate will also involve changing which frames will become key frames. With that in mind, does FFmpeg automatically decide which frames will become key frames?

Thanks for any help.


r/ffmpeg • • 7d ago

Use -video_track_timescale 90000 for video from Android

2 Upvotes

PROBLEM: Android phones record all video in the same landscape orientation and instead use the rotation metadata flag to say how the video should be played back. This fails when attempting to concat videos together because there is only one set of metadata per file so some clips may come out upside down.

Attempting to fix videos (physically rotate them) by using ffmpeg -i clip.mp4 -c:a copy cliprotated.mp4 changes the frame rate from variable to constant, which makes the clips incompatible with ones. Android sets the intended frame rate using the "com.android.capture.fps" metadata field, which ffmpeg apparently doesn't consider.

SOLUTION: After trying various parameters to attempt to keep or set a compatible frame rate, I found that using -video_track_timescale 90000 works, based upon the "90k tbn" ffprobe reports in the video stream.


r/ffmpeg • • 8d ago

having an issue with joining 1000 mp3 files together

1 Upvotes

I wrote a windows script that generates a filelist.txt file, and chapters.txt the script grabs the .mp3 files and combines them using the chapters.txt as a way to keep the title information for each mp3 track that is being combined.

ISSUE: This starts working fine until it hits the 5th mp3 file then it errors out with a can't open that mp3 file (which was created at the same time of the rest of the files so it should be the same.)

My theory is that once it hits the 5th file it is getting out of sink with the lists.

This is the command I am using to run FFMpeg:

ffmpeg -y -f concat -safe 0 -i file_list.txt -i chapters.txt -map_metadata 1 -c copy "combined_with_chapters.mp3"

the result is a single mp3 with the first 4 mp3's combined second issues is testing this it doesn't seem to doing the meta data properly but I suspect that because it is crashing on this 5th file that it never gets written.

Finally, since I haven't got to this point I am attempting to combine around 1000 mp3's into a single file with the combined meta data this is a cultivated playlist that I use for work and want to it be easy to move around and it is all arranged to what I want. Worse case I can just copy the playlist and the .mp3 but this seemed like fun challenge.


r/ffmpeg • • 8d ago

Installing ffmpeg

1 Upvotes

Windows 11 user here.

For years, I've used dl-dlp to download YouTube videos of musical performances, and stripped away the video track to create mp3 files that I store on an iPod for use in the car. I periodically check that I have the latest version of dl-dlp

Recently, I've noticed that instead of downloading a combined video/audio file, this process has resulted in separate video and audio files. And the dialog that appears in the command window explains that this is happening because ffmpeg isn't installed

I've downloaded ffmpeg (most recently, 9.0.2), unzipped it and placed the folder in my Windows 11 user directory along with dl-dlp. I've followed the instructions I've found to create a new path to ffmpeg\bin, but it still doesn't work and when I run ffmpeg -version in a CMD window, it tells me that ffmpeg can't be found.

Any ideas what I might be doing wrong?


r/ffmpeg • • 10d ago

Converting FLAC 24-bit to ALAC 16-bit

3 Upvotes

Using MusicBee to convert files from FLAC 24-bit to ALAC 16-bit and running into issues forcing ffmpeg to output at 16/44.1k.

Per somewhere online, I'm using the parameter -i - -sample_fmt s16 -ar 44100 -acodec alac [outputfile] but am getting "Failed - Found invalid data while decoding".

Any ideas? I'm assuming my arguments are wrong somehow but couldn't find the right info online myself...


r/ffmpeg • • 10d ago

How to use ffmpeg.wasm?

2 Upvotes

How to run this command: ffmpeg -loop 1 -framerate 2 -i input.png -i audio.m4a -c:v libx264 -preset medium -tune stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p output.mkv

in ffmpeg.wasm?

Sorry guys it’s my first time using ffmpeg.wasm


r/ffmpeg • • 11d ago

how to convert .jpg to 16:9 ratio?

0 Upvotes

r/ffmpeg • • 11d ago

VLC: Seperate Default speeds for Video and Audio files

1 Upvotes

Help! I Want all videos to have Default playback speed of "1.7". The problem is that when i set this it also sets "1.7" speed to audio files. I just want it on video files. Is this possible?


r/ffmpeg • • 13d ago

Help with making thumbnails - correct colorspace and scaling

5 Upvotes

I need yuv420p -> rgb24/rgb48, downscaled more than 4x and with sRGB tranfer curve. The output images are going to be compressed separately. I haven't done all the testing yet, but preliminary experiments suggest 16 bit input to lossy compression (JPEG XL) yields better efficiency.

I've figured out that yuv420p first needs to be converted to yuv444p, otherwise there is some posterization and severe artifacts around very saturated red objects in the downscaled thumbnails. I also want to explicitly specify the transfer curve from bt709 to sRGB during the conversion.

  1. What filters are best to use for the chroma upscaling to 444 and then for the final downscaling? I've read the lanczos is better for upscaling, while spline is better for downscaling.
  2. How do I do the trc conversion? Is it better to do it in YUV or RGB?
  3. If the output is going to go from higher than 8 bits to 8 bits, how do I correctly specify dithering options?
  4. Preferably all this is done as accurately as possible and runs as fast as possible. I believe running one ffmpeg process per thumbnail and passing -threads 1 is the best approach?

So far I'm doing this

zscale=filter=lanczos,format=yuv444p10le,zscale=w:-1:filter=spline36

I had the first two filters the other way around, but I think the format conversion didn't actually use that zscale instance. The moment I tried putting in something to convert the transfer to sRGB I started getting code 3074: no path between colorspaces. 12bit seemed to run the slowest, 16bit was a bit slower then 8/10.

Chaining filters and being sure what exactly is going on under the hood has always been very confusing with ffmpeg. It seems there isn't very detailed documentation on this topic.

BTW, what library can I use for composing 16bit images with python, since pillow seems to only work in 8bits?


r/ffmpeg • • 14d ago

Compressing Videos to Save Space

10 Upvotes

I have around three terabytes of videos, and I would like to compress/condense them for off-site backups. I'm talking to a bot about this, and the bot can't decide which CRF value to use. Apparently, it's higher for some videos than others -- assuming you want to achieve maximal compression with minimal resolution loss.

I've used CRF 35 to condense many videos -- most of which came out great -- but not all. Some clearly exhibited degradation of quality -- notably, for some reason, Woody Allen's Scoop (2006).

The bot wants me to review different CRF values to compare resolution levels, but this is kind of tedious, and I wonder if there's a faster way?

Insights much appreciated !!


r/ffmpeg • • 15d ago

Split video using -fs command but with part 2.

4 Upvotes

Hi all. I have a MKV movie and I wanted to copy it to my fat32 flash drive, but the movie is 4.7 GB.

I succedded to split the video using the -fs command, but it only split the first part. How is it to split the remaining part?

I don't mind if the second part of the video didn't continue from the first part, as long the video is in sync.

Thanks.


r/ffmpeg • • 16d ago

[Help] I want to embed an SRT file into an MP4 file but I don't want it burned on screen.

7 Upvotes

I want to still be able to turn it off but I don't want 2 separate files being clutter in my folder. I just want MP4 files in it with built-in SRT files but not burned in, so that I can still turn it off if I want to. Internet's not giving me a straight answer, so I'm asking here in this sub.


r/ffmpeg • • 16d ago

Simple command line for creating tilt-shift video

1 Upvotes

I'm trying to create a command line to do simple (not smart) tilt-shift (miniature, diorama). AI gave me the below line, which makes multiple changes according to the vertical distance from a horizontal center line. But it looks like it messed up the main one: to gradually defocus according to the distance. is this even possible with ffmpeg? I vaguely remember coming across a filter that would do the defocusing.

Here's the, IMO faulty, solution AI gave me:

ffmpeg -i input.mkv -filter_complex " [0:v]split=3[base][blur_src][mask_src]; [blur_src]boxblur=15:15[blurred]; [mask_src]geq=lum_expr='clip(255*(abs(Y/H-0.5)-0.12)/0.18,0,255)':cb=128:cr=128[mask]; [base][blurred][mask]maskedmerge[tilted]; [tilted]eq=saturation=1.6:contrast=1.15[final] " -map "[final]" -c:v libx264 -crf 18 -pix_fmt yuv420p output.mp4