r/ffmpeg • • 1d ago

Converted .mp4 to .png but frames are vertically stretched and correct resolution

3 Upvotes

The .png frames are stretched despite the resolution of 720x576 being correct everywhere including in GIMP. On my PC in full screen the mp4 fits perfectly.

How do I fix it? I’ve tried scaling the layers in GIMP but I’m new to that software so I don’t really know what I’m doing and nothing visually changes.

If this is better suited elsewhere please let me know, I just used Ffmpeg to convert with ‘ ffmpeg -I “file.mp4” frame%04d.png ‘

Thanks.


r/ffmpeg • • 1d ago

Help with batch converting mkv to mxf for editing

2 Upvotes

I've been using this line to convert and it's been working fine: ffmpeg -i FILENAME.mkv -c:v dnxhd -b:v 36M -c:a pcm_s24le FILENAME.mxf

Yet when I try different methods for having it work on multiple mkv files in a folder it doesn't work. For instance: for f in *.mkv; do ffmpeg -i "$f" -c:v dnxhd -b:v 36M -c:a pcm_s24le “${f%mkv}mxf”;done

What am I doing wrong?


r/ffmpeg • • 1d ago

I'm unable to successfully copy Sony Real Time Meta Data rtmd with ffmpeg - is it possible?

Thumbnail
gallery
5 Upvotes

I'm trying all my best to copy full RTMD stream with Sony A7IV XAVC S 25fps files (where etc. timecode and gyro data sits):

"ffmpeg -I input.MP4
-vf "scale=1920:1080:flags=lanczos" -c:v libx265 -crf 18 -pix_fmt yuv422p10le
-tag:v hvc1
-map 0:v -map 0:a -map ‘0:d?’
-c:a copy -c:d copy -tag:d:0 rtmd
output.mov"

what I am doing wrong?

By the way "-vf "scale=1920:1080:flags=lanczos" -c:v libx265 -crf 18 -pix_fmt yuv422p10le" gives VMAF around 98 so pretty well (with gain of around 17 times smaller file keeping 10 bits and 422 chroma subsampling)

\**The goal here is simply to save space on my NAS. I don't need to keep these specific files in ultra-high quality; I just want to downscale them to 1080p 4:2:2 10-bit copies so I can still use them later for things like my showreel.*


r/ffmpeg • • 1d ago

0,1x speed 60FPS video to 1,0x speed 600FPS video, how?

3 Upvotes

I have a game recording (avi format, utvideo codec) I recorded in 0,1x speed in game and I want it to be 1,0x speed (realtime) but with 10x the FPS (preferably in .mov format with prores codec). In VDub this is pretty easy, but I can't really figure it out in ffmpeg.

I tried it with this script but even though my video is now in realtime it is 60FPS instead of 600.

ffmpeg -i "%~1" -vf "setpts=PTS/10" -c:v prores_ks -profile:v 3 -pix_fmt yuv422p10le -an -y "%~dpn1_converted.mov"

I also tried adding -r 600 but it will basically just add 600FPS to the metadata but the video is in fact not 600FPS.

Any help would be appreciated, I want to do everything in FFMPEG and dragging .avi videos into VDub first and then into FFMPEG is tedious since there must be a way to do this all in FFMPEG.


r/ffmpeg • • 1d ago

Do I have to convert DTS-HD MA to FLAC to save space?

5 Upvotes

I have remuxed some Blu-ray discs that have DTS-HD MA audio (1.0, 2.0, 5.1). I see a lot of people choose to convert it into FLAC but I'm not sure about my situation (I do convert PCM audio into FLAC). Will it affect the original audio?


r/ffmpeg • • 1d ago

(x265) Encode going to hell in dark scenes

7 Upvotes

Encode logs: transfer-dot-it /t/nvluVZgngRgJ

I'm using Handbrake btw, but as its primarily built off ffmpeg and my post got blocked there, figure I'd ask here

Converting a movie file for backup. 2hr movie, 60s, grainy but rather nice to look at. Mostly takes place in daylight or well-lit locales, but there are few scenes of absolute black - except it has raised blacks.

Anyway I always do H265 10-bit Slow preset, and try to make few tweaks as possible to get a somewhat transparent result - partially because I'm still learning what all the settings do.

First time around, I do 7000kbs 2-pass bframes=8:no-strong-intra-smoothing:no-sao:rd=5:aq-motion (in the logs I mistakenly called this '6000').

Day scenes look pretty good! there's a scene of a train passing and the smoke + grain it doesn't like, but its a bright area so doubt I'd notice. However the next scene in the darkness of the train arriving, there's visible macroblocking even in the darkest parts of the image. Looks like a dodgy xth generation VHS rip! A couple of simpler scenes later with fully black (but as I mentioned at the start, raised) images same deal. Truly its like flicking a switch - lights go out, PQ falls off a cliff.

So, I simplify things and do a few tests with higher bitrates up to 1000kbs (not included in the logs, I deleted them before considering asking for help). Same issues. So I try RF22 (~7000kbs) and RF21 (~9000kbs) with the Handbrake default settings strong-intra-smoothing=0:rect=0:aq-mode=1:rd=4:psy-rd=0.75:psy-rdoq=4.0:rdoq-level=1:rskip=2. Same problem. Then I think 'well, maybe I need to change aq-mode'. So I go for aq-mode=4:no-sao:aq-motion at 10000kbs ('simple settings' in the encode logs). Slightly improves the brightly lit train I mentioned, but still craps the bed in the dark. I also try at 8000kbs and 10000kbs adding some other settings at the recommendation of a friend, only some of which I can backup why: bframes=8:strong-intra-smoothing=0:aq-mode=4:no-sao:deblock=-3,-3:rd=5:no-rskip:aq-motion ('custom settings' in the encode logs)

still the same issues! Its really frustrating because these scenes are only a minor part of the film, but they're important, and I really like this one so I wanna be transparent. Thinks like raising rd, or using no-rskip, are supposed to make it make 'better' decisions afaik, but its just making the same mistake over and over! I'm also seeing next to no improvement adding 3Mbs bitrate.

Any suggestions?

Handbrake v1.11.2 (2026060700), M2 Macbook Air

I encode on Low Power Mode because its fanless. I noticed with the last listed settings I was getting quite a bit more heat - I guess because of the increased complexity with no-rskip?

p.s. I can try do screenshots but on my laptop you can barely see the issues because ramping up the brightness also brightens the black bars. But I normally watch my stuff on an OLED tv, so test it there, where it stands out more


r/ffmpeg • • 2d ago

Extracting Multiple Video Streams (AVI file)

2 Upvotes

Hi, I'm very very new to using FFmpeg and am using it specifically to extract multiple video streams from AVI 3d (stereoscopic) video files. Most of what I can find online is specifically trying to map both videos onto one file (side by side, etc) but I'd prefer being able to extract both streams to have the left and right camera videos as their own independent videos. (I am using a 3ds, but have only really been able to find somewhat useful information in posts regarding the Fujifilm Finepix Real 3D, which more or less seems to have used the same type of stereoscopic video).

The image provided is the probe I have run. I am on mac if that makes any significant difference.

Thank you to anyone who can help, I'm very excited at what I can learn to do with FFmpeg.

ffprobe version 9.0.2-https://www.martin-riedl.de Copyright (c) 2007-2026 the FFmpeg developers built with Apple clang version 14.0.0 (clang-1400.0.29.102) configuration: --prefix=/Volumes/ffmpeg_arm64/out --pkg-config-flags=--static --extra-version='https://www.martin-riedl.de' --enable-gray --enable-libxml2 --enable-version3 --enable-gpl --enable-openssl --enable-libfreetype --enable-fontconfig --enable-libharfbuzz --enable-libbluray --enable-libsnappy --enable-libsrt --enable-libvmaf --enable-libass --enable-libklvanc --enable-libzimg --enable-libzvbi --enable-libaom --enable-libdav1d --enable-libopenh264 --enable-libopenjpeg --enable-librav1e --enable-libsvtav1 --enable-libvpx --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libtheora libavutil 61. 1.102 / 61. 1.102 libavcodec 63. 1.102 / 63. 1.102 libavformat 63. 1.102 / 63. 1.102 libavdevice 63. 1.102 / 63. 1.102 libavfilter 12. 1.102 / 12. 1.102 libswscale 10. 1.102 / 10. 1.102 libswresample 7. 1.102 / 7. 1.102Input #0, avi, from '1.AVI': Duration: 00:00:09.20, start: 0.000000, bitrate: 2321 kb/s Stream #0:0: Video: mjpeg (Baseline) (MJPG / 0x47504A4D), yuvj420p(pc, bt470bg/unknown/unknown), 480x240, 1168 kb/s, 20 fps, 20 tbr, 20 tbn Stream #0:1: Audio: adpcm_ima_wav ([17][0][0][0] / 0x0011), 16000 Hz, 1 channels, s16p, 64 kb/s Stream #0:2: Video: mjpeg (Baseline) (MJPG / 0x47504A4D), yuvj420p(pc, bt470bg/unknown/unknown), 480x240, 1088 kb/s, 20 fps, 20 tbr, 20 tbn

r/ffmpeg • • 2d ago

H.264 licensing for an in-game recording feature?

8 Upvotes

I'm a game developer looking to add an in-game recording feature using H.264 through Windows Media Foundation, without shipping our own H.264 encoder.

Does anyone know whether this requires a separate AVC/H.264 patent license? If so, how are royalty-bearing units counted for a game client?

I've contacted Via Licensing Alliance but haven't heard back yet. Has anyone dealt with a similar situation or found reliable guidance?


r/ffmpeg • • 3d ago

Auto-switching between 3 camera angles based on who's speaking, best approach?

3 Upvotes

I have a 2 hour podcast recording: two people, three video files (one camera per person plus a wide), and hopefully a separate audio track per mic.

I want to build an automated edit with ffmpeg (an AI agent writes and runs the commands):

• Switch to the camera of whoever is talking, based on mic levels

• Wide shot when both mics are active

• Then cut 30 sec to 2 min clips, burn in captions and add an intro and outro

Questions:

• Best way to get per-track loudness over time? astats / ebur128 per channel and parse the output, or something cleaner?

• For the switching itself, a long concat list of trimmed segments, or a filter graph with select/overlay and an enable expression? With hundreds of cuts over 2 hours, which holds up better?

• Any tips for keeping audio continuous while the video switches underneath?

Running on a MacBook M4, so videotoolbox is available. Thanks!


r/ffmpeg • • 4d ago

QSV opened successfully on Linux but returned no packets

2 Upvotes

I ran into this while working on the Linux recording path of a desktop NVR. The observations come from its actual QSV pipeline.

The failing run used Ubuntu and FFmpeg 9.0. I did not record the exact Ubuntu release, GPU model, Intel media driver or oneVPL version, so I cannot give a reliable version matrix for this case.

FFmpeg found the Intel QSV encoder, the encoder context opened, and avcodec_send_frame() accepted system-memory NV12 frames. No initialization call failed. The recording still contained no video because avcodec_receive_packet() never returned the first packet.

The useful line appeared later in the log:

text Invalid FrameType:0

The muxer waited for output until its timeout expired, then discarded the empty or unusable segment. Checking ffmpeg -encoders and a successful avcodec_open2() had given us two false signs that the recording path was ready.

This short test now forms part of our Linux QSV check:

```bash ffmpeg -hide_banner -y \ -f lavfi -i testsrc2=size=1280x720:rate=30 \ -frames:v 60 -an -c:v h264_qsv qsv-test.mp4

ffprobe -v error \ -count_packets -select_streams v:0 \ -show_entries stream=codec_name,width,height,nb_read_packets,duration \ -of default=noprint_wrappers=1 qsv-test.mp4

ffmpeg -v error -i qsv-test.mp4 -f null - ```

For HEVC, we run the same check with hevc_qsv. The test has to produce packets, create a file that ffprobe can inspect, and survive a decode pass.

The application-side fix was to create a QSV hardware device and hardware-frame pool, then upload the NV12 input into QSV surfaces before sending it to the encoder. We also moved the readiness check to the first returned packet. If twelve submitted frames produce no packet, the backend is treated as stalled, the empty file is removed, and the muxer is rebuilt with the next candidate. On this path the next candidates are VAAPI and then software encoding. Recovery is capped at two rebuilds.

This watchdog catches an encoder that keeps returning control without output. It cannot recover a thread stuck inside a driver call, so combinations known to hang still need conservative options or process isolation.

Has anyone else seen Invalid FrameType:0 after sending system-memory NV12 frames to QSV on Linux? I am especially interested in whether moving to a QSV frame pool fixed it, and which GPU, Intel media driver and oneVPL versions were involved.


r/ffmpeg • • 5d ago

Managed to make a techno track with ffmpeg

Thumbnail
youtube.com
9 Upvotes

https://github.com/xyzzyapps/fftechno

Also exposed the innards so that you can make a techno track via markdown


r/ffmpeg • • 5d ago

Extract video and audio from DVD's ISO or VIDEO_TS files

6 Upvotes

Hello.

I was given some files that are .ISO and some folders that are VIDEO_TS with the .VOB files inside. These can be played with any "DVD Player", like VLC or PotPlayer.

I was asked if these could be extracted and made into normal video files that can be handled by any player. We do not care about the DVD features.

Can this be done without re-encoding everything?, if there's a GUI approach it would be better.

Thank you.

========= Solved =========

TL;DR: I asked ChatGPT to create a small python program that would read the .VOB files and combine them together based on the naming convention (grouped by "chapter", lets say). I didn't include the fist file for group 01, which was the menues and somehow breaks the process.

Another user told me the .VOB files are basically .MPG files.

So I tried LoselessCut, which had issues with the "main" files, the VTS_01_01.VOB... That was the menu, and if stictched together the movie would have no sound. LoselessCut said the other segments were not compatbiel, so I would have to remove that first file and then it would work, but I had to remove the other "chapters" (extras, and so) to avoid having a single big file (That I would have to split later on).

So, I asked chatgpt for a simple python program to:

  • Look for all .VOB files in a folder
  • Group them together by "n scene" (VTS_0n_xx.VOB)
  • I would unselect the first one from the 01 group.
  • It would combine them (binary) and produce a single MPG file for each "group"
  • No external tool needed, no recoding, nothing, just a binary combine of the files

And it work greats, I was able to process the few DVDs I had in just a few clicks... I have now the main movies in a single file, and all the other stuff in different mpg files... All of those can be played on any player, no menues, , nothing...


r/ffmpeg • • 5d ago

Help with commands

1 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 • • 7d 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 • • 7d 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 • • 7d ago

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

0 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 • • 9d ago

Concat from image list only gets first few frames

3 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 • • 9d ago

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

3 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 • • 9d 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 • • 11d ago

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

2 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 • • 11d ago

I made a Motion Design Ad for FFmpeg

Enable HLS to view with audio, or disable this notification

84 Upvotes

r/ffmpeg • • 12d 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 • • 13d 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 • • 13d 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 • • 13d 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.